Eclipse IDE Integration

LSP Plugins may be easily developed using Eclipse IDE

Configuring project and build

First of all, you need to install the following plugins:

First of all, you need to checkout GIT repository into your workspace by issuing the following command:

cd <workspace-path>
git clone https://github.com/sadko4u/lsp-plugins.git lsp-plugins
cd lsp-plugins
git checkout -b <your-branch> origin/devel

Now we can switch to C++ development perspective by selecting WindowPerspectiveOpen PerspectiveOther...

After switching to C/C++ perspective, select FileNewC/C++ Project

In the opened dialog, select C++ Managed Build template, then click Next

Enter the folder name same to the folder of the GIT repository, select ExecutableEmpty Project, Linux GCC, then click Finish

Now, complete project structure is visible in the Project explorer view.

We just need to configure project build. For this case, select ProjectProperties menu, the project configuration dialog should appear:

Go to C/C++ BuildSettings and, first of all, select Configuration combo to [ All Configurations ], this will apply all modified settings to all build targets.

Select GCC C++ CompilerDialect section and select the ISO C++98 as a Language Standard:

Select GCC C++ CompilerPreprocessor section and add following macros to Defined Symbols:

Finally, the window should look like:

Now we need to define additional location of header files. Select GCC C++ CompilerIncludes and add to the Include paths the following line:

${workspace_loc:/${ProjName}/include}

The window should look like:

Now we need to enable extra headers for additional packages, for this purpose visit GCC C++ CompilerMiscellaneous and enter into the Other flags field the following string:

-c -fmessage-length=0 -m64 -msse -msse2 `pkg-config --cflags jack x11 cairo lv2 sndfile gl`

Also, check the Position Independent Code (-fPIC) flag:

Select GCC C++ LinkerGeneral settings and enable the Support for pthread (-pthread) option:

Select GCC C++ LinkerLibraries settings and add the following libraries to the list:

Select GCC C++ LinkerMiscellaneous settings and enter the following string to Linker flags field to enable linkage with external libraries:

`pkg-config --libs jack x11 cairo lv2 sndfile gl`

The window should look like:

To make resources generated by makefile invisible to IDE, we need to add .build path as excluded from source tree. For this purpose, visit ResourceResource Filters, click Add Filter

Set Filter type to Exclude all, Applies to - Folders, All children (recursive), Name Matches .build. The result should look like:

To optimize build, we can enable more than one thread for build. For this purpose, select C/C++ BuildBehavior and click Enable Parallel Build, Use optimal jobs:

Now we can click Apply and Close button and launch build by issuing ProjectBuild menu item.

Debugging Project

To start debugging, simply issue RunDebug asLocal C/C++ Application, Eclipse IDE will automatically create configuration for launching build that can be reused in future.

The main() function launches testing subsystem, so in console output we will get the following string:

USAGE: {utest|ptest|mtest} [args...] [test name...]

Now we can edit configuration by selecting RunDebug Configurations... and pass additional parameters to unit testing subsystem. Select the generated lsp-plugins debug profile, Arguments tab and enter testing subsystem command-line arguments. For example, the following:

mtest --nofork --debug standalone --args impulse_reverb_stereo

It will look like:

Now click Apply and Debug buttons to start debugging. The example command line will start a standalone Impulse Reverb Stereo plugin that runs under JACK server:

Happy Development!