From The Document Foundation Wiki
Jump to: navigation, search

SlickEdit is a commercial, advanced text editor that has built-in project management features. It is especially suited for large-scale C/C++ proejcts such as the LibreOffice source tree.

How to set up SlickEdit to manage LibreOffice source tree

The recommended way to set up SlickEdit to manage LibreOffice is as follows.

Set up an empty workspace

Go to Project - New... and click on the Workspace tab. Select Blank Workspace, set a good workspace name (such as libreoffice-master), then set the path to the workspace to be the root of the libreoffice source tree + /slickedit. For instance, if your source tree is located in /home/foo/libo/master, then set the path to the workspace to be /home/foo/libo/master/slickedit. When the editor asks you to create a new directory because it doesn't exist yet, select yes to create the directory. This will create a new workspace file (.vpw) under that directory.


Add projects to the workspace

Once you have an empty workspace set up, it's time to add projects to this workspace. It's best to use a single project to manage a single module i.e. have a project for sc, another project for svx, and another for sal, and so on.

To add a new project, have that empty workspace you've just created open, and go to Project - New..., check Add to current workspace check box on, type in the name of the module (sc, sal, sw etc) into the Project name box. In the Project Type window , select Other C/C++ as the project type. Make sure that you leave the "Create project directory from project name" check box unchecked, and that the location points to the same directory as your workspace. Then click OK to proceed.


It now asks you to add files to the project. To do it, click Add Tree to launch the "Add Tree" dialog. Set the path to the base project directory (for sc, it should be <root dir>/sc, and so on), specify the file types to include all used file extensions (*.c;*.cc;*.cpp;*.cp;*.cxx;*.h;*.hh;*.hpp;*.hxx;*.inl;*.xpm;*.hrc;*.src;*.xcu;*.xcs;*.hdl is a good one to use), make sure the Recursive check box is checked, then click OK. You will have to manually add several extensions that this project uses, such as *.hrc, *.src, *.hdl and so on which the default option doesn't include.

Repeat the above process for all the modules you want to manage.

What projects to add to workspace


First off, you shouldn't add all modules in the libreoffice source tree to the workspace, since that would overwhelm SlickEdit's tag database, and will slow down the editor. Instead, we recommend that you only add modules that are relevant to the work you are doing.

For instance, if you are working on the Calc part of the code base, it's sufficient to only add sc, formula, and sal. The sal module includes definitions to the rtl::OUString and rtl::OUStringBuffer classes as well as rtl::math functions, so it's good to add that project to the workspace no matter which area you work in.

If you use UNO API's a lot, then it's a good idea to add solver as a project, but only add files that are under solver/<inpath>/inc/offapi and solver/<inpath>/inc/udkapi to enable auto completions of UNO structs, enums, constants and so on. Make sure you add *.hdl files as well as *.hpp files under these directories.

If you work on a wide range of areas, then it's recommended that you set up multiple workspaces for different areas of focus. Switching between workspaces is very fast in SlickEdit, so this set up should not cause any loss of workflow efficiency.

How to update the workspace tag database

SlickEdit uses one tag database per workspace to allow context-sensitive source code navigation. The tag database file is named after the workspace name, located in the same directory where the worksapce file is, and it has a .vtg extension. It so happens that, when you update your git tree, the source code is updated, but your tag database isn't. To update your tag database,

  1. Close the editor.
  2. Remove the .vtg file under the workspace directory.
  3. Re-open the editor.

Once the editor sees the the tag file is missing for the workspace, it will re-tag the entire workspace.