Recent Changes - Search:

Home Page


Main

Downloads
Windows
macOS
Linux (via apt / rpm )
Linux wxWidgets
Release Notes

Wiki
Documentation
FAQ

Build CodeLite
Linux
Windows
macOS

Devs
Debug CodeLite Linux
Building Clang
Build wxWidgets (MSW)
Coding Guidelines
Create a Plugin

FileSystemWorkspace


General


In CodeLite 13.0.3 a new workspace was introduced, the File System Workspace This workspace is for the C and C++ languages

When to use?


The workspace is intended for people who wish to use CodeLite for viewing, editing, debugging and code completion of an existing code base.
The tree view is filled automatically; there is no need to add files manually. Therefore it is very suitable for huge code bases.

The tree view


Unlike the default C/C++ workspace, this workspace offers no projects but is merely a reflection of the file system's current directory structure.
Also, any action on any folder in the tree view is applied to the file system (e.g. delete a file, folder etc).

Set up


  • From the Workspace menu, select New workspace
  • In the dialog that appears, select File System Workspace
  • Next, choose the folder containing your source code
  • Give the workspace a name and click OK
  • You are all set up

Workspace settings


Now that you have setup a workspace, it's time to configure it.

Build


  • Click on the wrench icon or right-click on the top folder in the tree view and select Settings...
  • Select the Build tab
  • By default, there are 2 targets which can not be deleted: build and clean. To edit their commands, double-click an entry or select it in the table view and click on the Edit button
  • You can now add more targets by clicking on the New button. The working directory for every command is the top level folder of the workspace.
    To use a different working directory use shell syntax. Ror example, to cd to /home/eran/some/path and execute make -j16, use the following as the target command:
cd /home/eran/some/path && make -j16
  • All the build targets are accessible from the drop-down menu of the Build button

Code Completion


By default the Code-Completion engine will parse all the files found in the Workspace View. However, for code-completion of third party libraries (such as wxWidgets) you need to provide the include paths.

  • Open the workspace settings as described above, but this time select the Code Completion tab
  • In the text control, type the paths for the third party libraries. This page also accepts environment variables and backticks. For example, to get code completion for wxWidgets in Linux, just add the following line:
`wx-config --cflags`
  • If you have other third party libraries with custom paths (for example under your $HOME directory), you can add them like this:
`wx-config --cflags`
-I$HOME/my/library/include

Notice the -I before the path

  • The File System Workspace also supports code completion by clangd via the Language Server plugin. Just make sure you enable use this content to create a compile_flags.txt file
Edit - History - Print - Recent Changes - Search
Page last modified on September 21, 2019, at 09:40 PM