Building Preesm

The following topics are covered in this tutorial:

  • Installation of Eclipse and all necessary plug-ins
  • Retrieving the source code for Preesm and related projects
  • Execution of Preesm

Prerequisite: Install and Configure git

Note: if you need to work with Graphiti and/or DFTools source code, please read these instructions first.

Tutorial created the 04.24.2012 by M. Pelcat
Updated the 04.19.2017 by A. Morvan

Eclipse installation

Follow the instructions of the Eclipse Preparation tutorial to obtain an Eclipse installation, in which you will install all necessary tools for Preesm development.

Install XTend, GEF SDK, Graphiti, Maven, DFTools, ...

  1. Go to "Help > Install New Software...";
  2. In "work with:", add a new location named "Preesm" with location ""
  3. Select the "Developper Resources > PREESM  Developper Requirements (Meta Feature)"
    (this Eclipse feature contains all requirements for developping Preesm)
  4. Click Next twice, agree on the terms of the license, and click on Finish to install the features. This step will take a few minutes.
  5. During the installation process, a security warning for unsigned content will appear. Click on OK to continue the installation.
  6. Restart eclipse to complete the installation.

Import Preesm projects

You need to get the code from the git repository and import the projects into Eclipse. Our git repository is hosted by Github (see the Preesm team page on Github).

Clone the following repository (git clone <url>, in the folder where you want to place your local repository):

  • Preesm: (https) or (SSH)

Switch to the develop branch (git checkout develop) to get the latest developer version of our source.

Connect your local repository obtained through git clone to your Eclipse workspace

  • Window > Perspective > Open Perspective > Other ... then select Git
  • Add an existing local repository to this view (GIT button with a green plus symbol), then browes to the local repositories
  • Check the box and click on finish.

Import the projects :

  • In the Java perspetive, clic on File > Import... then Maven > Existing Maven Projects;
  • In the next window, browse to the git repository location (the Preesm root folder);
  • The project import wizard should automatically find all the projects;
    • Note : releng/* projects are for Release Engineering, and can be omitted.
  • Clic on finish.

Compilation of Preesm

Change perspective
For a better user experience in eclipse, we strongly advice that you use the "Plug-In Development" perspective of eclipse. To use this perspective, select "Plug-In Development" in Windows > Open Perspective > Others...

If there still are errors after applying the previous operations, try again to clean, refresh and build the projects.

Preesm Development

The Preesm code base respects some coding policy. If you intend to develop within Preesm, we strongly advise you to follow these policy to prevent the continuous integration server to reject your contributions. These policies are simple :

  1. Follow the checkstyle format provided in the git repository (./releng/VAADER_checkstyle.xml);
  2. Make sure all the tests run without failure (run 'mvn clean integration-test' in the root folder of the git repository.

To help enforcing the checkstyle format, you can enable the "on-the-fly" checkstyle analyser using the Eclipse plug-in (automatically installed with the meta feature, but not configured), and enable the automatic format and cleanup refactoring tools of Eclipse:

On-the-fly checkstyle feeedback

  1. Window > Preferences, then on the left list clic on Checkstyle;
  2. In the "Global Check Configuration" frame, click on new;
  3. In the opened wizard, set Type to 'Project Relative Configuration', and select the location
    and name it as you please (i.e. 'IETR'), then clic on OK;
  4. Make it the default global configuration by clicking on "Set as Default";
  5. Click on OK to close the Preference window, rebuild the project if asked;
  6. Finally select all the projects in the workspace (all Preesm plugins), right-click on them, and select Checkstyle > Activate Checkstyle.

Automatic Format and Cleanup setup

  1. In any perspective, clic on File > Import ... then General > Preferences
  2. Browse the Git repository until /releng/ to find the 'VAADER_eclipse_preferences.epf' file;
  3. Make sur 'Import all' is checked, and click on Finish.

With this setup, checkstyle will show errors directly in the Eclipse editor when some code does not respect the coding policy, and Eclipse offers to fix most of the issues automatically by using the cleanup functionality from the Java perspective (right clic on a Java resource > Source > Clean Up).

Execution of Preesm

In the Java or 'Plug-in Development' perspective, right-click on the 'org.ietr.preesm.ui' plug-in, the clic on Debug As > Eclipse Application. A new Eclipse session is launched that behaves like the one obtained by Preesm users from the update site. The difference is that you can debug and modify code in the first Eclipse and test at the same time in the second Eclipse. You can see the tutorials to learn how to use the second Eclipse, import Preesm projects and test.