Skip to main content

Notice: this Wiki will be going read only early in 2024 and edits will no longer be possible. Please see: https://gitlab.eclipse.org/eclipsefdn/helpdesk/-/wikis/Wiki-shutdown-plan for the plan.

Jump to: navigation, search

Difference between revisions of "Papyrus-RT/Developer/Developer Guide/DevEnv"

Line 27: Line 27:
 
*# Decompress the downloaded archive to a folder such as "'''~/Apps/EclipseInstaller/'''" ''(folder name and location will vary depending on operating system)''
 
*# Decompress the downloaded archive to a folder such as "'''~/Apps/EclipseInstaller/'''" ''(folder name and location will vary depending on operating system)''
  
* The '''PapyrusRT developer setup project''' file.  
+
* An Eclipse account. This is needed to access Bugzilla and Gerrit queries in MyLyn, as well as to contribute changes to the source code via Gerrit.
*: This file contains the tasks described above
+
*# If you do not have an Eclipse account, go to [https://dev.eclipse.org/site_login/ https://dev.eclipse.org/site_login/] and fill out the form.
*# Download this file from [https://www.eclipse.org/papyrus-rt/papyrus-rt-developer.setup https://www.eclipse.org/papyrus-rt/papyrus-rt-developer.setup]
+
 
*# Save it in a convenient folder such as "'''~/Apps/papyrus-rt-developer.setup/'''"
+
  
 
{{Note | Operating System | The instructions in this tutorial are illustrated using screen captures from multiple operating systems. Steps and images may differ slightly if the installation is done on a different operating system (both Windows and Mac OS are supported for developing models). Some of these differences have been indicated when known, but some may also be missing.}}
 
{{Note | Operating System | The instructions in this tutorial are illustrated using screen captures from multiple operating systems. Steps and images may differ slightly if the installation is done on a different operating system (both Windows and Mac OS are supported for developing models). Some of these differences have been indicated when known, but some may also be missing.}}
Line 90: Line 89:
 
=== Add the setup project file to the installer ===
 
=== Add the setup project file to the installer ===
  
10. Drag and drop the setup file ([[File:papyrus-rt-developer.setup]]) onto the '''<User>''' folder.
+
10. Click on the '''<User>''' folder.
 +
 
 +
11. Click on the '''[+]''' button on the top-right of the window.
 +
 
 +
12. Enter the following URL in the '''Resource URIs''' field:
 +
 
 +
