Skip to main content

Notice: This Wiki is now read only and edits are no longer 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"

(Correct the location where the manually downloaded ANTLR 3 parser generator shall be located.)
Line 7: Line 7:
 
This tutorial will show you how to setup the development environment for Papyrus for Real Time using the Oomph-based Eclipse Installer.
 
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:
+
The installer will automatically perform several actions for you, including:
  
 
* Download and install a base Eclipse workbench for your platform
 
* Download and install a base Eclipse workbench for your platform
Line 14: Line 14:
 
* Download and install all required dependencies (Eclipse features and plugins, such as UML2, Papyrus, Xtext, etc.)
 
* Download and install all required dependencies (Eclipse features and plugins, such as UML2, Papyrus, Xtext, etc.)
 
* Clone the PapyrusRT git repository
 
* Clone the PapyrusRT git repository
 +
* Generate code for several EMF models and Xtext projects
 
* Import all the PapyrusRT projects into the workspace
 
* Import all the PapyrusRT projects into the workspace
 +
* Perform a clean build of all projects
 
* Create working sets in the workspace organizing the projects
 
* Create working sets in the workspace organizing the projects
 
* Install Bugzilla and Gerrit MyLyn connectors and synchronize queries for these connectors
 
* Install Bugzilla and Gerrit MyLyn connectors and synchronize queries for these connectors
Line 23: Line 25:
 
To install the developer environment you need only three things:
 
To install the developer environment you need only three things:
  
* '''Java 8'''.  
+
* '''Java 8'''.
 
