Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

Installation

For current versions of Papyrus, both Eclipse and the Papyrus plugin are bundled together in a single installation package. Note that it's possible to install more than one version of Eclipse/Papyrus on the same machine.

...

Before installing any Eclipse software, always check the status of the Eclipse Foundation servers! Installations can fail or act unpredictably if their servers are not fully operational.

...

  • To verify you have the correct version of GenDoc, first follow the instructions above for checking the version information for Eclipse.
  • In the "Papyrus Installation Details" popup, when GenDoc is properly installed, you should see something like these:

Tips and Tricks in Eclipse/Papyrus

EGit (Eclipse/Git)

If you encounter unanticipated problems when following the procedures on this page for working with Eclipse/Git, check the user guide for possible solutions: http://wiki.eclipse.org/EGit/User_Guide

...

Choosing workspace at startup

  • When Eclipse Papyrus starts, a popup window normally asks you to select a Workspace, with many different options for selection. You can also create a new workspace by writing in a new directory name in the Workspace field.

Switching workspaces

  • Within EclipsePapyrus, you can switch between workspaces by going to the menu item "File"→"Switch Workspace". 
  • Clicking "Other..." brings up a popup window similar to the one shown on startup, but that also allows you to copy workspace settings from the current workspace to a new one.

...

A perspective is a view in Eclipse that contains a series of selection and content editor areas. The perspective has an initial layout that you can change by collapsing, expanding or moving around the different areas.

Eclipse Papyrus has a number of pre-defined perspectives associated with different tasks and plugins. In ONAP we mainly use the perspectives for Papyrus and for Git.

Resetting a perspective to default layout

...

  • To change perspective, go to the menu item "Window"→"Perspective"→"Open Perspective" and then select the perspective that you want to use.
  • If you don't see the perspective you want, continue to menu item "Other" to open a popup with further options that looks like this:
  • To switch back and forth in the list of currently active perspectives, select the menu item "Window"→"Navigation"→"Next Perspective"/"Previous Perspective" or use the corresponding hotkeys:
    Image RemovedImage Added
  • There is also a toolbar for changing perspectives, normally on the top right side of your screen. You will see a number of small icons that represent perspectives:

    • The storage/cylinder icon marked "GIT" is for Git, and the bird icon is for Papyrus.
    • If you don't see the icon for the perspective that you want to use, clicking the icon with the "+" to the left of the predefined perspectives brings you to the same popup window as going to the menu item "Window"→"Perspective"→"Open Perspective"→Other".

Using the ONAP Model

...

from Gerrit in Papyrus

First-time Setup of Papyrus for ONAP Gerrit

This process must be followed if you have never used the Eclipse/Git function with Gerrit.

Setup of RSA Keys in

...

Papyrus and ONAP Gerrit

You must first generate an SSH key within

...

Papyrus

...

:

  • Go to the menu item "Window"→"Preferences", then "General"→"Network ConnectionConnections"→"SSH2".
  • Select the "Key Management" tab and click "Generate RSA Key...".

...

  • The system will generate a key for you and place the key in the same windowin the same window, in the box labelled "You can paste this public key into the remote authorized_keys file:".
  • Copy the public key. You will need to paste this into ONAP Gerrit.
  • Select "Save private key", which will save your key as an id_rsa file.
    • Note: You may be asked if you want to save this private key without passphrase protection - select OK.



  • A window will pop up with a location and a name for the key file - just click Save.


  • Don't click "Apply and Close" yet.

