Page 1 of 1

CodeCompletion and struct problem

Posted: Thu Sep 30, 2010 3:22 pm
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

Re: CodeCompletion and struct problem

Posted: Thu Sep 30, 2010 3:24 pm
by borr
codeLite 2.7.0.4375

Re: CodeCompletion and struct problem

Posted: Tue Oct 12, 2010 12:17 pm
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

Re: CodeCompletion and struct problem

Posted: Wed Oct 13, 2010 1:42 am
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

Re: CodeCompletion and struct problem

Posted: Thu Apr 21, 2011 5:08 pm
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?