2.2 Setting up the Workspace for Java Projects

Objectives for this tutorial:

2.2.1 Create Library, Tutorial and Simulator Projects

After installation of eclipse and the eTrice plug in, your workspace should look like this:

PIC

Just the eTrice menu item is visible of the installed eTrice plugins.

Select the menu File->New->Other

PIC

Open the eTrice tab and select eTrice Java Runtime

Press Next and Finish to install the Runtime into your workspace.

PIC

Do the same steps for eTrice Java Modellib, eTrice Java Tutorials and eTrice Trafficlight for Tutorials. To avoid temporary error markers you should keep the proposed order of installation. The resulting workspace should look like this:

PIC

2.2.2 Perform Setup Test

To check the correct setup of your workspace we run a little testproject contained in the tutorial project.

The tutorial models are available in the org.eclipse.etrice.tutorials.java project. All tutorials are ready to generate and run without any changes. To test the code generator and the workspace setup simply run gen_SetupTestJava.launch as gen_SetupTestJava:

PIC

The successful generation ends with Info: – finished code generation in the Console.

PIC

For each tutorial in the folder src-gen a java package is generated including a java file called SubSys<...>Runner.java . To run the generated application simply run this file as a java application. Try this with the file src-gen/SetupTest_Model/SubSysClass1Runner.java :

PIC

To stop the application type quit in the console window. If your Console contains the lines

******************  
*** Setup OK ***  
******************

your setup should be ok.

PIC

Now the workspace is set up and you can perform the tutorials or start with your work.