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.
Difference between revisions of "Papyrus-RT/Developer/Developer Guide/DevEnv"
m |
|||
Line 3: | Line 3: | ||
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: | |
− | + | * 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: | |
− | + | * '''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] | ||
− | + | * The '''Eclipse Installer''' | |
+ | *# Go to [http://wiki.eclipse.org/Eclipse_Installer http://wiki.eclipse.org/Eclipse_Installer] | ||
+ | *# Download the "'''Eclipse Installer'''" package for your 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. | |
+ | *: This file contains the tasks described above | ||
+ | *# 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 | Windows | We have had reports that these instructions fail on the next step on some Windows installations and we are investigating. If that is the case for you, You can first try using Java 8 and, if it still does not work, please follow the instructions on the manual installation tutorial: [[Papyrus-RT/Developer_Guide/DevEnv_Neon_Manual | Installing the Neon developer environment for PapyrusRT manually]].}} | |
<div class="figure">[[Image:PapyrusRT-O-EclipseInstaller.png]] | <div class="figure">[[Image:PapyrusRT-O-EclipseInstaller.png]] | ||
Line 24: | Line 41: | ||
== Install the development environment for Papyrus for Real Time == | == Install the development environment for Papyrus for Real Time == | ||
− | Now that the installer | + | Now that the installer and project file are available, you can install the development environment. |
=== Start the Eclipse Installer === | === Start the Eclipse Installer === | ||
− | + | 1. Open the '''eclipse-installer''' folder and double-click on the '''eclipse-inst''' application. | |
<div class="figure">[[Image:PapyrusRT-O-StartSclipseInstaller.png]] | <div class="figure">[[Image:PapyrusRT-O-StartSclipseInstaller.png]] | ||
Line 39: | Line 56: | ||
</div> | </div> | ||
− | === | + | === Switch the the '''''Advanced Mode''''' === |
− | You have now started the Eclipse Installer. | + | You have now started the Eclipse Installer. Now you will need to add the [[File:papyrus-rt-developer.setup | 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. | + | 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. | |
<div class="figure">[[Image:papyrus-rt-dev-env-install-2.png]] | <div class="figure">[[Image:papyrus-rt-dev-env-install-2.png]] | ||
</div> | </div> | ||
− | + | 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. | This has for effect to restart the Eclipse Installer in the "Advanced Mode", which will allow you to specify an external setup file. | ||
Line 57: | Line 74: | ||
</div> | </div> | ||
− | === | + | === 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'''. | |
− | + | ||
− | + | ||
<div class="figure">[[Image:papyrus-rt-dev-env-install-4.png]] | <div class="figure">[[Image:papyrus-rt-dev-env-install-4.png]] | ||
</div> | </div> | ||
− | + | {{Note | 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]''' | ||
<div class="figure">[[Image:papyrus-rt-dev-env-install-5.png]] | <div class="figure">[[Image:papyrus-rt-dev-env-install-5.png]] | ||
</div> | </div> | ||
− | + | ||
+ | === Add the setup project file to the installer === | ||
+ | |||
+ | 10. Drag and drop the setup file ([[File:papyrus-rt-developer.setup]]) onto the '''<User>''' folder. | ||
− | === | + | === Select the components to install === |
− | + | 11. Unfold '''Papyrus-RT''' and check all the boxes on the left. | |
− | + | 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). | |
<div class="figure">[[Image:papyrus-rt-dev-env-install-6.png]] | <div class="figure">[[Image:papyrus-rt-dev-env-install-6.png]] | ||
</div> | </div> | ||
− | + | 13. Click '''[Next]'''. | |
<div class="figure">[[Image:papyrus-rt-dev-env-install-7.png]] | <div class="figure">[[Image:papyrus-rt-dev-env-install-7.png]] | ||
</div> | </div> | ||
− | + | === 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. | |
+ | |||
+ | 15. Click '''[Next]'''. | ||
<div class="figure">[[Image:papyrus-rt-dev-env-install-8.png]] | <div class="figure">[[Image:papyrus-rt-dev-env-install-8.png]] | ||
Line 101: | Line 127: | ||
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]'''. | |
<div class="figure">[[Image:papyrus-rt-dev-env-install-9.png]] | <div class="figure">[[Image:papyrus-rt-dev-env-install-9.png]] | ||
</div> | </div> | ||
− | + | 17. Click '''[Finish]'''. | |
+ | |||
+ | === Restarting === | ||
+ | |||
+ | Eclipse will relaunch automatically and present you with a welcome screen: | ||
<div class="figure">[[Image:papyrus-rt-dev-env-install-10.png]] | <div class="figure">[[Image:papyrus-rt-dev-env-install-10.png]] | ||
</div> | </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) | |
<div class="figure">[[Image:papyrus-rt-dev-env-install-11.png]] | <div class="figure">[[Image:papyrus-rt-dev-env-install-11.png]] | ||
Line 121: | Line 151: | ||
</div> | </div> | ||
− | + | 18. When 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 class="figure">[[Image:papyrus-rt-dev-env-install-13.png]] | ||
</div> | </div> | ||
− | + | During setup, a few dialogs like the following will pop up: | |
<div class="figure">[[Image:papyrus-rt-dev-env-install-14.png]] | <div class="figure">[[Image:papyrus-rt-dev-env-install-14.png]] | ||
Line 133: | Line 163: | ||
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. | |
+ | |||
+ | === Setup the workspace view === | ||
+ | |||
+ | 20. Click on '''Workbench''' in the Eclipse Welcome page. You should see something like this: | ||
<div class="figure">[[Image:papyrus-rt-dev-env-install-15.png]] | <div class="figure">[[Image:papyrus-rt-dev-env-install-15.png]] | ||
</div> | </div> | ||
− | + | If the '''Package Explorer''' shows individual plugin projects instead of Working sets as shown above, you can choose to show them by clicking on the down arrow shown at the top-right of the '''Package Explorer''' view, selecting '''Top Level Elements''' and then '''Working Sets'''. | |
<div class="figure">[[Image:papyrus-rt-dev-env-install-16.png]] | <div class="figure">[[Image:papyrus-rt-dev-env-install-16.png]] |
Revision as of 11:59, 13 April 2016
Contents
- 1 Introduction
- 2 Requirements
- 3 Install the development environment for Papyrus for Real Time
- 3.1 Start the Eclipse Installer
- 3.2 Switch the the Advanced Mode
- 3.3 Select a base Eclipse Package
- 3.4 Add the setup project file to the installer
- 3.5 Select the components to install
- 3.6 Configure your installation
- 3.7 Restarting
- 3.8 Setup the workspace view
- 3.9 Generate code for EMF projects
- 3.10 Generate code for the Xtext project
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:
- 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
- The Eclipse Installer
- Go to http://wiki.eclipse.org/Eclipse_Installer
- Download the "Eclipse Installer" package for your 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.
- This file contains the tasks described above
- Download this file from https://www.eclipse.org/papyrus-rt/papyrus-rt-developer.setup
- Save it in a convenient folder such as "~/Apps/papyrus-rt-developer.setup/"
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.
You should see this:
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.
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.
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.
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]
Add the setup project file to the installer
10. Drag and drop the setup file (File:Papyrus-rt-developer.setup) onto the <User> folder.
Select the components to install
11. Unfold Papyrus-RT and check all the boxes on the left.
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).
13. Click [Next].
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.
15. Click [Next].
This shows the first set of tasks of the installation. The second set will be executed when Eclipse launches automatically.
16. Click [Finish].
17. Click [Finish].
Restarting
Eclipse will relaunch automatically and present you with a welcome screen:
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)
When it finishes it will look like this:
18. When asked for Gerrit Code Review Repository Authentication enter your Eclipse user ID and password.
During setup, a few dialogs like the following will pop up:
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.
Setup the workspace view
20. Click on Workbench in the Eclipse Welcome page. You should see something like this:
If the Package Explorer shows individual plugin projects instead of Working sets as shown above, you can choose to show them by clicking on the down arrow shown at the top-right of the Package Explorer view, selecting Top Level Elements and then Working Sets.
Generate code for EMF projects
At this point you will likely have errors shown in several projects. 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:
- Unfold the project
- Unfold the model folder
- Open the 'XXX'
.genmodel
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
- Do the same for each of the projects mentioned above.
Generate code for the Xtext project
- Under the Papyrus XtUML-RT working set, locate the
org.eclipse.papyrusrt.xtumlrt.xtext
project - 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
You may still have a couple of errors related to some missing folders. To get rid of these,
- Go to the
org.eclipse.papyrusrt.xtumlrt.xtext.ide
project - Right-click on the project
- Select New
- Select Folder
- In the resulting dialog, set the name of the new folder to src
- Repeat, creating the folders src-gen and xtend-gen