Palladio Component Model/Sirius Editor Usage

Aus SDQ-Wiki
Warning
This page was moved to the GitHub wiki

Benefits

The new editors have several benefits compared to the old GMF-based ones:

  • Improved synchronization over several models and diagrams, no more discarding changes
  • Greatly improved allocation editor (with drag & drop of AssemblyContexts)
  • No more remnant model elements when deleting something in the diagram (e.g. AssemblyConnectors)
  • Keep your diagrams on most metamodel migrations
  • No more buffer overflows when opening huge diagrams
  • Graphical modeling of DataTypes in the Repository diagram
  • Graphical modeling of ResourceRoles in the Repository diagram

Installation

Currently, the new Sirius editors for the PCM are only contained in the nightly build. They can be installed either trough the update site or by downloading the nightly build drop.

Installation via update site

Issue Tracker

If you encounter bugs or have improvement suggestions, please report them through our issue tracker.

Currently known issues

MINOR: Project creation using a template (not an editor problem)

Creating new Palladio projects using a template might result in uncaught exceptions. As a workaround, don't use the problematic templates. Some models contained in the templates might be outdated. This does not impair the general functionality of the editors. However, the template models might be broken and/or the editors might not work properly for these templates.

Creating new Palladio projects and models

The creation of a Palladio project and PCM models can be easily done through the creation wizards either by using the toolbar buttons or the "New" Wizard under the "Palladio Modeling" category.

Palladio project and models creation toolbar buttons - In the red frame: Palladio project creation toolbar button; in the green frame, from left to right: Repository, Assembly, ResourceEnvironment, Allocation and UsageModel model creation toolbar buttons

Creating a Palladio project

To create a new Palladio project, simply click on the Palladio project creation toolbar button. This will open a creation wizard, where you can choose the name and the location of the project.

New Palladio Project.PNG

Optionally, click on "Next" so you can select an initiator Architectural Template to create an initial Palladio model. Otherwise, simply click on "Finish" to complete the project creation.

Templates.PNG

Eventually you will be asked to open the Palladio perspective, which has the Model Explorer view enabled. Click on "Ok" if you want to, otherwise click on "Cancel".

Open perspective.PNG

Creating a Palladio Model

To create a Palladio model, simply click on the toolbar button corresponding to the model you want to create. This will open a creation wizard, where you can choose the location and the name of the model file. By default, a representation will be automatically created for your model, but you can choose to disable this on the second page of the creation wizard. By clicking "Finish", the corresponding viewpoint is selected and the representation eventually gets opened.

Location of the representations

The diagrams are located in the "representations.aird" file. In the Model Explorer view, the representation also displayed directly in the model tree under the corresponding model element.

Tree.PNG

Enabling Sirius editor support for existing projects

If you wish to use the Sirius editors in an already existing project, please follow the steps below. As a requirement, you will need to have Eclipse Neon and the Sirius plugin installed.

To be able to work properly with the Sirius Editors, you need to open the Model Explorer view. For this purpose, open the Palladio perspective or the Modeling perspective, since they already have the Model Explorer view enabled. Alternatively, open the Model Explorer view in the perspective of your choice.

Perspective.PNG

Add then the modeling nature to the project in question by performing a right-click on it > Configure > Convert to Modeling Project

Modeling Nature.png

Activate the relevant viewpoints by right-clicking on the project and clicking on Viewpoint Selection. Select then the relevant viewpoints.

Viewpoints.PNG

After activating the needed viewpoints, a representation is automatically created for each model corresponding to the selected viewpoints. The representation can be found either directly under the model element in question or under the file "representations.aird".

Tree.PNG

Double clicking the representation opens the corresponding Sirius Editor.

Editor.PNG

Repairing Sirius editor support for existing projects

If you are facing the issue that you cannot create or view new diagrams, you can perform the following steps to recover your diagrams. Not all steps might be necessary, so check if the error still exists after every step.

  1. If possible: Revert the project to the last working state via your version control system or via the local history
  2. Make sure you are in the PCM or Modeling perspective
  3. Close and reopen the project via the context menu
  4. Remove the Modeling nature from the project via the context menu Configure - Remove Modeling Project Nature
  5. Execute the steps for enabling Sirius editors described above

If you still cannot create or view diagrams, you have to remove all your diagrams (not your models) and start over:

  1. Remove the modeling nature as described above
  2. Delete the *.aird file from the project
  3. Execute the steps for enabling Sirius editors described above

Deleting and adding diagrams

Diagrams can be deleted by deleting the representation of the model in question via the model tree in the Model Explorer view. Multiple diagrams can exist for a single model element. To create further representations for a given model element, right click on this element in the Model Explorer view and click on new representation.