:[https://www.eclipse.org/papyrus-rt/content/setup/papyrus-rt-developer.setup https://www.eclipse.org/papyrus-rt/content/setup/papyrus-rt-developer.setup]
  
 
:<div class="figure">[[Image:papyrus-rt-dev-env-install-5-1.png]]</div>
 
:<div class="figure">[[Image:papyrus-rt-dev-env-install-5-1.png]]</div>
 +
 +
13. Click '''[OK]'''.
 +
 +
:<div class="figure">[[Image:papyrus-rt-dev-env-install-5-2.png]]</div>
 +
  
 
=== Select the components to install ===
 
=== Select the components to install ===
  
11. Unfold '''Papyrus-RT''' and check all the boxes on the left.
+
14. Unfold '''Papyrus-RT''' and check all the boxes on the left.
 +
 
 +
:<div class="figure">[[Image:papyrus-rt-dev-env-install-5-3.png]]</div>
 +
 
 +
15. In the bottom of the dialog make sure that the ''Stream'' field in each entry is set to '''master (Neon/1.0)''' (You may need to click on each and select the appropriate stream).
 +
 
 +
:<div class="figure">[[Image:papyrus-rt-dev-env-install-5-4.png]]</div>
  
12. In the bottom of the dialog make sure that the ''Stream'' field in each entry is set to '''master (Neon/1.0)''' (You may need to click on each and select the appropriate stream).
+
16. Click '''[Next]'''.
  
:<div class="figure">[[Image:papyrus-rt-dev-env-install-6.png]]</div>
+
:<div class="figure">[[Image:papyrus-rt-dev-env-install-7-0.png]]</div>
  
13. Click '''[Next]'''.
+
{{Note |Variables | It has been reported that sometimes some variables are not displayed. In particular the "Codegen Builds" variable is sometimes missing. This is not a problem as it can be shown by selecting "Show all variables.}}
  
:<div class="figure">[[Image:papyrus-rt-dev-env-install-7.png]]</div>
+
17. Enter your Eclipse password under '''Eclipse password for Bugzilla/Hudson'''.
  
 
=== Configure your installation ===
 
=== Configure your installation ===
  
14. Choose your installation and workspace folders and enter your Eclipse password. You may customize these values and more by checking on '''Show all variables''' at the bottom.
+
18. Choose your installation and workspace folders and enter your Eclipse password. You may customize these values and more by checking on '''Show all variables''' at the bottom.
  
 
:<div class="figure">[[Image:papyrus-rt-dev-env-install-7-1.png]]</div>
 
:<div class="figure">[[Image:papyrus-rt-dev-env-install-7-1.png]]</div>
Line 114: Line 130:
 
This will give your options about the location of the workbench, the workspace, the git repository, the target platform, the JVM location and the repository used for the code-generator builds (Continuous Integration or Scheduled Nightly).
 
This will give your options about the location of the workbench, the workspace, the git repository, the target platform, the JVM location and the repository used for the code-generator builds (Continuous Integration or Scheduled Nightly).
  
15. Click '''[Next]'''.
+
19. Click '''[Next]'''.
  
 
:<div class="figure">[[Image:papyrus-rt-dev-env-install-8.png]]</div>
 
:<div class="figure">[[Image:papyrus-rt-dev-env-install-8.png]]</div>
Line 120: Line 136:
 
This shows the first set of tasks of the installation. The second set will be executed when Eclipse launches automatically.
 
This shows the first set of tasks of the installation. The second set will be executed when Eclipse launches automatically.
  
16. Click '''[Finish]'''.
+
20. Click '''[Finish]'''.
  
 
:<div class="figure">[[Image:papyrus-rt-dev-env-install-9.png]]</div>
 
:<div class="figure">[[Image:papyrus-rt-dev-env-install-9.png]]</div>
  
17. Click '''[Finish]'''.  
+
21. Click '''[Finish]'''.  
  
 
=== Restarting ===
 
=== Restarting ===
Line 140: Line 156:
 
:<div class="figure">[[Image:papyrus-rt-dev-env-install-12.png]]</div>
 
:<div class="figure">[[Image:papyrus-rt-dev-env-install-12.png]]</div>
  
18. When asked for '''Gerrit Code Review Repository Authentication''' enter your Eclipse user ID and password.
+
22. If asked for '''Gerrit Code Review Repository Authentication''' enter your Eclipse user ID and password.
  
 
:<div class="figure">[[Image:papyrus-rt-dev-env-install-13.png]]</div>
 
:<div class="figure">[[Image:papyrus-rt-dev-env-install-13.png]]</div>
Line 150: Line 166:
 
These will setup and synchronize the various MyLyn queries for Bugzilla and Gerrit.
 
These will setup and synchronize the various MyLyn queries for Bugzilla and Gerrit.
  
19. Once it's finished you can click '''[Finish]''' to close the setup dialog.
+
23. Once it's finished you can click '''[Finish]''' to close the setup dialog.
  
20. Click on '''Workbench''' in the Eclipse Welcome page. You should see something like this:
+
24. Click on '''Workbench''' in the Eclipse Welcome page. You should see something like this:
  
 
:<div class="figure">[[Image:papyrus-rt-dev-env-install-15-1.png]]</div>
 
:<div class="figure">[[Image:papyrus-rt-dev-env-install-15-1.png]]</div>
Line 160: Line 176:
 
=== Generate code for EMF projects ===
 
=== Generate code for EMF projects ===
  
21. For each of the following projects (found under the '''Papyrus XtUML-RT''' working set), perform the steps below:
+
25. For each of the following projects (found under the '''Papyrus XtUML-RT''' working set), perform the steps below:
  
 
* <code>org.eclipse.papyrusrt.xtumlrt.common.model</code>
 
* <code>org.eclipse.papyrusrt.xtumlrt.common.model</code>
Line 181: Line 197:
 
=== Generate code for the Xtext project ===
 
=== Generate code for the Xtext project ===
  
22. Generate Xtext Artifacts:
+
26. Generate Xtext Artifacts:
  
 
# Locate the <code>org.eclipse.papyrusrt.xtumlrt.xtext</code> project (under the '''Papyrus XtUML-RT''' working set), and then
 
# Locate the <code>org.eclipse.papyrusrt.xtumlrt.xtext</code> project (under the '''Papyrus XtUML-RT''' working set), and then
Line 197: Line 213:
 
:<div class="figure">[[Image:papyrus-rt-dev-env-install-15-7.png]]</div>
 
:<div class="figure">[[Image:papyrus-rt-dev-env-install-15-7.png]]</div>
  
23. Click '''[Proceed]'''
+
27. Click '''[Proceed]'''
  
 
In the console view at the bottom, a message <span style="color: red"> *ATTENTION*</span> will appear and it will ask you if it can download the ANTLR 3 parser generator.
 
In the console view at the bottom, a message <span style="color: red"> *ATTENTION*</span> will appear and it will ask you if it can download the ANTLR 3 parser generator.
Line 203: Line 219:
 
:<div class="figure">[[Image:papyrus-rt-dev-env-install-15-8.png]]</div>
 
:<div class="figure">[[Image:papyrus-rt-dev-env-install-15-8.png]]</div>
  
24. Put the cursor in the console after the question and type '''y[Enter]'''.
+
28. Put the cursor in the console after the question and type '''y[Enter]'''.
  
 
When it finishes generating the Xtext code it should look like this:
 
When it finishes generating the Xtext code it should look like this:
Line 220: Line 236:
 
There will still be a few errors in the workspace. To get rid of them
 
There will still be a few errors in the workspace. To get rid of them
  
25. Click on '''Project &rarr; Clean...'''on the main menu.
+
29. Click on '''Project &rarr; Clean...'''on the main menu.
  
 
:<div class="figure">[[Image:papyrus-rt-dev-env-install-15-10.png]]</div>
 
:<div class="figure">[[Image:papyrus-rt-dev-env-install-15-10.png]]</div>
  
26. Select '''Clean all projects'''
+
30. Select '''Clean all projects'''
  
 
:<div class="figure">[[Image:papyrus-rt-dev-env-install-15-11.png]]</div>
 
:<div class="figure">[[Image:papyrus-rt-dev-env-install-15-11.png]]</div>
  
27. Click '''[OK]'''
+
31. Click '''[OK]'''
  
 
After if finishes, the workspace should have no errors and it should look like this:
 
After if finishes, the workspace should have no errors and it should look like this:

Revision as of 13:14, 18 April 2016

Introduction

This tutorial will show you how to setup the development environment for Papyrus for Real Time using the Oomph-based Eclipse Installer.

The installer will automatically perform several actions, including:

  • Download and install a base Eclipse workbench for your platform
  • Add the required update sites
  • Download and install all required development tools (Eclipse features and plugins, such as the PDE, the JDT, EGit, MyLyn, etc.)
  • Download and install all required dependencies (Eclipse features and plugins, such as UML2, Papyrus, Xtext, etc.)
  • Clone the PapyrusRT git repository
  • Import all the PapyrusRT projects into the workspace
  • Create working sets in the workspace organizing the projects
  • Install Bugzilla and Gerrit MyLyn connectors and synchronize queries for these connectors
  • Configure the workbench (e.g. set the JVM and Java compiler compliance, set character encodings, code formatting and other user preferences)

Requirements

To install the developer environment you need only three things:

  • The Eclipse Installer
    1. Go to http://wiki.eclipse.org/Eclipse_Installer
    2. Download the "Eclipse Installer" package for your operating system
    3. Decompress the downloaded archive to a folder such as "~/Apps/EclipseInstaller/" (folder name and location will vary depending on operating system)
  • An Eclipse account. This is needed to access Bugzilla and Gerrit queries in MyLyn, as well as to contribute changes to the source code via Gerrit.
    1. If you do not have an Eclipse account, go to https://dev.eclipse.org/site_login/ and fill out the form.


Note.png
Operating System
The instructions in this tutorial are illustrated using screen captures from multiple operating systems. Steps and images may differ slightly if the installation is done on a different operating system (both Windows and Mac OS are supported for developing models). Some of these differences have been indicated when known, but some may also be missing.


PapyrusRT-O-EclipseInstaller.png

Install the development environment for Papyrus for Real Time

Now that the installer and project file are available, you can install the development environment.


Start the Eclipse Installer

1. Open the eclipse-installer folder and double-click on the eclipse-inst application.

PapyrusRT-O-StartSclipseInstaller.png

You should see this:

Papyrus-rt-dev-env-install-1.png

Switch the the Advanced Mode

You have now started the Eclipse Installer. Now you will need to add the Papyrus-RT developer setup project file to the Installer.

However, the Papyrus-RT developer setup project is not available in the list of projects presented to you. You will have to manually add it to the list by using the "Advanced Mode" of the installer.

2. Click on the icon at the top right.

Papyrus-rt-dev-env-install-2.png

3. Select "Advanced Mode..."

This has for effect to restart the Eclipse Installer in the "Advanced Mode", which will allow you to specify an external setup file.

Papyrus-rt-dev-env-install-3.png

Select a base Eclipse Package

4. Select Eclipse.org from the list.

5. Click on the [>] left of Eclipse.org to unfold.

6. Select Eclipse IDE for Eclipse Committers.

Papyrus-rt-dev-env-install-4.png
Note.png
Base package
You can choose a different base package, but this is the simplest way to get started.


7. In the bottom, under Product Version select Latest (Neon).

8. Under Java VM choose the appropriate Java 1.8 JVM (you may need to navigate through the file system to find the one you need).

9. Click [Next]

Papyrus-rt-dev-env-install-5.png


Add the setup project file to the installer

10. Click on the <User> folder.

11. Click on the [+] button on the top-right of the window.

12. Enter the following URL in the Resource URIs field:

https://www.eclipse.org/papyrus-rt/content/setup/papyrus-rt-developer.setup
Papyrus-rt-dev-env-install-5-1.png

13. Click [OK].

Papyrus-rt-dev-env-install-5-2.png


Select the components to install

14. Unfold Papyrus-RT and check all the boxes on the left.

Papyrus-rt-dev-env-install-5-3.png

15. In the bottom of the dialog make sure that the Stream field in each entry is set to master (Neon/1.0) (You may need to click on each and select the appropriate stream).

Papyrus-rt-dev-env-install-5-4.png

16. Click [Next].

Papyrus-rt-dev-env-install-7-0.png
Note.png
Variables
It has been reported that sometimes some variables are not displayed. In particular the "Codegen Builds" variable is sometimes missing. This is not a problem as it can be shown by selecting "Show all variables.


17. Enter your Eclipse password under Eclipse password for Bugzilla/Hudson.

Configure your installation

18. Choose your installation and workspace folders and enter your Eclipse password. You may customize these values and more by checking on Show all variables at the bottom.

Papyrus-rt-dev-env-install-7-1.png

This will give your options about the location of the workbench, the workspace, the git repository, the target platform, the JVM location and the repository used for the code-generator builds (Continuous Integration or Scheduled Nightly).

19. Click [Next].

Papyrus-rt-dev-env-install-8.png

This shows the first set of tasks of the installation. The second set will be executed when Eclipse launches automatically.

20. Click [Finish].

Papyrus-rt-dev-env-install-9.png

21. Click [Finish].

Restarting

Eclipse will relaunch automatically and present you with a welcome screen:

Papyrus-rt-dev-env-install-10.png

On the bottom right it says Executing startup tasks. You can leave it alone, but it will take a few minutes to complete. If you'd like to see the progress, you can click on the icon to the left of this message (two circling arrows)

Papyrus-rt-dev-env-install-11.png

When it finishes it will look like this:

Papyrus-rt-dev-env-install-12.png

22. If asked for Gerrit Code Review Repository Authentication enter your Eclipse user ID and password.

Papyrus-rt-dev-env-install-13.png

During setup, a few dialogs like the following will pop up:

Papyrus-rt-dev-env-install-14.png

These will setup and synchronize the various MyLyn queries for Bugzilla and Gerrit.

23. Once it's finished you can click [Finish] to close the setup dialog.

24. Click on Workbench in the Eclipse Welcome page. You should see something like this:

Papyrus-rt-dev-env-install-15-1.png

At this point you will have errors in several projects (and in the Error Log view). To clean up all the errors, a few additional steps are necessary.

Generate code for EMF projects

25. For each of the following projects (found under the Papyrus XtUML-RT working set), perform the steps below:

  • org.eclipse.papyrusrt.xtumlrt.common.model
  • org.eclipse.papyrusrt.xtumlrt.statemach.model
  • org.eclipse.papyrusrt.xtumlrt.statemach.ext.model
  • org.eclipse.papyrusrt.xtumlrt.umlrt.model

Steps:

  1. Unfold the project
  2. Unfold the model folder
  3. Open the XXX.genmodel file (by double-clicking it), where XXX is the name of the model.
  4. In the opened EMF editor, right-click the root element (named XXX)
  5. Select Generate Model Code
Papyrus-rt-dev-env-install-15-2.png
Do the same for each of the projects mentioned above.

Generate code for the Xtext project

26. Generate Xtext Artifacts:

  1. Locate the org.eclipse.papyrusrt.xtumlrt.xtext project (under the Papyrus XtUML-RT working set), and then
  2. Unfold the project
  3. Unfold the src folder
  4. Unfold the org.eclipse.papyrusrt.xtumlrt.xtext folder
  5. Right-click on the Tumlrt.xtext file
  6. Select Run As
  7. Select Generate Xtext Artifacts
Papyrus-rt-dev-env-install-15-6.png

It will then say that there are errors and ask you is you want to proceed.

Papyrus-rt-dev-env-install-15-7.png

27. Click [Proceed]

In the console view at the bottom, a message *ATTENTION* will appear and it will ask you if it can download the ANTLR 3 parser generator.

Papyrus-rt-dev-env-install-15-8.png

28. Put the cursor in the console after the question and type y[Enter].

When it finishes generating the Xtext code it should look like this:

Papyrus-rt-dev-env-install-15-9.png
Note.png
In case you have problems downloading the ANTLR 3 parser generator
It has been reported that some people have trouble with downloading the ANTLR generator. In that case you should do the following:
  1. Download http://download.itemis.com/antlr-generator-3.2.0-patch.jar
  2. Rename it into .antlr-generator-3.2.0-patch.jar
  3. Place it in the root of org.eclipse.papyrusrt.xtumlrt.xtext.ide
  4. Regenerate the Xtext Artifacts as described above.


Clean all

There will still be a few errors in the workspace. To get rid of them

29. Click on Project → Clean...on the main menu.

Papyrus-rt-dev-env-install-15-10.png

30. Select Clean all projects

Papyrus-rt-dev-env-install-15-11.png

31. Click [OK]

After if finishes, the workspace should have no errors and it should look like this:

Papyrus-rt-dev-env-install-15-12.png

Done!

Copyright © Eclipse Foundation, Inc. All Rights Reserved.