You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
* Update K3FSM.asciidoc
* docs: correct debugging configuration name
* docs: typo
* docs: explain how to set the nsUri
should it really be optional?
* docs: correct package path
* docs: add step to create FSM User Palette
Co-authored-by: RomainLefeuvre <[email protected]>
Co-authored-by: odrling <[email protected]>
Copy file name to clipboardExpand all lines: official_samples/K3FSM/docs/K3FSM.asciidoc
+13-12Lines changed: 13 additions & 12 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -47,21 +47,21 @@ Install the projects of this language:
47
47
48
48
- File -> new -> Examples... -> GEMOC K3 FSM Language example (Sequential)
49
49
50
-
Create and start an eclipse runtime:
50
+
Create and start the corresponding modeling workbench:
51
51
52
52
- Run -> Run Configurations... -> Eclipse application > new
53
53
54
-
In the second Eclipse instance.
54
+
In the modeling workbench (the second Eclipse instance).
55
55
56
56
Install sample models for the language:
57
57
58
58
- File -> new -> Examples... -> GEMOC model example for K3 FSM (Sequential)
59
59
60
60
Run (actually debug ;-) ) one of the provided model using the predefined launch configurations:
61
61
62
-
- Run -> Debug Configurations... -> Gemoc Sequential eXecutable Model -> one of the K3FSM launch conf such as _K3FSM - TwostatesUpcast(abababa)_.
62
+
- Run -> Debug Configurations... -> Executable model with GEMOC Java engine -> one of the K3FSM launch conf such as _K3FSM - TwostatesUpcast(abababa)_.
63
63
64
-
You can change the string passed to the model in the launch configuration (in the _Model initialization argutments_ field).
64
+
You can change the string passed to the model in the launch configuration (in the _Model initialization arguments_ field).
For simplification of the diagrams, the associations that doesn't represent a containment, are represented as attributes rather than links.
83
83
====
84
84
85
-
The elements with a green bullet in <<img-K3FSM_classes>> are par of the semantic domain. This is the part of the model that will change during the execution of a FSM model. Note that some attributes (such as _consummedString_) may not be mandatory for correct execution but provide nice user feedback in the animation.
85
+
The elements with a green bullet in <<img-K3FSM_classes>> are part of the semantic domain. This is the part of the model that will change during the execution of a FSM model. Note that some attributes (such as _consummedString_) may not be mandatory for correct execution but provide nice user feedback in the animation.
86
86
87
87
88
88
[[K3FSM-example-DIY]]
@@ -99,7 +99,7 @@ NOTE: You may apply some of these steps in a different order. This is only an ex
99
99
100
100
==== Create the Domain concepts
101
101
102
-
* Right click on the project; _GEMOC Language_ -> _Create Domain Model Project for Language_. Name this new project "org.eclipse.gemoc.example.k3fsm". Optionally adapt the nsUri.
102
+
* Right click on the project; _GEMOC Language_ -> _Create Domain Model Project for Language_. Name this new project "org.eclipse.gemoc.example.k3fsm". Adapt the nsUri to match this name.
103
103
** in the .dsl file, fix the _ecore_ entry by removing `platform:/resource/ecoreFilePath,` from the value.
104
104
* Edit the ecore file and add the concepts corresponding to the syntaxic domain (ie. reproduce concepts of <<img-K3FSM_syntaxic_domain_figure>>).
* In the _org.eclipse.gemoc.example.k3fsm project_, open the *genmodel* file,
111
111
** change the File extensions for the model to `k3fsmxmi` (on the package: K3fsm -> K3fsm -> section Model)
112
-
** change the _Base Package_ for the model to `org.eclipse.gemoc.example.k3fsm` (on the package: Fsm -> Fsm -> section _All_)
112
+
** change the _Base Package_ for the model to `org.eclipse.gemoc.example.k3fsm` (on the package: K3fsm -> K3fsm -> section _All_)
113
113
** Right click on the root element then _Generate model code_; _Generate edit code_; _Generate editor code_.
114
114
115
115
[TIP]
@@ -144,7 +144,7 @@ Menu _File -> New -> Ecore Modeling Project then in the template wizard of the x
144
144
145
145
==== Add Semantics operations
146
146
147
-
* Right click on the xdsml project; _GEMOC Language_ -> _Create DSA Project for Language_. Next -> Select "User Ecore Basic Aspect"; Set "Aspet file name" to "K3FSMAspects".
147
+
* Right click on the xdsml project; _GEMOC Language_ -> _Create DSA Project for Language_. Next -> Select "User Ecore Basic Aspect"; Set "Aspect file name" to "K3FSMAspects".
148
148
149
149
** in the .dsl file, fix the _k3_ entry by removing `qualified.class.name,` from the value.
150
150
** edit the k3fsmAspect.xtend file and add the following methods in the aspects:
** on the animation layer; _New Diagram element_ -> _Decorations_; then _New_ -> _Mapping based decoration_; Name = "Current State"; Mapping =StateContainer; Image Expression = "/org.eclipse.gemoc.example.k3fsm.design/icons/cursor-3-24.png"; Precondition Expression = `service:self.isCurrenState`;
221
221
** add an image named _cursor-3-24.png_ in the icons folder of the design project.
222
222
*** in the plugin.xmlfile editor, add the icons folder to the binary build (ie. in the _bin.includes_ section of build.properties file) .
223
-
* in the _k3fsm.odesign_ file; in FSM Palette; add a _User fixed color_; name = _hasBeenAnimated_; select a color (pink for example)
224
-
** in the _Animation_ layer; _New Customization_ -> _Style Customizations_; then _New Customization_ -> _Style Customization_; Predicate expression = `service:self.hasBeenActivated`
225
-
** in this Customization; _New Customization_ -> _Property customization by selection_; applied on = "TransitionEdge > Edge Style solid"; Property Name = `strokeColor`, Value Selection = `hasBeenAnimated`
226
-
** in this Customization; _New Customization_ -> _Property customization by selection_; applied on = (all Gradient stuff related to StateContainer) ; Property Name = `borderColor`, Value Selection = `hasBeenAnimated`
223
+
* in the _k3fsm.odesign_ file; in k3fsm; add a _User Colors Palette_; name = _FSM Palette_
224
+
** in FSM Palette; add a _User fixed color_; name = _hasBeenAnimated_; select a color (pink for example)
225
+
*** in the _Animation_ layer; _New Customization_ -> _Style Customizations_; then _New Customization_ -> _Style Customization_; Predicate expression = `service:self.hasBeenActivated`
226
+
*** in this Customization; _New Customization_ -> _Property customization by selection_; applied on = "TransitionEdge > Edge Style solid"; Property Name = `strokeColor`, Value Selection = `hasBeenAnimated`
227
+
*** in this Customization; _New Customization_ -> _Property customization by selection_; applied on = (all Gradient stuff related to StateContainer) ; Property Name = `borderColor`, Value Selection = `hasBeenAnimated`
227
228
228
229
* in K3FSMViewPoint; _New Extension_ -> _Java Extension_; Qualified Class Name = `org.eclipse.gemoc.example.k3fsm.design.services.FsmAnimatorServices`
0 commit comments