-
Notifications
You must be signed in to change notification settings - Fork 1
UML Integration
Ábel Hegedüs edited this page Apr 29, 2015
·
1 revision
- Make sure you are in Papyrus perspective
- Create Papyrus project with UML model and Class Diagram
- Create Class by dragging from Palette
- Create State Machine Diagram under Class in Model Explorer view
- Right click on class, New diagram, Create a New State Machine Diagram
- On Class Diagram select Class, show the Properties view, select Advanced, set Classifier Behavior to the State Machine
- On State Machine Diagram, Create initial node, states & transitions from Palette
- Save the UML model and you can see the resulting xtumlrt model under your Papyrus model
- You can open the xtumlrt model by right click, Open with..., Other, Sample Reflective Ecore Model Editor if the generated editor of xtUMLrt is not available
The transformation from UML to xtumlrt is done via the Query Result Traceability method based on EMF-IncQuery's Event-driven Virtual Machine. This method is also used in IncQuery's CPS example.
The steps of writing a new transformation rule:
- Write an IncQuery pattern which matches the UML object to transform. It can have more parameters to store additional information.
- Implement one or more rule classes by extending one of
AbstractRule
's subclasses. - Enumerate it in
TransformationQrt.execute
. - Write test cases for it by extending
TransformationTest
.
The integration with Papyrus is achieved with a customized IModelSetSnippet
which is registered for the extension point org.eclipse.papyrus.infra.core.org.eclipse.papyrus.infra.core.model
.