Page 1 of 2

Non-standard header extension

Posted: Sat Dec 07, 2013 12:06 pm
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.

Re: Non-standard header extension

Posted: Sat Dec 07, 2013 12:17 pm
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

Re: Non-standard header extension

Posted: Sat Dec 07, 2013 1:01 pm
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?

Re: Non-standard header extension

Posted: Sat Dec 07, 2013 6:37 pm
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

Re: Non-standard header extension

Posted: Sat Dec 07, 2013 7:26 pm
by SteelRat
Thanks, i will try. Can i use --disable-compat28?

Re: Non-standard header extension

Posted: Sat Dec 07, 2013 7:52 pm
by eranif
SteelRat wrote:Thanks, i will try. Can i use --disable-compat28?
Never tried it ... so I am not sure about it

Eran

Re: Non-standard header extension

Posted: Sat Dec 07, 2013 8:42 pm
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.

Re: Non-standard header extension

Posted: Sat Dec 07, 2013 9:28 pm
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.

Re: Non-standard header extension

Posted: Sat Dec 07, 2013 10:00 pm
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

Re: Non-standard header extension

Posted: Sat Dec 07, 2013 10:08 pm
by SteelRat
Eran, where were you yesterday? :D I've added all files by hands, dir by dir. =)