Notice: This Wiki is now read only and edits are no longer possible. Please see: https://gitlab.eclipse.org/eclipsefdn/helpdesk/-/wikis/Wiki-shutdown-plan for the plan.
Difference between revisions of "Linux Tools Project/LTTng Eclipse Plug-in Development Environment Setup"
(precisions thanks to Patrick Tasse) |
|||
Line 1: | Line 1: | ||
This page describes how to setup LTTng Eclipse Plug-in development environment. | This page describes how to setup LTTng Eclipse Plug-in development environment. | ||
− | = | + | = Get the Eclipse SDK = |
Under eclipse.org downloads, select Eclipse Classic archive. Uncompress and | Under eclipse.org downloads, select Eclipse Classic archive. Uncompress and | ||
Line 10: | Line 10: | ||
$ ./eclipse | $ ./eclipse | ||
− | = | + | = Install dependencies = |
Two dependencies are required: Remote System Explorer (RSE) and Antlr. Here is | Two dependencies are required: Remote System Explorer (RSE) and Antlr. Here is | ||
Line 26: | Line 26: | ||
** Click on "Available Software Sites" | ** Click on "Available Software Sites" | ||
** Search for the Orbit repository. | ** Search for the Orbit repository. | ||
− | ** If more than one site appears, select one. The procedure has been tested with this URL: | + | ** If more than one site appears, select the latest one. The procedure has been tested with this URL: |
http://download.eclipse.org/tools/orbit/downloads/drops/R20120119162704/repository | http://download.eclipse.org/tools/orbit/downloads/drops/R20120119162704/repository | ||
Line 35: | Line 35: | ||
** Restart Eclipse. | ** Restart Eclipse. | ||
− | = | + | = Get the source code for org.eclipse.linuxtools = |
Use your git client (or better yet, use EGit) to clone the source repository in your workspace. | Use your git client (or better yet, use EGit) to clone the source repository in your workspace. | ||
Line 42: | Line 42: | ||
$ git clone git://git.eclipse.org/gitroot/linuxtools/org.eclipse.linuxtools.git | $ git clone git://git.eclipse.org/gitroot/linuxtools/org.eclipse.linuxtools.git | ||
− | = | + | = Import LTTng projects into the workspace = |
− | Only projects related to LTTng 2.0 should be imported. For legacy LTTng, TCF | + | Only projects related to LTTng 2.0 should be imported. For legacy LTTng, a TCF |
dependency is also required. To avoid this dependency and because the legacy | dependency is also required. To avoid this dependency and because the legacy | ||
− | LTTng will | + | LTTng will soon be deprecated, the procedure is limited to LTTng 2.0. |
* Select "File -> Import..." | * Select "File -> Import..." | ||
* Select "General -> Existing Projects into Workspace" | * Select "General -> Existing Projects into Workspace" | ||
* Select the lttng root directory: workspace/org.eclipse.linuxtools/lttng | * Select the lttng root directory: workspace/org.eclipse.linuxtools/lttng | ||
− | * Then disable all | + | * Then disable all org.eclipse.linuxtools.lttng.* projects (keep the *.ctf.*, *.tmf* and *.lttng2.* ones) |
* Click Finish. | * Click Finish. | ||
* Rebuild the workspace. | * Rebuild the workspace. | ||
− | = | + | = Define an API baseline = |
Eclipse may complain about a missing API baseline. These errors can be safely ignored by performing this procedure: | Eclipse may complain about a missing API baseline. These errors can be safely ignored by performing this procedure: | ||
Line 64: | Line 64: | ||
The environment should be set at this point. | The environment should be set at this point. | ||
+ | |||
+ | = Run the plugins = | ||
+ | |||
+ | To run the code, right-click one of the imported plugins (for example, the o.e.l.tmf.core one) and select "Run As..." -> "Eclipse Application". This will start a nested Eclipse with the plugins loaded. |
Revision as of 10:37, 7 May 2012
This page describes how to setup LTTng Eclipse Plug-in development environment.
Contents
Get the Eclipse SDK
Under eclipse.org downloads, select Eclipse Classic archive. Uncompress and start Eclipse. Example for Linux:
$ tar xzvf eclipse-SDK-3.7.2-linux-gtk-x86_64.tar.gz $ cd eclipse $ ./eclipse
Install dependencies
Two dependencies are required: Remote System Explorer (RSE) and Antlr. Here is how to install them. Notice that RSE is named Target Management on the Eclipse website.
- RSE
- Select "Help -> Install New Software..."
- Select the current Eclipse release repository (e.g. Indigo)
- Select "General Purpose Tools -> Remote System Explorer End-User Runtime"
- Install the package. It's not necessary to restart Eclipse at this point.
- Antlr
- Select "Help -> Install New Software..." again
- Click on "Available Software Sites"
- Search for the Orbit repository.
- If more than one site appears, select the latest one. The procedure has been tested with this URL:
http://download.eclipse.org/tools/orbit/downloads/drops/R20120119162704/repository
- Click OK, then select the Orbit repository in the drop-down list.
- Select "All Orbit Bundles -> ANTLR Runtime 3.2.0"
- Install the package.
- Restart Eclipse.
Get the source code for org.eclipse.linuxtools
Use your git client (or better yet, use EGit) to clone the source repository in your workspace.
$ cd workspace $ git clone git://git.eclipse.org/gitroot/linuxtools/org.eclipse.linuxtools.git
Import LTTng projects into the workspace
Only projects related to LTTng 2.0 should be imported. For legacy LTTng, a TCF dependency is also required. To avoid this dependency and because the legacy LTTng will soon be deprecated, the procedure is limited to LTTng 2.0.
- Select "File -> Import..."
- Select "General -> Existing Projects into Workspace"
- Select the lttng root directory: workspace/org.eclipse.linuxtools/lttng
- Then disable all org.eclipse.linuxtools.lttng.* projects (keep the *.ctf.*, *.tmf* and *.lttng2.* ones)
- Click Finish.
- Rebuild the workspace.
Define an API baseline
Eclipse may complain about a missing API baseline. These errors can be safely ignored by performing this procedure:
- Select "Window -> Preferences -> Plug-in Development -> API Baselines"
- Under "Options -> Missing API baseline:" select "Ignore"
- Click "OK"
The environment should be set at this point.
Run the plugins
To run the code, right-click one of the imported plugins (for example, the o.e.l.tmf.core one) and select "Run As..." -> "Eclipse Application". This will start a nested Eclipse with the plugins loaded.