*: Older versions may not work. You can obtain the JDK 1.8 here: [http://www.oracle.com/technetwork/java/javase/downloads/jdk8-downloads-2133151.html http://www.oracle.com/technetwork/java/javase/downloads/jdk8-downloads-2133151.html]
 
*: Older versions may not work. You can obtain the JDK 1.8 here: [http://www.oracle.com/technetwork/java/javase/downloads/jdk8-downloads-2133151.html http://www.oracle.com/technetwork/java/javase/downloads/jdk8-downloads-2133151.html]
  
Line 31: Line 33:
 
*# 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)''
  
* An Eclipse account.  
+
* 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 is needed to access Bugzilla and Gerrit queries in MyLyn, as well as to contribute changes to the source code via Gerrit.
 
*# 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.
 
*# 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.
Line 37: Line 39:
  
 
{{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.}}
 
:<div class="figure">[[Image:PapyrusRT-O-EclipseInstaller.png]]</div>
 
  
 
= Install the development environment for Papyrus for Real Time =
 
= 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 ==
 
== Start the Eclipse Installer ==
Line 49: Line 46:
 
1. Open the '''eclipse-installer''' folder and double-click on the '''eclipse-inst''' application.
 
1. Open the '''eclipse-installer''' folder and double-click on the '''eclipse-inst''' application.
  
:<div class="figure">[[Image:PapyrusRT-O-StartSclipseInstaller.png]]</div>
+
:<div class="figure">[[Image:papyrusrt-dev-install-01-eclipse-installer-icon.png]]</div>
 +
 
 +
:<div class="figure">[[Image:papyrusrt-dev-install-02-eclipse-installer-splash.png]]</div>
  
 
You should see this:
 
You should see this:
  
:<div class="figure">[[Image:papyrus-rt-dev-env-install-1.png]]</div>
+
:<div class="figure">[[Image:papyrusrt-dev-install-03-eclipse-installer-main.png]]</div>
  
 
== Switch the the '''''Advanced Mode''''' ==
 
== Switch the the '''''Advanced Mode''''' ==
Line 59: Line 58:
 
2. Click on the icon at the top right (looks like three horizontal bars).
 
2. Click on the icon at the top right (looks like three horizontal bars).
  
:<div class="figure">[[Image:papyrus-rt-dev-env-install-2.png]]</div>
+
:<div class="figure">[[Image:papyrusrt-dev-install-04-eclipse-installer-options-menu.png]]</div>
  
 
3. Select &quot;'''Advanced Mode...'''&quot;
 
3. Select &quot;'''Advanced Mode...'''&quot;
 +
 +
:<div class="figure">[[Image:papyrusrt-dev-install-05-eclipse-installer-options-adv-mode-selected.png]]</div>
  
 
This has for effect to restart the Eclipse Installer in the &quot;Advanced Mode&quot;.
 
This has for effect to restart the Eclipse Installer in the &quot;Advanced Mode&quot;.
  
:<div class="figure">[[Image:papyrus-rt-dev-env-install-3.png]]</div>
+
:<div class="figure">[[Image:papyrusrt-dev-install-06-eclipse-installer-advanced-mode.png]]</div>
  
 
== Select a base Eclipse Package ==
 
== Select a base Eclipse Package ==
  
4. Select '''Eclipse.org''' from the list.
+
4. If the '''Eclipse.org''' item is folded, click on the arrow to its left to unfold it.
  
5. Click on the '''[>]''' left of '''Eclipse.org''' to unfold.
+
5. Select '''Eclipse IDE for Eclipse Committers'''.
  
6. Select '''Eclipse IDE for Eclipse Committers'''.  
+
:<div class="figure">[[Image:papyrusrt-dev-install-07-eclipse-installer-product-selected.png]]</div>
  
:<div class="figure">[[Image:papyrus-rt-dev-env-install-4.png]]</div>
+
{{ Note | Base package | You can choose a different base package, but this is the most tested base package.}}
  
{{Note | Base package | You can choose a different base package, but this is the simplest way to get started.}}
+
6. The bottom panel may look like this:
  
7. In the bottom, under '''Product Version''' select '''Latest (Neon)'''.  
+
:<div class="figure">[[Image:papyrusrt-dev-install-08-eclipse-installer-bottom-panel.png]]</div>
  
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).  
+
Click on the '''Product Version''' field and select '''Latest (Neon)'''.
  
9. Click '''[Next]'''
+
:<div class="figure">[[Image:papyrusrt-dev-install-10-eclipse-installer-neon-selected.png]]</div>
  
:<div class="figure">[[Image:papyrus-rt-dev-env-install-5.png]]</div>
+
The bottom panel should now look like this:
 +
 
 +
:<div class="figure">[[Image:papyrusrt-dev-install-11-eclipse-installer-bottom-panel-neon-selected.png]]</div>
 +
 
 +
7. Under '''Java VM''' choose the appropriate Java 1.8 JVM.
 +
 
 +
''Optional'': Manage JVMs.  You may click on the icon to the right of the field to manage alternative JVMs.
 +
 
 +
:<div class="figure">[[Image:papyrusrt-dev-install-12-eclipse-installer-manage-jvm.png]]</div>
 +
 
 +
''Optional'': Manage bundle pools.  By default the installer is set to use ''bundle pools''. A bundle pool is a common plugins directory shared by several Eclipse installations, to avoid duplication of content and reduce download times. Bundle pools help to dramatically reduce disk footprint and to eliminate repeated downloads of the same bundles and features, thereby dramatically improving the performance of software updates and target platform provisioning.
 +
 
 +
If you unselect the '''Bundle Pool''' checkbox, all the plugins for Papyrus-RT will be installed in the target installation directory, resulting in a more isolated install, but without taking advantage of the pool, and duplicating plugins that you may have in other installations.
 +
 
 +
You may also choose to manage multiple pools, by clicking on the button to the right of the field.
 +
 
 +
:<div class="figure">[[Image:papyrusrt-dev-install-13-eclipse-installer-manage-pools.png]]</div>
 +
 
 +
8. Once done with the Product Version, Java JVM and Bundle pools, click '''[Next]'''.
  
  
 
== Select the Papyrus-RT setup project ==
 
== Select the Papyrus-RT setup project ==
  
10. Scroll down to find and select the '''Papyrus-RT''' project.
+
You should see now a list of available Eclipse projects:
 +
 
 +
:<div class="figure">[[Image:papyrusrt-dev-install-14-eclipse-installer-projects.png]]</div>
 +
 
 +
9. Scroll down to find and select the '''Papyrus-RT''' project.
  
:<div class="figure">[[Image:papyrus-rt-dev-env-install-5-10.png]]</div>
+
:<div class="figure">[[Image:papyrusrt-dev-install-15-eclipse-installer-papyrus-rt-project.png]]</div>
  
  
 
== Select the components to install ==
 
== Select the components to install ==
  
11. Unfold '''Papyrus-RT''' and check all the boxes on the left.
+
10. Unfold '''Papyrus-RT'''
  
:<div class="figure">[[Image:papyrus-rt-dev-env-install-5-11.png]]</div>
+
:<div class="figure">[[Image:papyrusrt-dev-install-16-eclipse-installer-project-unfolded.png]]</div>
 +
 
 +
11. Check all the boxes on the left.
 +
 
 +
:<div class="figure">[[Image:papyrusrt-dev-install-17-eclipse-installer-components-selected.png]]</div>
 +
 
 +
{{ Note | Which components to select | Papyrus-RT consists of several components, listed in view above.
 +
To set up a development environment you '''must''' select the root Papyrus-RT component.
 +
 
 +
* '''Profile''': Contains the UML-RT profile. All components depend on it.
 +
* '''Core''': Contains core utilities. Depends on '''Profile''', and the rest depend on it.
 +
* '''Common''': Contains the common default language framework, including the runtime model library and the UI. Depends on '''Core''', and the rest depend on it.
 +
* '''Tooling''': Contains the Tooling/UI plugins (e.g. diagrams, wizards, etc.). Depends on '''Common'''.
 +
* '''Codegen''': Contains the code generator and runtime system. Depends on '''Common''' and '''XtUML-RT'''.
 +
* '''XtUML-RT''': Contains the intermediate representation used by the code generator, as well as transformations to UML, and textual syntax support (Xtext plugins).
 +
* '''C++''': Contains plugins for specific C++ support by both '''Tooling''' and '''Codegen'''.
 +
* '''Model Migration''': Contains plugins to handle model migration from other tools, specially RSA. Depends on '''Profile'''.
 +
* '''Releng''': Contains the release engineering projects, including target platform definitions, POM files and scripts to handle the build.
 +
* '''Mylyn Queries''': Contains Mylyn queries to link Mylyn to the Papyrus-RT Bugzilla and Gerrit repository.
 +
* '''Oomph Setup''': Contains the Papyrus-RT website and within it, the Oomph Setup models to provide custom user, tester and developer installations.
 +
 
 +
If you select a component, you must also select all its dependencies. For example, if you want to work on '''Codegen''',
 +
you will need to select '''Profile''', '''Core''', '''Common''', '''XtUML-RT''' as a minimum.
 +
 
 +
If you are unsure, it is recommended to select all of them.
 +
}}
  
 
{{ Note | On Linux | It has been reported that in some Linux platforms the checkboxes on the left may not appear. In that case, you can select the components by double-clicking on them. }}
 
{{ Note | On Linux | It has been reported that in some Linux platforms the checkboxes on the left may not appear. In that case, you can select the components by double-clicking on them. }}
  
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).
+
12. In the bottom of the dialog there is a panel showing all the selected components:
  
