Skip to main content
aboutsummaryrefslogtreecommitdiffstats
blob: 4cb7d3cb64232f14acfc487c28e7c4b9ef67625f (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
\section{Setting up the Workspace for Java Projects}

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

\includegraphics[width=0.8\textwidth]{images/013-SetupWorkspace01.png}
% !images/013-SetupWorkspace01.png!

Just the \textit{\eTrice{}} menu item is visible of the installed \eTrice{} plugins.

Select the menu \textbf{File->New->Other}

\includegraphics[width=0.8\textwidth]{images/013-SetupWorkspace02.png}
% !images/013-SetupWorkspace02.png!

Open the \textit{\eTrice{}} tab and select \textit{\eTrice{} Java Runtime}

Press \textit{Next} and \textit{Finish} to install the Runtime into your workspace.

\includegraphics[width=0.8\textwidth]{images/013-SetupWorkspace03.png}
% !images/013-SetupWorkspace03.png!

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

\includegraphics[width=0.8\textwidth]{images/013-SetupWorkspace04.png}
% !images/013-SetupWorkspace04.png!

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

The tutorial models are available in the \textit{org.eclipse.etrice.tutorials.java} project. All tutorials are 
ready to generate and run without any changes. To start the code generator simply run 
\textbf{gen\_org.eclipse.etrice.tutorials.java.launch} as \textbf{gen\_org.eclipse.etrice.tutorials.java}: 

\includegraphics[width=0.8\textwidth]{images/013-SetupWorkspace05.png}
% !images/013-SetupWorkspace05.png!

The successful generation ends with \emph{Info: -- finished code generation} in the Console.

\includegraphics[width=0.8\textwidth]{images/013-SetupWorkspace051.png}
% !images/013-SetupWorkspace051.png!


For each tutorial in the folder src-gen a java package is generated including a java file called 
\textbf{SubSystem\_<Modelname>Runner.java} . To run the a generated application simply run this file as a java application:

\includegraphics[width=0.8\textwidth]{images/013-SetupWorkspace06.png}
% !images/013-SetupWorkspace06.png!

To stop the application type \textit{quit} in the console window.
 
\includegraphics[width=0.8\textwidth]{images/013-SetupWorkspace07.png} 
% !images/013-SetupWorkspace07.png!

Performing the tutorials will setup a dedicated project for each tutorial. Therefore there are some 
slight changes especially whenever a path must be set (e.g. to the model library) within your own 
projects. All this is described in the tutorials.

Back to the top