Downloads
Wiki
Build CodeLite
Devs
|
Main /
SettingUpCodeCompletionChanges from CodeLite 1.0.XXXXAs of CodeLite 2.0, CodeLite no longer uses an external symbols database for code completing symbols which are not part of your workspace (e.g. fprintf(), wxString etc.). It is now using a 'File Crawler' to locate all the files that need to be parsed, based on the include statements found in your source files. As a result, the code-completion in codelite 2.0 is faster and allows the user to add as many third party libraries as he wishes, without needing to worry about the database size. Configuring the ParserIn most cases, when starting codelite, codelite will auto-detect some basic paths and will add them to the parser include path. Note that these paths are used to locate potential include files. However CodeLite doesn't immediately scan all the include files that it finds; only the ones that are referenced by your code. The global parser search paths can be reconfigured from the 'Settings > Tags Settings > Include Files' tab (as seen in the next picture), however, as of build 3413 codelite also offer a per-workspace paths settings, this is configurable by right clicking on the workspace icon in the file view, and selecting 'Workspace Settings' The 'Include Files' page, has two sections:
#include <string> int main(int argc, char **argv) { std::string str = "hello world"; return 0; } Now when the user saves the file, the parser thread kicks in and does the following:
So from this point on, codelite knows about std::string
Key Notes:
Retag Workspace is your friendUnder the 'Workspace' menu, there are 2 new options:
The first option creates a list of all files which are relevant to the workspace (including any 'include' file) and then removes from that list any file which was recently tagged and is up-to-date. The files which remains in the list are then parsed. The second option clears the symbols database and re-create it from scratch (all files are re-parsed). Many code-completion problems can be solved by simply 'retagging the workspace'! Tip: How to quickly add or exclude paths in the parserFor CodeLite < build 3413: You can use the 'Explorer' tab to quickly add / exclude paths by right-clicking the folder in the 'Explorer' tree and from the context menu select Tags -> Add this path to the parser search path or Tags -> Add this path to the parser exclude path This will add For CodeLite >= build 3413: As of build 3413, the context menu of the 'Explorer' tab, has been slightly modified to support the new per-workspace parser paths settings, as seen in the picture below: |