Code completion for namespace alias

General questions regarding the usage of CodeLite
Sami
CodeLite Curious
Posts: 6
Joined: Wed Mar 03, 2010 9:19 pm
Genuine User: Yes
IDE Question: C++
Contact:

Code completion for namespace alias

Post by Sami »

Hi all,

It seems that code completion doesn't work for namespace alias.
For example, when i make an alias to namespace boost::filesystem:

Code: Select all

#include "boost/filesystem.hpp"

namespace bf = boost::filesystm;
bf::  //no completion
NB.
- I am using CodeLite 2.3.0.3833.
- The project compiles without errors.
- I included BOOST_HOME/include to parser search path.

is there a way to fix the problem?

Thanks.
Sami
User avatar
eranif
CodeLite Plugin
Posts: 6372
Joined: Wed Feb 06, 2008 9:29 pm
Genuine User: Yes
IDE Question: C++
Contact:

Re: Code completion for namespace alias

Post by eranif »

Currently this is not supported by the parser.

You could try and workaround it by doing this:
'settings -> tags settings -> advanced'

In this tab, select the 'Types' page (from the bottom tabs) and add:
bf=boost::filesystm

I am not sure it will work... you could try it

Also, please submit a FR for this.
Eran
Make sure you have read the HOW TO POST thread
Sami
CodeLite Curious
Posts: 6
Joined: Wed Mar 03, 2010 9:19 pm
Genuine User: Yes
IDE Question: C++
Contact:

Re: Code completion for namespace alias

Post by Sami »

Thank you for your response,
I already tested type substitution and it doesn't work.

Regards.
Sami
User avatar
eranif
CodeLite Plugin
Posts: 6372
Joined: Wed Feb 06, 2008 9:29 pm
Genuine User: Yes
IDE Question: C++
Contact:

Re: Code completion for namespace alias

Post by eranif »

Out of curiosity:
Does it work for you without the namespace aliasing?

Eran
Make sure you have read the HOW TO POST thread
Sami
CodeLite Curious
Posts: 6
Joined: Wed Mar 03, 2010 9:19 pm
Genuine User: Yes
IDE Question: C++
Contact:

Re: Code completion for namespace alias

Post by Sami »

It work perfectly without aliasing.
For the type substitution it doesn't work and i think it must stay this way because namespace is not a type specifier.

Sami
User avatar
eranif
CodeLite Plugin
Posts: 6372
Joined: Wed Feb 06, 2008 9:29 pm
Genuine User: Yes
IDE Question: C++
Contact:

Re: Code completion for namespace alias

Post by eranif »

Yes, I agreed. I only tried to provide a workaround not a permanent solution.

If you are following the SVN commit logs, you will notice that I already started on fixing this

Eran
Make sure you have read the HOW TO POST thread
Post Reply