Page 1 of 1

Code Completion in Codelite 5.3

Posted: Sat Oct 26, 2013 9:44 pm
by ColinTaylor
Windows 7, 64-bit
Codelite installed from codelite-5.3-mingw4.7.1

Since I upgraded to Codelite 5.3 code completion hasn't worked, and it worked very well on 5.2 and earlier. At the point where code completion would normally offer a list of completions, I get an error stating "This file requires compiler and library support for C++ 2011 blah blah blah".

Things I've tried so far

Workspace->Retag Workspace (full)
Workspace->Retag Workspace (quick)
Complete rebuild of workspace

In Settings->Tags settings ->Clang ..., the checkbox "Enable clang code completion" is checked, and all the listed paths in that dialog box look ok and are the same as under codelite 5.2. I've tried it with the "only use clang code completion" both checked and unchecked.

Please can someone tell me the necessary settings/actions in order to get code completion working again?
Cheers, Colin

Re: Code Completion in Codelite 5.3

Posted: Sat Oct 26, 2013 11:30 pm
by eranif
What are the search paths set up for your code completion?
You can look them here:

Settings -> Tags Settings -> CTags -> Search Paths

Eran

Re: Code Completion in Codelite 5.3

Posted: Sun Oct 27, 2013 12:28 am
by ColinTaylor
Thanks, you've pointed me at the answer to the problem

The first line on the search paths was
E:\Dev\wxWidgets-2.9.4\include
, and when I updated that to
E:\Dev\wxWidgets-2.9.5\include
, code completion started working again.

I had no idea that the ctags settings were so important, because I checked the 'Enable clang code completion' I sort of assumed this would override any ctags settings!

That's certainly one to remember for future releases, thanks again :)

Re: Code Completion in Codelite 5.3

Posted: Sun Oct 27, 2013 12:33 am
by eranif
ColinTaylor wrote:I had no idea that the ctags settings were so important, because I checked the 'Enable clang code completion' I sort of assumed this would override any ctags settings!
In 99.9% of the cases codelite will be using the in-house code completion engine. Even when you enable clang, it will be only be used as a fallback engine
So in fact, ctags (its not really ctags, its just an historical name ;)) is the important one

Some notes about clang with codelite:
http://codelite.org/LiteEditor/ClangIntegration41
Eran

Re: Code Completion in Codelite 5.3

Posted: Wed Oct 30, 2013 2:10 pm
by evstevemd
eranif wrote:
ColinTaylor wrote: Even when you enable clang, it will be only be used as a fallback engine
So in fact, ctags (its not really ctags, its just an historical name ;)) is the important one
Eran
Hi Eran,
Ctags is a confusing name.
I was battling with same problem because I didn't though Ctags is that much important.
Think of changing names.

Another thing is, why should I fill include path in both Clang and Ctags if that is the case?
Why not have single place?

Re: Code Completion in Codelite 5.3

Posted: Wed Oct 30, 2013 6:06 pm
by eranif
evstevemd wrote:Another thing is, why should I fill include path in both Clang and Ctags if that is the case?
In fact, clang does not need this (at least not under Linux). You can leave it empty under linux and it will work since in codelite, the include paths used for clang are taken from the actual compilation line ( codelite manages a compilation database where it stores the exact compilation line needed for every file in the workspace)
and when code completion is required, codelite passes these arguments to clang. The only reason its there is for adding the default include paths (C:\MinGW\include etc) for _Windows_ , otherwise, clang will not were to look for the standard headers

ctags on the other hand, is a less sophisticated so codelite needs to "crawl" into header files and extract list of files to passed to codelite-indexer (which indexes them and store the result into the database)

Eran

Re: Code Completion in Codelite 5.3

Posted: Thu Oct 31, 2013 12:59 am
by evstevemd
eranif wrote:
evstevemd wrote:Another thing is, why should I fill include path in both Clang and Ctags if that is the case?
The only reason its there is for adding the default include paths (C:\MinGW\include etc) for _Windows_ , otherwise, clang will not were to look for the standard headers
Eran
I see thaks for clarification.
My Point is, if Clang and Ctags headers are the same (which is for all my cases and I guess all users) why not share?
I mean when Clang needs them it will find them in Ctags Tab than having duplicate tabs that add confusion to user :oops:

Else your explanations are super clear :)