Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.
Comment: Migrated to Confluence 5.3

There are different transition types in KIELER SyncCharts, which are "weak abortion", "strong abortion", or "normal termination". The "weak abortion" transition is represented as a simple black arrow. The "strong abortion" transition is represented as a black arrow with a little red circle at the start point. The "normal termination" transition has a little green triangle at the start point.

To add the transition types in Yakindu SCT Editor, we need the following steps:

Table of Contents

 

Modify the Metamodel in org.yakindu.sct.model.sgraph/model/emf/sgraph.genmodel

Create an enumeration type "TransitionType".

Image Added

Add the attribute "type" to the Transition Class.

Image Added

And then generate the EMF Model Code.

 

Modify the State Figure in org.yakindu.sct.ui.editor/src/org/yakindu/sct/ui/editor/editor/figures/TransitionFigure.java

Modify the constructor

Image Added

Add the methods createNormalTerminationDecoration() and createStrongAbortDecoration() to draw the different source decorators.

Image Added

Image Added

And then create a method refreshSourceDecoration() to refresh the source decorator, if the transition type is changed.

Image Added

Modify the Transition Propertysheets in org.yakindu.sct.ui.editor/src/org/yakindu/sct/ui/editor/propertysheets/TransitionPropertySection.java

Add a transitionType ComboBox. The user can select between the different options: Weak Abort, Strong Abort, and Normal Termination.

Image Added

Image Added

Image Added

Modify the Transition EditPart in org.yakindu.sct.ui.editor/src/org/yakindu/sct/ui/editor/editparts/TransitionEditPart.java

Add the following code lines in the method handleNotificationEvent() to update the source decorator when the user changes the Transition Type.

Image Added