Hi
I use a macro to define (typedef) multiple Types at the same time from for a specific class
1/ Here is a skeleton of the macro (may not compile)
>> #define DECLARE_MY_TYPES(X) class X;typedef std::vectorr<X> Vector##X; typedef map<str::string, X> Map##X;
2/ Then in any file .h, I do:
>> DECLARE_MY_TYPE(MyClass)
>> VectorMyClass test; // so test ~ std::vector<MyClass>
3/ The compilation of the project has no error.
4/ I try to do autocomplete from CodeLIte (test.<Ctrl-Space> ) --> nothing is showed
I am using the version 3.5.5375 Linux
Could you please tell me if COdeLite support typedef using ## in the macro ? I already try this with Eclipse and eclipse understand the feature
Thanks
DO Hong Son
CodeCompletion for typedef defined with macro
-
- CodeLite Enthusiast
- Posts: 23
- Joined: Fri Mar 16, 2012 3:02 pm
- Genuine User: Yes
- IDE Question: C++
- Contact:
CodeCompletion for typedef defined with macro
Last edited by dhs on Sun Mar 25, 2012 6:12 pm, edited 1 time in total.
- eranif
- CodeLite Plugin
- Posts: 6375
- Joined: Wed Feb 06, 2008 9:29 pm
- Genuine User: Yes
- IDE Question: C++
- Contact:
Re: CodeCompletion for typedef defined with macro
Enable clang code completion - and it should understand that
http://www.codelite.org/LiteEditor/ClangIntegration35
Eran
http://www.codelite.org/LiteEditor/ClangIntegration35
Eran
Make sure you have read the HOW TO POST thread
-
- CodeLite Enthusiast
- Posts: 23
- Joined: Fri Mar 16, 2012 3:02 pm
- Genuine User: Yes
- IDE Question: C++
- Contact:
Re: CodeCompletion for typedef defined with macro
Hi
I compile codelite on Linux without clang because the gcc version of my linux machine is a little bit old (here is the post: viewtopic.php?f=3&t=1642)
Is there any other workaround for this issue ?
Another issue I can see is that sometime CodeLite cannot distinguish between a normal variable and a pointer; So if I have a class X with a varibale x, CodeLIte will show same functions on code complete list when I do (x.) and (x->).
Thanks
I compile codelite on Linux without clang because the gcc version of my linux machine is a little bit old (here is the post: viewtopic.php?f=3&t=1642)
Is there any other workaround for this issue ?
Another issue I can see is that sometime CodeLite cannot distinguish between a normal variable and a pointer; So if I have a class X with a varibale x, CodeLIte will show same functions on code complete list when I do (x.) and (x->).
Thanks
- eranif
- CodeLite Plugin
- Posts: 6375
- Joined: Wed Feb 06, 2008 9:29 pm
- Genuine User: Yes
- IDE Question: C++
- Contact:
Re: CodeCompletion for typedef defined with macro
No.dhs wrote:Is there any other workaround for this issue ?
Works as intended - in the far past it was trying to be smarter and auto fix based on the operator used - it caused more annoyance then it helpeddhs wrote:Another issue I can see is that sometime CodeLite cannot distinguish between a normal variable and a pointer; So if I have a class X with a varibale x, CodeLIte will show same functions on code complete list when I do (x.) and (x->).
Eran
Make sure you have read the HOW TO POST thread
-
- CodeLite Enthusiast
- Posts: 23
- Joined: Fri Mar 16, 2012 3:02 pm
- Genuine User: Yes
- IDE Question: C++
- Contact:
Re: CodeCompletion for typedef defined with macro
I try the following workaround by adding into Tagsoption --> ctags --> Advanced --> Types:
VectorInt=std::vector<int>
but CodeLite still does not show the code completion.
Did I do something wrong ?
VectorInt=std::vector<int>
but CodeLite still does not show the code completion.
Did I do something wrong ?
- eranif
- CodeLite Plugin
- Posts: 6375
- Joined: Wed Feb 06, 2008 9:29 pm
- Genuine User: Yes
- IDE Question: C++
- Contact:
Re: CodeCompletion for typedef defined with macro
I am not sure why, but this should work:dhs wrote:VectorInt=std::vector<int>
Code: Select all
#include <vector>
...
typedef std::vector<int> VectorInt;
VectorInt myVec;
myVec. // completion works
Make sure you have read the HOW TO POST thread
-
- CodeLite Enthusiast
- Posts: 23
- Joined: Fri Mar 16, 2012 3:02 pm
- Genuine User: Yes
- IDE Question: C++
- Contact:
Re: CodeCompletion for typedef defined with macro
Could you please explain to me the difference between Types and Tokens in Tag Settings --> ctags --> Advanced ?
Is it possible to have the preprocessed files after Tokens and Types ? (to check if replacement is correct)
I try to explore the ctag file using a SQLite brower. is it possible to add some types manually to the database ?
Is it possible to have the preprocessed files after Tokens and Types ? (to check if replacement is correct)
I try to explore the ctag file using a SQLite brower. is it possible to add some types manually to the database ?