:<div class="figure">[[Image:papyrus-rt-dev-env-install-5-12.png]]</div>
+
:<div class="figure">[[Image:papyrusrt-dev-install-18-eclipse-installer-components-panel.png]]</div>
  
== Configure your installation ==
+
Make sure that the ''Stream'' field in each and every entry is set to '''master (Neon/1.0)''' (You may need to click on each and select the appropriate stream).
 +
 
 +
:<div class="figure">[[Image:papyrusrt-dev-install-19-eclipse-installer-select-stream.png]]</div>
 +
 
 +
{{ Note | Stream selection | Some users specially on Mac OS X, have observed that sometimes clicking on the '''Stream''' field unselects the corresponding component. In that case just select the component again by either clicking on its check-box or double-clicking on it. The component will reappear at the end of the list. }}
 +
 
 +
After selecting the correct stream for all, it should look like this:
 +
 
 +
:<div class="figure">[[Image:papyrusrt-dev-install-20-eclipse-installer-all-streams-selected.png]]</div>
  
 
13. Click '''[Next]'''.
 
13. Click '''[Next]'''.
  
:<div class="figure">[[Image:papyrus-rt-dev-env-install-7-0.png]]</div>
 
  
{{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".}}
+
== Configure your installation ==
 +
 
 +
At this point, a dialog used to configure the installation '''Variables''' will appear:
 +
 
 +
:<div class="figure">[[Image:papyrusrt-dev-install-21-eclipse-installer-variables.png]]</div>
 +
 
 +
'''Configuration variables''':  If this is an installation from scratch, all variables shown above will appear. If you are performing an additional installation, Oomph will have recorded the values you previously entered and only a few variables will show, e.g.:
 +
 
 +
:<div class="figure">[[Image:papyrusrt-dev-install-21-eclipse-installer-variables-additional-install.png]]</div>
 +
 
 +
You can always go back to see all variables by checking the '''Show all variables''' box at the bottom.
 +
 
 +
:<div class="figure">[[Image:papyrusrt-dev-install-28-eclipse-installer-variables-show-all.png]]</div>
 +
 
 +
There are many variables that you can configure such as the location of the application, the workspace, the git repositories, as well as the urls for cloning the repositories, the target platform, etc.
 +
 
 +
For the locations of the main installation folder, the workspace and the git repositories, there are several alternative rules. There is a "root install folder" and typically, other locations will be relative to this root folder, but you can also choose an absolute location:
 +
 
 +
:<div class="figure">[[Image:papyrusrt-dev-install-22-eclipse-installer-variables-install-location.png]]</div>
 +
 
 +
The installation location is the location of the Eclipse folder. By default is will be under the root folder.
 +
 
 +
The workspace location rules provide several options. The default is to have the workspace as a folder called "ws" within the installation location (next to the Eclipse folder):
 +
 
 +
:<div class="figure">[[Image:papyrusrt-dev-install-23-eclipse-installer-variables-workspace-location.png]]</div>
 +
 
 +
Similarly there are several options for the location of the cloned git repositories. The default is to have these in a folder called "git" within the installation location (next to the Eclipse folder):
 +
 
 +
:<div class="figure">[[Image:papyrusrt-dev-install-24-eclipse-installer-variables-git-clone-location.png]]</div>
 +
 
  
 
14. Enter your Eclipse password under '''Eclipse password for Bugzilla/Hudson'''.
 
14. Enter your Eclipse password under '''Eclipse password for Bugzilla/Hudson'''.
  
 +
The Bugzilla ID field will be used to access your bugzilla queries. You may keep the ID as "anonymous", but you won't be able to access your own queries, or you may enter your Eclipse ID, in which case, a password field will appear:
  
15. 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:papyrusrt-dev-install-26-eclipse-installer-variables-bugzilla-password.png]]</div>
  
:<div class="figure">[[Image:papyrus-rt-dev-env-install-7-1.png]]</div>
+
If you enter a password, it is recommended that you click the '''Authenticate...''' button. If you entered a valid password you should see this:
  
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).
+
:<div class="figure">[[Image:papyrusrt-dev-install-27-eclipse-installer-variables-bugzilla-password-authentication.png]]</div>
  
16. Click '''[Next]'''.
+
15. Click '''[Next]'''.
  
:<div class="figure">[[Image:papyrus-rt-dev-env-install-8.png]]</div>
+
{{ Note | Passwords | Eclipse uses passwords for different purposes. In our case, passwords are needed to access Bugzilla entries, and to push changes to Gerrit. For this purpose, Eclipse uses a secure storage.
 +
This secure storage has a master password created automatically. }}
 +
 
 +
If this is the first time you are installing Eclipse, you will see a dialog titled '''Secure Storage - Password Hint Needed''':
 +
 
 +
:<div class="figure">[[Image:papyrusrt-dev-install-29-eclipse-installer-master-password.png]]</div>
 +
 
 +
If you click '''Yes''', you will be asked for password recovery questions:
 +
 
 +
:<div class="figure">[[Image:papyrusrt-dev-install-30-eclipse-installer-password-recovery.png]]</div>
 +
 
 +
Now you should see the '''Confirmation''' dialog:
 +
 
 +
