Sirius ComposedProvidingRequiringEntity Editor

Aus SDQ-Wiki
Wechseln zu: Navigation, Suche
Outdated Content
Dialog-warning.png
Please note that this article is (partially) outdated.

The Sirius ComposedProvidingRequiringEntity Editor can be used to display and edit System and CompositeComponent Models. There is no stable version yet because the editor is still under development. The repository is available at https://github.com/CloudScale-Project/ArchitecturalTemplates. The editor follows the guidelines documented for Sirius Editors.

The CPRE-Editor

Installation

To install the editor follow these steps:

  1. Ensure that you have a running Eclipse version installed. Note that the editor is developed with Eclipse Mars (4.5); previous versions of Eclipse will probably not work.
  2. Choose from one of the #Update Sites
  3. In your Eclipse instance, go to Help → Install Software
  4. Enter the Update site or add and select it
  5. Select the "Palladio Component Model - Sirius Editors"-Feature from "Architectural Templates"
  6. Begin the installation with "Next"


Update sites

User Guide

The following sections provide information on how to create your model with the editor.

Prerequisites

Sirius editing is intended to be used with the Modeling Perspective. To use the editor you need a modeling project. You can either create a new one (New → Sirius → Modeling Project) or convert an existing project (Right click on project → Configure → Convert to Modeling Project). Modeling projects are denoted in the project explorer with a small 'M'. If you have already a system in your project, you need to select the "System Design"-Viewpoint (Right click on project → Viewpoint Selection).

Creating a System-model

The System-model creation wizard is available under New → Palladio Modeling. It will ask you to specify a name and location (which has to be inside a modeling project, see #Prerequisites) for the new file. You can also choose to create a representation which is enabled by default.

Creating a new diagram

If you already have an existing model you can directly create a representation for it. The most intuitive way is to navigate with the Model Explorer to the System or CompositeComponent and create a representation from its context menu.

Working with a model

After you created and opened a representation you can begin to design your model. The tools you can use are available in the palette on the right of the window. You can create nodes (AssemblyContexts, EventChannels, and Roles) by dragging them into the editor window. The objects can be edited in the Properties View. For example, you can select an AssemblyContext`s Component here. Repositories that contain Components can be loaded from the context menu ("Load resource"). Edges can be created by selecting the actual tool from the palette and then clicking first on the source connector.

Stereotypes

Profiles and their Stereotypes can be (un)applied from the context menu. The resulting StereotypeApplications are displayed by the editor.

Developer Guide

Generally, the guide for developing Palladio Sirius Editors should be read first. In this section, we provide information specific to the ComposedProvidingRequiringEntity Editor.

Required Plug-Ins

  • org.palladiosimulator.org.editors.composedprovidingrequiringentity.design: This plug-in defines the editor description file that is interpreted by the Sirius runtime. It also contains directly associated code, currently only the SystemCreationWizard.
  • org.palladiosimulator.org.editors.gmf.runtime.diagram.ui.extension: The extensions that the editor uses are defined in this plug-in. It contains commands that are used by the editor as well as the implementation for the rotating Role-nodes of the editor.
  • org.palladiosimulator.org.editors.util: Contains the class that provides the Acceleo services for the editor.

Description file

The description file for the editor defines the "System Design" Viewpoint with the "ComposedProvidingRequiringEntity Diagram". The diagram`s main component is the ComposedProvidingRequiringEntity Container. It contains the AssemblyContexts and EventChannels of the model.

One difficulty while implementing has been that the AssemblyContext`s roles are defined by its encapsulated Component which is defined in a different model and may not be changed. This influences the implementation at two points:

  • Override the delete-action because the default action would also delete the component and its connectors.
  • When one Component is used in two AssemblyContexts, it is necessary to distinguish between both Components in order to display edges correctly. This problem was solved by using preconditions, for example: "[targetView.ancestors()->filter(DNodeContainer).target->includes(self.assemblyContext_ProvidedDelegationConnector)/]". This concrete expression ensures that the Role-view (target view) is a descendent of the container view that represents the edges target AssemblyContext.

Rotatable nodes

The Role-nodes display the corresponding role-icon. Unfortunately, the existing styles are unable to rotate an image depending on the side the node is attached to its parent, which made it necessary to implement a custom EditPart that can provide this behavior. The implementation is a normal GMF-EditPart that is integrated into the editor with an EditPartProvider.

Stereotypes and Architectural Templates

To implement the Stereotypes and Architectural Templates it was necessary to call their respective APIs. The API methods have to be used to query e.g. the semantic candidates. In order to call these methods they were wrapped in a Acceleo Service class "ComposedProvidngRequiringEntityServices" because such service methods may not be static. The editing functions for the Stereotypes could not be implemented using the default Sirius tools either. They were implemented using external Java actions.

Reporting Issues

If you encounter any problems please report them at [1] to help to further improve the editor.