Add the key from Papyrus into ONAP Gerrit:

  • Login to ONAP Gerrit (https://gerrit.onap.org/).
  • Click your name at the top right and click "Settings".
  • Click or scroll to "SSH Keys". :
    Image Added
  • If you didn't copy the text of your public key before, you now need to switch Switch to the open "SSH2" window in Eclipse and copy the text of your public keyit.
  • Switch back to In Gerrit, paste the text of your public key into the "New SSH key" text box and click "Add New SSH Key".
  • Now you can go back to Eclipse and click "Apply and Close".

ONAP Gerrit user contributor agreement

To be able to push model changes to Gerrit, you need to have a CCLA (Corporate Contributor License Agreement) associated with your account in Gerrit.

  • Login to ONAP Gerrit (https://gerrit.onap.org/).
  • Click your name at the top right and click "Settings".
  • Click or scroll to "Agreements".
  • If you do not see a CCLA clickable link, click on "New Contributor Agreement" and follow the instructions:
    Image Modified

ONAP Gerrit user setup in Eclipse

To be able to push model changes to Gerrit, your "committer" user information in EGit (a.k.a. Eclipse/Git) must correspond to the user name and email you have associated with your ONAP Gerrit account. 

  • To see these settings in Login to ONAP Gerrit (https://gerrit.onap.org/), click on the drop down next to .
  • Click your name at the top right and click "Settings".
  • Click or scroll to "Profile and choose "settings". You will see your user name and email. These should be the same as for logging in to Linux Foundation.
    Image Added
  • In Papyrus To check the committer information being used by EGit (a.k.a. Git in Eclipse), in Eclipse go to: "Window"→"Preferences", then "Team"→"Git"→"Configuration", and select the "User Settings" tab:


  • The table should contain a "user" category with an "email" and a "name" entry.
    • The value for the "email" key should be your email from Gerrit.
    • The value for the "name" key should be your user name from Gerrit.
  • If "User Settings" is empty or the information doesn't match your settings in Gerrit, you will need to add or update entries in the key-value table.
    • Sometimes on an initial setup, your settings may not be writable.
      • First check that the Location field points at a valid Git config file. If you're unsure, click on "Open". This should open the .gitconfig file in the background in Eclipse.
        • Note: if you want to switch to the opened file and see its contents, you'll need to close the settings window and reopen it.
      • If the specified .gitconfig file isn't valid and writable, you may be able to fix this by exiting Eclipse, specifying your home directory in Windows, and reopening Eclipse. Follow the instructions here: http://wiki.eclipse.org/EGit/User_Guide#Setting_up_the_Home_Directory_on_Windows
    • Once your User Settings are editable:
      • If the "email" key exists but has the wrong value, select the value field in the table and provide your email from Gerrit.
      • If the table is empty or missing the "email" key, select "Add Entry...", type in the key "user.email", and provide your email from Gerrit as the value.
      • If the "name" key exists but has the wrong value, select the value field in the table and provide your user name from Gerrit.
      • If the table is empty or missing the "name" key, select "Add Entry...", type in the key "user.name", and provide your user name from Gerrit as the value.

Cloning the Information Model from Gerrit into Papyrus

The ONAP model Information Model currently resides in Gerrit in the modeling/modelspec repository. In order to download the model to your machine, to either visualize it or make updates, you will need to clone it in Eclipse/Git.download the model to your local machine by cloning it into a local Git repository and adding it to your Papyrus workspace.

  • In Papyrus, go to the Git perspective, for example
  • Bring up the Eclipse/Papyrus that you installed in the previous steps, if you haven't done so already.
    • Note: you may have to close the Eclipse Welcome page.
    • Note: If you were previously using Papyrus ONAP model when it was in a "Private" GitHub, you will have to select that repository, right click, and select "Delete Repository". Make sure you delete all files.
  • Go to the Git Perspective by selecting "Window"→"Perspective"→"Open Perspective"→"Other..." on the top of your screen and then select selecting "Git".
  • Once in the Git perspective, your screen should have the following on top:

...

  • Select the "cloud" icon with a repository and a green arrow. This is your "clone repository" function in Git:
  • In the popup window, you need to supply the URI for the Source Git Repository. The format of that URI is ssh://{LF UseridGerrit_UserId}@gerrit.onap.org:29418/modeling/modelspec
  • Based upon what you have just entered, the rest of the screen gets populated with the correct info. It should look something like this:
    Image Modified
  • Make sure to fill in User and Password with your LF Userid and password. your ONAP Gerrit password. This should be the same as for logging in to Linux Foundation. Once the screen is filled in, select "Next".
  • It will then prompt you for the branches to select. Choose: Click "Deselect All", then choose just "master" (DESELECT everything else) and click "Next". The popup should looks like this:
    Image Removed

  • You will then be prompted to select a local directory on your machine into which the model should be loaded by Git. It can be any location you want, and not necessarily the workspace you are using for Eclipse/Papyrus projects. Check the box "Import all existing Eclipse projects...".  Your screen at this point should look like this:

...