Page 1 of 1

Tagging custom folder not working

Posted: Mon Jan 03, 2011 9:27 pm
by peterv
Hi,

I use a c++ library (juce, from http://www.rawmaterialsoftware.com) and used to add its path to the workspace settings (parse include files) to have code completion. Somehow codelite does not read the include files anymore, resulting in not having code completion for this library.
It worked before (i did not touch codelite for the last two weeks) but now it does not read in the files.

I am on Ubuntu 10.10 with the latest codelite svn version built from source.

Any suggestions?

Thanks,
peter

Re: Tagging custom folder not working

Posted: Mon Jan 03, 2011 11:47 pm
by eranif
Have you tried "Full Retagging" ? (from the main menu: 'Workspace | Retag workspace (full)')

Also, make sure that the include files' directory are set properly in the:
'Settings | Tags Settings | Include Files'

Eran

Re: Tagging custom folder not working

Posted: Tue Jan 04, 2011 5:24 am
by peterv
Thank you for your quick response.

I tried all your suggestion but it does not work. With all my other projects adding include paths for parsing is working just not for the juce library. To make things more complicated i include the amalgamated version of the library but I include the sources to the tags parser. As I mentioned, this worked before. The other strange thing is that if I also include a subdirectory of the juce source folder, codelite parses the amalgamated file which is in the parent folder of the juce source folder which is actually the file that I include in my project. With this code completion works.
Does Codelite only parsing files which I include in my project with #include? Did something changed in the last two weeks regarding the tagging?

I got completion now working somehow but it is not really a clean solution and I dont understand how the parser includes files.

Sorry for the amount of questions and that this is so complicated. I really like codelite. I switched from codeblocks to codelite a while ago.

You do a great work and please keep it up.

Thanks,
Peter

Re: Tagging custom folder not working

Posted: Tue Jan 04, 2011 12:58 pm
by eranif
peterv wrote:Does Codelite only parsing files which I include in my project with
No, it will also try to parse include files from your code according to the 'include files' set

If the parsing fails, then it means the include files is not set properly

It will be helpful if you could provide steps for me to reproduce it (detailed instructions)
Eran

Re: Tagging custom folder not working

Posted: Mon Jan 10, 2011 1:52 am
by peterv
Hi Eran,

sorry for my late response. My setup is quite complicated for just descibing it without an example. You can download an example project with the project structure for linux here:
http://www.box.net/shared/91ggxduf57
I use a codelite workspace with a project that is configured as custom makefile project

the folder structure looks like this:
project root/
--juce/ (the library i use)
--workspace/
----(codelite worspace file)
--project/
----Source/
----TestJuceApp/
------JuceLibraryCode
------Builds/
--------Linux/
----------Makefile
----------(codelite project file)

As mentioned above I use a custom makefile codelite project. I include the library with the file projectroot/project/TestJuceApp/JuceLibraryCode/JuceHeader.h which includes the amalgamated file in projectroot/juce/juce_amalgamated.h.

When I include the projectroot/juce/src folder in workspace settings to the parser include paths, codelite does not parsing this folder. If I include a subfolder of projectroot/juce/src then it parses the amalgamated file in projectroot/juce/juce_amalgamated.h. It is really strange, but then of course codecompletion works.

I hope my explenation is understandable.

Thanks,
peter

Re: Tagging custom folder not working

Posted: Mon Jan 10, 2011 2:26 am
by eranif
Thanks for the sample project.

I did the following:
extract the tgz file to C:\users\eran\Desktop

so your sample directory is located under:
C:\Users\eran\\Desktop\codelite_parser_test

I noticed that in your code you are setting the include statement like this:

Code: Select all

#include "../../../juce/juce_amalgamated.h"
the parser logic is simple:
- Try to locate the file in the #include statement by perpending the include paths provided - when the first match is found, stop searching and parse it.
so, to make the file a valid file, I needed to add a path that will make the include statement a valid path - this was done by adding

Code: Select all

C:\Users\eran\Desktop\codelite_parser_test\project\TestJuceApp\JuceLibraryCode\

to the include path.

when you combine both you end up with this file path:

Code: Select all

C:\Users\eran\Desktop\codelite_parser_test\project\TestJuceApp\JuceLibraryCode\../../../juce/juce_amalgamated.h
which is a valid file that codelite can locate and parse.

(If I was not clear: adding the above path fixed the problem)
Eran

Re: Tagging custom folder not working

Posted: Mon Jan 10, 2011 4:26 am
by peterv
Hi Eran,

That was is.
I tried this and now codelite parses the the files and code completion works.

Thank you very much for your help and quick response!

Peter