:<div class="figure">[[Image:papyrusrt-dev-install-31-eclipse-installer-confirmation.png]]</div>
  
 
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.
Line 132: Line 230:
 
17. Click '''[Finish]'''.
 
17. Click '''[Finish]'''.
  
:<div class="figure">[[Image:papyrus-rt-dev-env-install-9.png]]</div>
+
'''User Agreement''':  If this is the first time installing, you will be asked to accept or defer acceptance of the Eclipse Foundation Software User Agreement:
 +
 
 +
:<div class="figure">[[Image:papyrusrt-dev-install-32-eclipse-installer-user-agreement.png]]</div>
 +
 
 +
Click '''[Accept Now]'''.
 +
 
 +
Now you should see a '''Progress''' dialog executing the first set of installation tasks as they progress:
 +
 
 +
:<div class="figure">[[Image:papyrusrt-dev-install-33-eclipse-installer-setup-first-phase.png]]</div>
 +
 
 +
'''Licenses''': If this is the first time installing you will see a dialog asking you to review and accept several licenses before the installation can proceed:
 +
 
 +
:<div class="figure">[[Image:papyrusrt-dev-install-34-eclipse-installer-licenses.png]]</div>
 +
 
 +
It is recommended that you check the '''Remember accepted licenses''' box so that you don't have to accept them again when upgrading:
 +
 
 +
:<div class="figure">[[Image:papyrusrt-dev-install-35-eclipse-installer-license-acceptance.png]]</div>
 +
 
 +
Also note that the '''Accept''' button is '''not''' highlighted, and '''Decline''' is the default option. Make sure you click on '''Accept'''.
 +
 
 +
'''Unsigned Content''': Several plugins and dependencies are not signed, so if this is your first installation, you will be asked to accept unsigned content:
 +
 
 +
:<div class="figure">[[Image:papyrusrt-dev-install-36-eclipse-installer-unsigned-content.png]]</div>
 +
 
 +
It is recommended that you check the '''Remember choice''' box so that you don't have to accept again when upgrading:
 +
 
 +
:<div class="figure">[[Image:papyrusrt-dev-install-37-eclipse-installer-unsigned-content-acceptance.png]]</div>
 +
 
 +
After the first set of tasks is finished, the Eclipse Installer dialog will look like this:
 +
 
 +
:<div class="figure">[[Image:papyrusrt-dev-install-38-eclipse-installer-finish.png]]</div>
 +
 
 +
18. Click '''[Finish]'''.
  
18. Click '''[Finish]'''.
 
  
 
== Restarting ==
 
== Restarting ==
  
Eclipse will relaunch automatically and present you with a welcome screen:
+
Eclipse will relaunch automatically:
  
:<div class="figure">[[Image:papyrus-rt-dev-env-install-10.png]]</div>
+
:<div class="figure">[[Image:papyrusrt-dev-install-38-restart-neon-splash.png]]</div>
  
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)
+
and present you with a welcome screen:
  
:<div class="figure">[[Image:papyrus-rt-dev-env-install-11.png]]</div>
+
:<div class="figure">[[Image:papyrusrt-dev-install-40-new-workbench-welcome.png]]</div>
  
When it finishes it will look like this:
+
On the bottom right the status bar will show a message: '''Executing startup tasks'''.
  
:<div class="figure">[[Image:papyrus-rt-dev-env-install-12.png]]</div>
+
:<div class="figure">[[Image:papyrusrt-dev-install-41-new-workbench-startup-status.png]]</div>
  
19. If asked for '''Gerrit Code Review Repository Authentication''' enter your Eclipse user ID and password.
+
These startup tasks will complete the rest of the installation steps.
  
