CodeCompletion and struct problem

CodeLite installation/troubleshooting forum
borr
CodeLite Enthusiast
Posts: 34
Joined: Tue Dec 16, 2008 10:43 am
Contact:

CodeCompletion and struct problem

Post by borr »

test.h
---------------

Code: Select all

struct
	{
		bool CanSort;
		wxString field;
	} Sort;
---------------
test.cpp

Code: Select all

#include test.h
...
Sort./*codecompletion does not show the list of members Sort*/
if

Code: Select all

struct Sort
	{
		bool CanSort;
		wxString field;
	} ;
Sort srt;
//then everything works fine
borr
CodeLite Enthusiast
Posts: 34
Joined: Tue Dec 16, 2008 10:43 am
Contact:

Re: CodeCompletion and struct problem

Post by borr »

codeLite 2.7.0.4375
fecjanky
CodeLite Curious
Posts: 1
Joined: Tue Oct 12, 2010 11:59 am
Genuine User: Yes
IDE Question: C++
Contact:

Re: CodeCompletion and struct problem

Post by fecjanky »

Hi!

I have the same problem and i use the same version of codelite.
I've added my source and header directories to workspace parser include files, i've full rebuild my workspace tags,
and even after that it does not pop up the struct members for auto completion.
(Note: function call tip for own written functions are working)
Please help,
Thanks in advance
Fec
User avatar
eranif
CodeLite Plugin
Posts: 6372
Joined: Wed Feb 06, 2008 9:29 pm
Genuine User: Yes
IDE Question: C++
Contact:

Re: CodeCompletion and struct problem

Post by eranif »

code completion (atm) does not support this kind of coding style.
If you wish code completion to work properly, you will need to use the later snippet code styling.

Eran
Make sure you have read the HOW TO POST thread
borr
CodeLite Enthusiast
Posts: 34
Joined: Tue Dec 16, 2008 10:43 am
Contact:

Re: CodeCompletion and struct problem

Post by borr »

I used ctags with this code

Code: Select all

		struct {
			wxString test;
			int num;
		} Inf;

And get the result

Code: Select all

Inf	D:\Proba\NoteMDI\main.h	/^		} Inf;$/;"	m	class:MainFrame	typeref:struct:MainFrame::__anon1
num	D:\Proba\NoteMDI\main.h	/^			int num;$/;"	m	struct:MainFrame::__anon1
test	D:\Proba\NoteMDI\main.h	/^			wxString test;$/;"	m	struct:MainFrame::__anon1
Why code completion can not handle the same task? In my opinion the negative result comes out with a parsing ole2.h for the same reason

I looked at tags file created by CodeLite for the same file:

Code: Select all

"77467"	"Inf"	"D:\Proba\NoteMDI\main.h"	"56"	"member"	"protected"	""	"/^		} Inf;$/"	"MainFrame"	""	"MainFrame::Inf"	"struct:MainFrame::__anon1"	"MainFrame"	""
"77471"	"test"	"D:\Proba\NoteMDI\main.h"	"54"	"member"	"public"	""	"/^			wxString test;$/"	"MainFrame"	""	"MainFrame::test"	""	"MainFrame"	""
"77472"	"num"	"D:\Proba\NoteMDI\main.h"	"55"	"member"	"public"	""	"/^			int num;$/"	"MainFrame"	""	"MainFrame::num"	""	"MainFrame"	""
Why path for test and inf is MainFrame::test (should be: MainFrame::Inf::test), these elements belong to struct:MainFrame::__anon1? Why code completion can not handle even inf struct?
Post Reply