Last modified by msp on 2025/01/30 12:03

From version 13.1
edited by msp
on 2012/11/07 11:42
Change comment: There is no comment for this version
To version 11.1
edited by msp
on 2012/11/07 10:37
Change comment: There is no comment for this version

Summary

Details

Page properties
Content
... ... @@ -218,7 +218,7 @@
218 218  }
219 219  {{/code}}
220 220  )))
221 -1. Test the features in the diagram editor. You should now be able to select "State" in the editor's palette. Use this to create a few states. Note that if you create a state and later change the graphical representation in {{code language="none"}}StateAddFeature{{/code}}, the previously created state will still look the same, since the add feature code is only applied to new states created from the palette.
221 +1. Test the features in the diagram editor. You should now be able to select "State" in the editor's palette. Use this to create a few states. Note that if you create a state and later change the graphical representation in StateAddFeature, the previously created state will still look the same, since the add feature code is only applied to new states created from the palette.
222 222  
223 223  = Creating and Adding Connections =
224 224  
... ... @@ -391,4 +391,4 @@
391 391  1. Create a new class {{code language="none"}}StateUpdateFeature{{/code}} extending {{code language="none"}}AbstractUpdateFeature{{/code}} and register it by overriding {{code language="none"}}getUpdateFeature{{/code}} in theĀ {{code language="none"}}TuringFeatureProvider{{/code}}. This new feature is responsible for updating the displayed text when the corresponding attribute in the domain model is changed outside the Graphiti editor. For example you could open the Turing Machine model with the //Sample Reflective Ecore Model Editor //in order to modify attributes. You can activate automatic updates of the diagram by extending {{code language="none"}}isAutoUpdateAtRuntime{{/code}} (resp. {{code language="none"}}Startup{{/code}} / {{code language="none"}}Reset{{/code}}) in the {{code language="none"}}TuringDiagramTypeProvider{{/code}} and returning {{code language="none"}}true{{/code}}. The update feature can be invoked explicitly in other features by calling the superclass method {{code language="none"}}updatePictogramElement{{/code}}.
392 392  1. Create a new class {{code language="none"}}StateLayoutFeature{{/code}} extending {{code language="none"}}AbstractLayoutFeature{{/code}} and register it by overriding {{code language="none"}}getLayoutFeature{{/code}} in theĀ {{code language="none"}}TuringFeatureProvider{{/code}}. This new feature is responsible for updating the position and size of graphics algorithms of a state when the state is resized in the graphical editor or when the displayed text for the state name is updated. The layout feature can be invoked explicitly in other features by calling the superclass method {{code language="none"}}layoutPictogramElement{{/code}}.
393 393  
394 -Implement all created feature classes such that the editor behaves correctly when state names are modified or states are resized. You should aim for a good look-and-feel of your Turing Machine editor. If you like, you may also implement transition labels for displaying triggers and actions of transitions (not required for finishing the tutorial).
394 +
Confluence.Code.ConfluencePageClass[0]
Id
... ... @@ -1,1 +1,1 @@
1 -8650915
1 +3604593
URL
... ... @@ -1,1 +1,1 @@
1 -https://rtsys.informatik.uni-kiel.de/confluence//wiki/spaces/WS12EclPract/pages/8650915/Graphical Modeling with Graphiti
1 +https://rtsys.informatik.uni-kiel.de/confluence//wiki/spaces/WS12EclPract/pages/3604593/Graphical Modeling with Graphiti