:<div class="figure">[[Image:papyrus-rt-dev-env-install-13.png]]</div>
+
If in step 11 you didn't select the '''XtUML-RT''' component, you can go to step 21.
  
During setup, a few dialogs like the following will pop up:
+
If in step 11 you did select the '''XtUML-RT''' component, then you may choose to either
  
:<div class="figure">[[Image:papyrus-rt-dev-env-install-14.png]]</div>
+
a) Wait several minutes until the progress reaches around 69% and then go to step 19.
  
These will setup and synchronize the various MyLyn queries for Bugzilla and Gerrit.
+
or
  
20. Once it's finished you can click '''[Finish]''' to close the setup dialog.
+
b) See the progress of the installation by clicking on the icon to the left of this message (two circling arrows).
  
21. Click on '''Workbench''' in the Eclipse Welcome page. You should see something like this:
+
If you choose b), you will see the '''Eclipse Updater''' dialog which shows the execution of the
 +
remaining installation tasks:
  
:<div class="figure">[[Image:papyrus-rt-dev-env-install-15-1.png]]</div>
+
:<div class="figure">[[Image:papyrusrt-dev-install-42-new-workbench-startup-tasks.png]]</div>
  
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.
+
During this tasks you may see dialogs titled '''Auto share git projects''' like the one below. These will
 +
automatically close.
  
== Generate code for EMF projects ==
+
:<div class="figure">[[Image:papyrusrt-dev-install-43-new-workbench-auto-share-git.png]]</div>
  
22. For each of the following projects (found under the '''Papyrus XtUML-RT''' working set), perform the steps below:
+
After several minutes progress will stop and you will see a
 +
message <span style="color: red"> *ATTENTION*</span> will appear and it will ask you if it can download the ANTLR 3 parser generator.
  
* <code>org.eclipse.papyrusrt.xtumlrt.common.model</code>
+
At this point you have to go to the console view in the workbench.
* <code>org.eclipse.papyrusrt.xtumlrt.statemach.model</code>
+
* <code>org.eclipse.papyrusrt.xtumlrt.statemach.ext.model</code>
+
* <code>org.eclipse.papyrusrt.xtumlrt.umlrt.model</code>
+
  
Steps:
+
First, you may have to move the '''Eclipse Updater''' dialog aside and bring the workbench window to the front:
  
# Unfold the project
+
:<div class="figure">[[Image:papyrusrt-dev-install-45-new-workbench-startup-tasks-move.png]]</div>
# Unfold the '''model''' folder
+
# Open the ''XXX''<code>.genmodel</code> file (by double-clicking it), where ''XXX'' is the name of the model.
+
# In the opened EMF editor, right-click the root element (named ''XXX'')
+
# Select '''Generate Model Code'''
+
  
:<div class="figure">[[Image:papyrus-rt-dev-env-install-15-2.png]]</div>
 
  
:Do the same for each of the projects mentioned above.
+
== Accepting the ANTLR 3 parser generator ==
  
== Generate code for the Xtext project ==
+
{{ Note | ANTLR 3 Parser generator | Papyrus-RT includes support for textual UML-RT. This is implemented using Xtext, which itself relies on the ANTLR parser generator. Because of some intellectual property issues it is not possible to bundle the ANTLR parser generator with the development environment. This requires that the user gives explicit permission to download and install the parser generator. }}
  
23. Generate Xtext Artifacts:
+
19. Click on the '''Workbench''' button on the top-right:
  
# Locate the <code>org.eclipse.papyrusrt.xtumlrt.xtext</code> project (under the '''Papyrus XtUML-RT''' working set), and then
+
:<div class="figure">[[Image:papyrusrt-dev-install-46-new-workbench-go-to-workbench-button.png]]</div>
# Unfold the project
+
# Unfold the '''src''' folder
+
# Unfold the '''org.eclipse.papyrusrt.xtumlrt.xtext''' folder
+
# Right-click on the '''Tumlrt.xtext''' file
+
# Select '''Run As'''
+
# Select '''Generate Xtext Artifacts'''
+
  
:<div class="figure">[[Image:papyrus-rt-dev-env-install-15-6.png]]</div>
+
Once opened, the workbench should look like this: (the '''Eclipse Updater''' dialog will be visible only if you clicked on the '''Executing startup tasks''' button.)
  
It will then say that there are errors and ask you is you want to proceed.  
+
:<div class="figure">[[Image:papyrusrt-dev-install-47-new-workbench-all.png]]</div>
  
:<div class="figure">[[Image:papyrus-rt-dev-env-install-15-7.png]]</div>
+
In the bottom, you should see the '''Console''' view:
  
24. Click '''[Proceed]'''
+
:<div class="figure">[[Image:papyrusrt-dev-install-48-new-workbench-console-view.png]]</div>
  
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.
+
You should see the <span style="color: red"> *ATTENTION*</span> message asking you if it can download the ANTLR 3 parser generator.
  
:<div class="figure">[[Image:papyrus-rt-dev-env-install-15-8.png]]</div>
+
20. Scroll to the bottom right of the Console view and place your cursor immediately after the question: <span style="color: red">(type 'y' or 'n' and hit enter)</span> and type '''y''' and hit '''[Enter]'''.
  
25. Put the cursor in the console after the question and type '''y[Enter]'''.
+
:<div class="figure">[[Image:papyrusrt-dev-install-49-new-workbench-antlr-acceptance-console-view.png]]</div>
  
When it finishes generating the Xtext code it should look like this:
+
Then the process will continue. If you have the '''Eclipse Updater''' dialog open, you will see something like this:
  
:<div class="figure">[[Image:papyrus-rt-dev-env-install-15-9.png]]</div>
+
:<div class="figure">[[Image:papyrusrt-dev-install-50-new-workbench-startup-tasks-build.png]]</div>
  
 
{{Note | 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:
 
{{Note | 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:
Line 223: Line 341:
 
# Rename it into '''.antlr-generator-3.2.0-patch.jar'''
 
# Rename it into '''.antlr-generator-3.2.0-patch.jar'''
 
# Place it in the root of <code>org.eclipse.papyrusrt.xtumlrt.xtext</code>
 
# Place it in the root of <code>org.eclipse.papyrusrt.xtumlrt.xtext</code>
# Regenerate the Xtext Artifacts as described above.  
+
# Regenerate the Xtext Artifacts: find and run the '''GenerateTumlrt.mwe2''' run configuration, by either clicking the downwards arrow next to the '''Run As...''' toolbar button, or from the menu bar go to '''Run &rarr; Run Configurations...''', selecting '''GenerateTumlrt.mwe2''' found under '''Mwe2 Launch''' and clicking '''[Run]'''.
 
}}
 
}}
  
== Clean all ==
 
  
There will still be a few errors in the workspace. To get rid of them
+
== Gerrit passwords ==
 +
 
 +
During the rest of the installation you will be asked to enter your Gerrit credentials:
 +
 
 +
:<div class="figure">[[Image:papyrusrt-dev-install-51-new-workbench-startup-tasks-gerrit-password.png]]</div>
 +
 
 +
21. Enter your Gerrit password (should be the same as your Eclipse password):
 +
 
 +
:<div class="figure">[[Image:papyrusrt-dev-install-52-new-workbench-startup-tasks-save-gerrit-password.png]]</div>
 +
 
 +
and check the '''Save Password''' box so that you don't have to re-enter it whenever you push to Gerrit.
 +
 
 +
== Finishing ==
 +
 
 +
During the remainder you may see some dialogs briefly popping up and automatically closing, such as this:
 +
 
 +
:<div class="figure">[[Image:papyrusrt-dev-install-52-new-workbench-startup-tasks-sync-queries.png]]</div>
 +
 
 +
You may also see notifications related to Bugzilla and Gerrit queries such as this:
 +
 
 +
:<div class="figure">[[Image:papyrusrt-dev-install-53-new-workbench-startup-tasks-eclipse-notifications.png]]</div>
 +
 
 +
At the end, if you had the '''Eclipse Updater''' dialog opened, it should look like this:
 +
 
 +
:<div class="figure">[[Image:papyrusrt-dev-install-54-new-workbench-startup-tasks-finish.png]]</div>
 +
 
 +
And the workbench itself should look like this:
  
26. Click on '''Project &rarr; Clean...'''on the main menu.
+
:<div class="figure">[[Image:papyrusrt-dev-install-55-new-workbench-clean.png]]</div>
  
:<div class="figure">[[Image:papyrus-rt-dev-env-install-15-10.png]]</div>
+
If you selected all components in step 11, or selected a subset of components with all their dependencies, you should not have any errors in your workspace.
  
27. Select '''Clean all projects'''
+
Whenever you restart your new development environment, startup tasks will be executed, for example tasks to download new dependencies. Opening the '''Eclipse Updater''' dialog will show something like this:
  
:<div class="figure">[[Image:papyrus-rt-dev-env-install-15-11.png]]</div>
+
:<div class="figure">[[Image:papyrusrt-dev-install-56-new-workbench-restart-startup-tasks.png]]</div>
  
28. Click '''[OK]'''
+
Also, Eclipse may ask you if you want to enable error reporting:
  
After if finishes, the workspace should have no errors and it should look like this:
+
:<div class="figure">[[Image:papyrusrt-dev-install-57-new-workbench-startup-tasks-error-reporting.png]]</div>
  
:<div class="figure">[[Image:papyrus-rt-dev-env-install-15-12.png]]</div>
 
  
 
Done!
 
Done!

Revision as of 16:48, 9 June 2016

PapyrusForRealTime-Logo-Icon.png

Setting up the Neon Developer Environment


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 for you, 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
  • Generate code for several EMF models and Xtext projects
  • Import all the PapyrusRT projects into the workspace
  • Perform a clean build of all projects
  • 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.


Install the development environment for Papyrus for Real Time

Start the Eclipse Installer

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

Papyrusrt-dev-install-01-eclipse-installer-icon.png
Papyrusrt-dev-install-02-eclipse-installer-splash.png

You should see this:

Papyrusrt-dev-install-03-eclipse-installer-main.png

Switch the the Advanced Mode

2. Click on the icon at the top right (looks like three horizontal bars).

Papyrusrt-dev-install-04-eclipse-installer-options-menu.png

3. Select "Advanced Mode..."

Papyrusrt-dev-install-05-eclipse-installer-options-adv-mode-selected.png

This has for effect to restart the Eclipse Installer in the "Advanced Mode".

Papyrusrt-dev-install-06-eclipse-installer-advanced-mode.png

Select a base Eclipse Package

4. If the Eclipse.org item is folded, click on the arrow to its left to unfold it.

5. Select Eclipse IDE for Eclipse Committers.

Papyrusrt-dev-install-07-eclipse-installer-product-selected.png
Note.png
Base package
You can choose a different base package, but this is the most tested base package.


6. The bottom panel may look like this:

Papyrusrt-dev-install-08-eclipse-installer-bottom-panel.png

Click on the Product Version field and select Latest (Neon).

Papyrusrt-dev-install-10-eclipse-installer-neon-selected.png

The bottom panel should now look like this:

Papyrusrt-dev-install-11-eclipse-installer-bottom-panel-neon-selected.png

7. Under Java VM choose the appropriate Java 1.8 JVM.

Optional: Manage JVMs. You may click on the icon to the right of the field to manage alternative JVMs.

Papyrusrt-dev-install-12-eclipse-installer-manage-jvm.png

Optional: Manage bundle pools. By default the installer is set to use bundle pools. A bundle pool is a common plugins directory shared by several Eclipse installations, to avoid duplication of content and reduce download times. Bundle pools help to dramatically reduce disk footprint and to eliminate repeated downloads of the same bundles and features, thereby dramatically improving the performance of software updates and target platform provisioning.

If you unselect the Bundle Pool checkbox, all the plugins for Papyrus-RT will be installed in the target installation directory, resulting in a more isolated install, but without taking advantage of the pool, and duplicating plugins that you may have in other installations.

You may also choose to manage multiple pools, by clicking on the button to the right of the field.

Papyrusrt-dev-install-13-eclipse-installer-manage-pools.png

8. Once done with the Product Version, Java JVM and Bundle pools, click [Next].


Select the Papyrus-RT setup project

You should see now a list of available Eclipse projects:

Papyrusrt-dev-install-14-eclipse-installer-projects.png

9. Scroll down to find and select the Papyrus-RT project.

Papyrusrt-dev-install-15-eclipse-installer-papyrus-rt-project.png


Select the components to install

10. Unfold Papyrus-RT

Papyrusrt-dev-install-16-eclipse-installer-project-unfolded.png

11. Check all the boxes on the left.

Papyrusrt-dev-install-17-eclipse-installer-components-selected.png
Note.png
Which components to select
Papyrus-RT consists of several components, listed in view above.

To set up a development environment you must select the root Papyrus-RT component.

  • Profile: Contains the UML-RT profile. All components depend on it.
  • Core: Contains core utilities. Depends on Profile, and the rest depend on it.
  • Common: Contains the common default language framework, including the runtime model library and the UI. Depends on Core, and the rest depend on it.
  • Tooling: Contains the Tooling/UI plugins (e.g. diagrams, wizards, etc.). Depends on Common.
  • Codegen: Contains the code generator and runtime system. Depends on Common and XtUML-RT.
  • XtUML-RT: Contains the intermediate representation used by the code generator, as well as transformations to UML, and textual syntax support (Xtext plugins).
  • C++: Contains plugins for specific C++ support by both Tooling and Codegen.
  • Model Migration: Contains plugins to handle model migration from other tools, specially RSA. Depends on Profile.
  • Releng: Contains the release engineering projects, including target platform definitions, POM files and scripts to handle the build.
  • Mylyn Queries: Contains Mylyn queries to link Mylyn to the Papyrus-RT Bugzilla and Gerrit repository.
  • Oomph Setup: Contains the Papyrus-RT website and within it, the Oomph Setup models to provide custom user, tester and developer installations.

If you select a component, you must also select all its dependencies. For example, if you want to work on Codegen, you will need to select Profile, Core, Common, XtUML-RT as a minimum.

If you are unsure, it is recommended to select all of them.


Note.png
On Linux
It has been reported that in some Linux platforms the checkboxes on the left may not appear. In that case, you can select the components by double-clicking on them.


12. In the bottom of the dialog there is a panel showing all the selected components:

Papyrusrt-dev-install-18-eclipse-installer-components-panel.png

Make sure that the Stream field in each and every entry is set to master (Neon/1.0) (You may need to click on each and select the appropriate stream).

Papyrusrt-dev-install-19-eclipse-installer-select-stream.png
Note.png
Stream selection
Some users specially on Mac OS X, have observed that sometimes clicking on the Stream field unselects the corresponding component. In that case just select the component again by either clicking on its check-box or double-clicking on it. The component will reappear at the end of the list.


After selecting the correct stream for all, it should look like this:

Papyrusrt-dev-install-20-eclipse-installer-all-streams-selected.png

13. Click [Next].


Configure your installation

At this point, a dialog used to configure the installation Variables will appear:

Papyrusrt-dev-install-21-eclipse-installer-variables.png

Configuration variables: If this is an installation from scratch, all variables shown above will appear. If you are performing an additional installation, Oomph will have recorded the values you previously entered and only a few variables will show, e.g.:

Papyrusrt-dev-install-21-eclipse-installer-variables-additional-install.png

You can always go back to see all variables by checking the Show all variables box at the bottom.

Papyrusrt-dev-install-28-eclipse-installer-variables-show-all.png

There are many variables that you can configure such as the location of the application, the workspace, the git repositories, as well as the urls for cloning the repositories, the target platform, etc.

For the locations of the main installation folder, the workspace and the git repositories, there are several alternative rules. There is a "root install folder" and typically, other locations will be relative to this root folder, but you can also choose an absolute location:

Papyrusrt-dev-install-22-eclipse-installer-variables-install-location.png

The installation location is the location of the Eclipse folder. By default is will be under the root folder.

The workspace location rules provide several options. The default is to have the workspace as a folder called "ws" within the installation location (next to the Eclipse folder):

Papyrusrt-dev-install-23-eclipse-installer-variables-workspace-location.png

Similarly there are several options for the location of the cloned git repositories. The default is to have these in a folder called "git" within the installation location (next to the Eclipse folder):

Papyrusrt-dev-install-24-eclipse-installer-variables-git-clone-location.png


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

The Bugzilla ID field will be used to access your bugzilla queries. You may keep the ID as "anonymous", but you won't be able to access your own queries, or you may enter your Eclipse ID, in which case, a password field will appear:

Papyrusrt-dev-install-26-eclipse-installer-variables-bugzilla-password.png

If you enter a password, it is recommended that you click the Authenticate... button. If you entered a valid password you should see this:

Papyrusrt-dev-install-27-eclipse-installer-variables-bugzilla-password-authentication.png

15. Click [Next].

Note.png
Passwords
Eclipse uses passwords for different purposes. In our case, passwords are needed to access Bugzilla entries, and to push changes to Gerrit. For this purpose, Eclipse uses a secure storage. This secure storage has a master password created automatically.


If this is the first time you are installing Eclipse, you will see a dialog titled Secure Storage - Password Hint Needed:

Papyrusrt-dev-install-29-eclipse-installer-master-password.png

If you click Yes, you will be asked for password recovery questions:

Papyrusrt-dev-install-30-eclipse-installer-password-recovery.png

Now you should see the Confirmation dialog:

Papyrusrt-dev-install-31-eclipse-installer-confirmation.png

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

17. Click [Finish].

User Agreement: If this is the first time installing, you will be asked to accept or defer acceptance of the Eclipse Foundation Software User Agreement:

Papyrusrt-dev-install-32-eclipse-installer-user-agreement.png

Click [Accept Now].

Now you should see a Progress dialog executing the first set of installation tasks as they progress:

Papyrusrt-dev-install-33-eclipse-installer-setup-first-phase.png

Licenses: If this is the first time installing you will see a dialog asking you to review and accept several licenses before the installation can proceed:

Papyrusrt-dev-install-34-eclipse-installer-licenses.png

It is recommended that you check the Remember accepted licenses box so that you don't have to accept them again when upgrading:

Papyrusrt-dev-install-35-eclipse-installer-license-acceptance.png

Also note that the Accept button is not highlighted, and Decline is the default option. Make sure you click on Accept.

Unsigned Content: Several plugins and dependencies are not signed, so if this is your first installation, you will be asked to accept unsigned content:

Papyrusrt-dev-install-36-eclipse-installer-unsigned-content.png

It is recommended that you check the Remember choice box so that you don't have to accept again when upgrading:

Papyrusrt-dev-install-37-eclipse-installer-unsigned-content-acceptance.png

After the first set of tasks is finished, the Eclipse Installer dialog will look like this:

Papyrusrt-dev-install-38-eclipse-installer-finish.png

18. Click [Finish].


Restarting

Eclipse will relaunch automatically:

Papyrusrt-dev-install-38-restart-neon-splash.png

and present you with a welcome screen:

Papyrusrt-dev-install-40-new-workbench-welcome.png

On the bottom right the status bar will show a message: Executing startup tasks.

Papyrusrt-dev-install-41-new-workbench-startup-status.png

These startup tasks will complete the rest of the installation steps.

If in step 11 you didn't select the XtUML-RT component, you can go to step 21.

If in step 11 you did select the XtUML-RT component, then you may choose to either

a) Wait several minutes until the progress reaches around 69% and then go to step 19.

or

b) See the progress of the installation by clicking on the icon to the left of this message (two circling arrows).

If you choose b), you will see the Eclipse Updater dialog which shows the execution of the remaining installation tasks:

Papyrusrt-dev-install-42-new-workbench-startup-tasks.png

During this tasks you may see dialogs titled Auto share git projects like the one below. These will automatically close.

Papyrusrt-dev-install-43-new-workbench-auto-share-git.png

After several minutes progress will stop and you will see a message *ATTENTION* will appear and it will ask you if it can download the ANTLR 3 parser generator.

At this point you have to go to the console view in the workbench.

First, you may have to move the Eclipse Updater dialog aside and bring the workbench window to the front:

Papyrusrt-dev-install-45-new-workbench-startup-tasks-move.png


Accepting the ANTLR 3 parser generator

Note.png
ANTLR 3 Parser generator
Papyrus-RT includes support for textual UML-RT. This is implemented using Xtext, which itself relies on the ANTLR parser generator. Because of some intellectual property issues it is not possible to bundle the ANTLR parser generator with the development environment. This requires that the user gives explicit permission to download and install the parser generator.


19. Click on the Workbench button on the top-right:

Papyrusrt-dev-install-46-new-workbench-go-to-workbench-button.png

Once opened, the workbench should look like this: (the Eclipse Updater dialog will be visible only if you clicked on the Executing startup tasks button.)

Papyrusrt-dev-install-47-new-workbench-all.png

In the bottom, you should see the Console view:

Papyrusrt-dev-install-48-new-workbench-console-view.png

You should see the *ATTENTION* message asking you if it can download the ANTLR 3 parser generator.

20. Scroll to the bottom right of the Console view and place your cursor immediately after the question: (type 'y' or 'n' and hit enter) and type y and hit [Enter].

Papyrusrt-dev-install-49-new-workbench-antlr-acceptance-console-view.png

Then the process will continue. If you have the Eclipse Updater dialog open, you will see something like this:

Papyrusrt-dev-install-50-new-workbench-startup-tasks-build.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
  4. Regenerate the Xtext Artifacts: find and run the GenerateTumlrt.mwe2 run configuration, by either clicking the downwards arrow next to the Run As... toolbar button, or from the menu bar go to Run → Run Configurations..., selecting GenerateTumlrt.mwe2 found under Mwe2 Launch and clicking [Run].


Gerrit passwords

During the rest of the installation you will be asked to enter your Gerrit credentials:

Papyrusrt-dev-install-51-new-workbench-startup-tasks-gerrit-password.png

21. Enter your Gerrit password (should be the same as your Eclipse password):

Papyrusrt-dev-install-52-new-workbench-startup-tasks-save-gerrit-password.png

and check the Save Password box so that you don't have to re-enter it whenever you push to Gerrit.

Finishing

During the remainder you may see some dialogs briefly popping up and automatically closing, such as this:

Papyrusrt-dev-install-52-new-workbench-startup-tasks-sync-queries.png

You may also see notifications related to Bugzilla and Gerrit queries such as this:

Papyrusrt-dev-install-53-new-workbench-startup-tasks-eclipse-notifications.png

At the end, if you had the Eclipse Updater dialog opened, it should look like this:

Papyrusrt-dev-install-54-new-workbench-startup-tasks-finish.png

And the workbench itself should look like this:

Papyrusrt-dev-install-55-new-workbench-clean.png

If you selected all components in step 11, or selected a subset of components with all their dependencies, you should not have any errors in your workspace.

Whenever you restart your new development environment, startup tasks will be executed, for example tasks to download new dependencies. Opening the Eclipse Updater dialog will show something like this:

Papyrusrt-dev-install-56-new-workbench-restart-startup-tasks.png

Also, Eclipse may ask you if you want to enable error reporting:

Papyrusrt-dev-install-57-new-workbench-startup-tasks-error-reporting.png


Done!

Back to the top