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

Tutorial created the 04.24.2012 by M. Pelcat

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

  1. Go to "Help > Install New Software...";
  2. In "work with:", select the proposed Neon update site;
  3. Select the "Programming Languages >Xtend IDE";
  4. Select "Modeling > GEF (MVC) SDK";
  5. Select "Modeling > Graphiti SDK Plus (Incubation)";
  6. Click Next, and Finish, Install the features;
  7. Restart Eclipse.

Import Graphiti, DFTools and Preesm projects

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

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

  • Preesm: https://github.com/preesm/preesm.git (https) or git@github.com:preesm/preesm.git (SSH)
  • DFTools: https://github.com/preesm/dftools.git (https) or git@github.com:preesm/dftools.git (SSH)
  • Graphiti: https://github.com/preesm/graphiti.git (https) or git@github.com:preesm/graphiti.git (SSH)

Switch to the develop branch of each of the repositories (git checkout develop) to be sure to get the latest developer version of our sources.

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

  • Open Perspective > Git Repository Exploring
  • Add an existing local repository to this view (GIT button with a green plus symbol), then browes to the local repositories

Import the projects from the following directories:

  • Graphiti repository: plugins & bundles directories
  • DFTools repository : eclipse/plugins directory
  • Preesm repository: plugins directory

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...

Remove warnings
When compiling the projects, the following warning may appear:
Description Resource Path Location Type Build path specifies execution environment JavaSE-1.6. ...
To remove this warning:

  1. Go to Windows > Preferences
  2. In the Preferences windows, go to Java > Compiler > Building
  3. Expand section "Build path problems"
  4. Change "No strictly compatible JRE..." to ignore

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

Execution of Preesm

  1. Go to Run > Debug Configurations > Eclipse Application
  2. Click right on "Eclipse Application" and click New
  3. In "Arguments", add -XX:MaxPermSize=256m
  4. Click Debug

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.