General questions regarding the usage of CodeLite
tingel2k
CodeLite Curious
Posts: 1 Joined: Mon Nov 01, 2010 2:57 pm
Genuine User: Yes
IDE Question: C++
Contact:
Post
by tingel2k » Tue Nov 02, 2010 12:14 pm
Hi,
is it possible to get the autocompletion for the keyword "this" in a program written in C ?
f.e.
Code: Select all
void stupid_func( struct coolstruct * this ){
this->coolness = 5 ;
this->stupidity = 0xff;
}
is there a way to get the completion for the structure from "this"?
Greetz tingel2k
eranif
CodeLite Plugin
Posts: 6375 Joined: Wed Feb 06, 2008 9:29 pm
Genuine User: Yes
IDE Question: C++
Contact:
Post
by eranif » Tue Nov 02, 2010 1:18 pm
I noticed two problems:
1) 'this' is handled in a special way in code completion, this can be fixed (i.e. check the file extension)
2) codelite does not seem to provide completion to variables declared as 'strcut coolstruct* mystruct', it will offer completion for declaration like this 'coolstruct* mystruct'
I will look into both problems.
Eran
eranif
CodeLite Plugin
Posts: 6375 Joined: Wed Feb 06, 2008 9:29 pm
Genuine User: Yes
IDE Question: C++
Contact:
Post
by eranif » Tue Nov 02, 2010 1:23 pm
As a workaround:
Use typedef:
Code: Select all
typedef struct
{
int coolness;
int stupidity;
} coolstruct;
Use the typedef in the prototype, and rename 'this':
EDIT:
Please open a bug for both issues in sourceforge so they wont get lost in the forum
Eran