Non-standard header extension

General questions regarding the usage of CodeLite
SteelRat
CodeLite Enthusiast
Posts: 17
Joined: Sat Dec 07, 2013 11:51 am
Genuine User: Yes
IDE Question: C++
Location: Russia
Contact:

Non-standard header extension

Post by SteelRat »

Hi, i'm new in Codelite. And i have a problem with colouring non-standard extension files. I have template classes wich are declared in *.h file, and their implementation in *.ipp. I've added *.ipp extension to Tag settings->CTags>Advanced->File Types, but code in *.ipp file is still not coloured.

And not a question, but thought:
Swapping between *.h and *.ipp does not work. It can be done as in Visual Assit for Visual Studio - if there are several files with one name then user choices one of them. This is so simple, so i don't understand why none of free IDEs has this feature.
-----------------------
Core2Duo E6750, 6Gb RAM, Ubuntu 12.04, CodeLite 5.3-110
User avatar
eranif
CodeLite Plugin
Posts: 6375
Joined: Wed Feb 06, 2008 9:29 pm
Genuine User: Yes
IDE Question: C++
Contact:

Re: Non-standard header extension

Post by eranif »

Settings -> Syntax highlight and fonts -> C++ -> File Extensions

(what you did is also needed for code completion purposes)

Swapping between *.h and *.ipp does not work. It can be done as in Visual Assit for Visual Studio - if there are several files with one name then user choices one of them. This is so simple, so i don't understand why none of free IDEs has this feature.
This can be done with standard extension (cxx, cpp, cc and their couter parts h, hpp)
The reason it is not implemented is because this extension (ipp) is indeed non standard. Implementing this is easy - we just needed to know that it exists...

I can add it to git head, however, you will need to build codelite for this (which is easy on your OS, Ubuntu)
If you are willing to build codelite from sources, I will it now, otherwise, file a feature request
Eran
Make sure you have read the HOW TO POST thread
SteelRat
CodeLite Enthusiast
Posts: 17
Joined: Sat Dec 07, 2013 11:51 am
Genuine User: Yes
IDE Question: C++
Location: Russia
Contact:

Re: Non-standard header extension

Post by SteelRat »

Thank you for fast answer Eran. I'm feel so stupid because of my highlighting problem. =)
About building by myself. I'm using static non-monolithic libs wxWidgets 3.0 - there will be problems with it?
-----------------------
Core2Duo E6750, 6Gb RAM, Ubuntu 12.04, CodeLite 5.3-110
User avatar
eranif
CodeLite Plugin
Posts: 6375
Joined: Wed Feb 06, 2008 9:29 pm
Genuine User: Yes
IDE Question: C++
Contact:

Re: Non-standard header extension

Post by eranif »

SteelRat wrote:I'm using static non-monolithic libs wxWidgets 3.0 - there will be problems with it?
I think so. You can build wxWidgets as shared / multilib but do not run "sudo make install"
However, before building codelite, you just need that the correct wx-config is set in the PATH before running cmake
And when building codelite, you can run cmake with -DCOPY_WX_LIBS=1 (so codelite will copy the wx-3.0 libs into /usr/lib/x86_64-gnu-linux/codelite/)

See here:
http://codelite.org/Developers/Linux

See all CMake variables supported by codelite:
http://codelite.org/Developers/Linux#toc6
Eran
Make sure you have read the HOW TO POST thread
SteelRat
CodeLite Enthusiast
Posts: 17
Joined: Sat Dec 07, 2013 11:51 am
Genuine User: Yes
IDE Question: C++
Location: Russia
Contact:

Re: Non-standard header extension

Post by SteelRat »

Thanks, i will try. Can i use --disable-compat28?
-----------------------
Core2Duo E6750, 6Gb RAM, Ubuntu 12.04, CodeLite 5.3-110
User avatar
eranif
CodeLite Plugin
Posts: 6375
Joined: Wed Feb 06, 2008 9:29 pm
Genuine User: Yes
IDE Question: C++
Contact:

Re: Non-standard header extension

Post by eranif »

SteelRat wrote:Thanks, i will try. Can i use --disable-compat28?
Never tried it ... so I am not sure about it

Eran
Make sure you have read the HOW TO POST thread
SteelRat
CodeLite Enthusiast
Posts: 17
Joined: Sat Dec 07, 2013 11:51 am
Genuine User: Yes
IDE Question: C++
Location: Russia
Contact:

Re: Non-standard header extension

Post by SteelRat »

Well, with disabled compatibility there is error:

Code: Select all

[ 21%] Building CXX object CodeLite/CMakeFiles/libcodelite.dir/fileextmanager.cpp.o
[ 21%] Building CXX object CodeLite/CMakeFiles/libcodelite.dir/pptable.cpp.o
/home/steelrat/development/codelite-codelitegit/CodeLite/refactoring_storage.cpp: In member function ‘virtual void* CppTokenCacheMakerThread::Entry()’:
/home/steelrat/development/codelite-codelitegit/CodeLite/refactoring_storage.cpp:86:137: error: ‘wxPrintf’ was not declared in this scope
                         wxPrintf("%s | %s | %d\n", tokIter->getFilename().c_str(), tokIter->getName().c_str(), (int)tokIter->getOffset());
                                                                                                                                         ^
[ 21%] Building CXX object CodeLite/CMakeFiles/libcodelite.dir/event_notifier.cpp.o
Now i will try with enabled compatibility.
-----------------------
Core2Duo E6750, 6Gb RAM, Ubuntu 12.04, CodeLite 5.3-110
SteelRat
CodeLite Enthusiast
Posts: 17
Joined: Sat Dec 07, 2013 11:51 am
Genuine User: Yes
IDE Question: C++
Location: Russia
Contact:

Re: Non-standard header extension

Post by SteelRat »

I successfully built and installed Codelite. On pressing F12 IDE asks me to create matched file. =(

ps
By the way, can i use "Add existing file..." to add files and files from subdirs and create virtual folders as real subdirs? It may be very useful to start Codelite project for existring large project.
-----------------------
Core2Duo E6750, 6Gb RAM, Ubuntu 12.04, CodeLite 5.3-110
User avatar
eranif
CodeLite Plugin
Posts: 6375
Joined: Wed Feb 06, 2008 9:29 pm
Genuine User: Yes
IDE Question: C++
Contact:

Re: Non-standard header extension

Post by eranif »

Do git pull now. I have added "*.ipp" to the default lexer extension + make it work with swap files
SteelRat wrote:By the way, can i use "Add existing file..." to add files and files from subdirs and create virtual folders as real subdirs? It may be very useful to start Codelite project for existring large project.
Right click on project and select "Import files from directory"

Eran
Make sure you have read the HOW TO POST thread
SteelRat
CodeLite Enthusiast
Posts: 17
Joined: Sat Dec 07, 2013 11:51 am
Genuine User: Yes
IDE Question: C++
Location: Russia
Contact:

Re: Non-standard header extension

Post by SteelRat »

Eran, where were you yesterday? :D I've added all files by hands, dir by dir. =)
-----------------------
Core2Duo E6750, 6Gb RAM, Ubuntu 12.04, CodeLite 5.3-110
Post Reply