Skip to content

Commit 5491816

Browse files
odrlingRomainLefeuvreodrling
authored
K3FSM docs corrections (#244)
* 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]>
1 parent f4e8e3b commit 5491816

File tree

1 file changed

+13
-12
lines changed

1 file changed

+13
-12
lines changed

official_samples/K3FSM/docs/K3FSM.asciidoc

Lines changed: 13 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -47,21 +47,21 @@ Install the projects of this language:
4747

4848
- File -> new -> Examples... -> GEMOC K3 FSM Language example (Sequential)
4949

50-
Create and start an eclipse runtime:
50+
Create and start the corresponding modeling workbench:
5151

5252
- Run -> Run Configurations... -> Eclipse application > new
5353

54-
In the second Eclipse instance.
54+
In the modeling workbench (the second Eclipse instance).
5555

5656
Install sample models for the language:
5757

5858
- File -> new -> Examples... -> GEMOC model example for K3 FSM (Sequential)
5959

6060
Run (actually debug ;-) ) one of the provided model using the predefined launch configurations:
6161

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)_.
6363

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).
6565

6666

6767
=== Language structure overview
@@ -82,7 +82,7 @@ image::images/K3FSM/K3FSM_classes.png["K3FSM Metamodel classes and K3 aspects cl
8282
For simplification of the diagrams, the associations that doesn't represent a containment, are represented as attributes rather than links.
8383
====
8484

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.
8686

8787

8888
[[K3FSM-example-DIY]]
@@ -99,7 +99,7 @@ NOTE: You may apply some of these steps in a different order. This is only an ex
9999

100100
==== Create the Domain concepts
101101

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.
103103
** in the .dsl file, fix the _ecore_ entry by removing `platform:/resource/ecoreFilePath,` from the value.
104104
* Edit the ecore file and add the concepts corresponding to the syntaxic domain (ie. reproduce concepts of <<img-K3FSM_syntaxic_domain_figure>>).
105105

@@ -109,7 +109,7 @@ image::images/K3FSM/DIY/K3FSM_syntaxic_domain.png["FSM Syntaxic domain."]
109109

110110
* In the _org.eclipse.gemoc.example.k3fsm project_, open the *genmodel* file,
111111
** 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_)
113113
** Right click on the root element then _Generate model code_; _Generate edit code_; _Generate editor code_.
114114

115115
[TIP]
@@ -144,7 +144,7 @@ Menu _File -> New -> Ecore Modeling Project then in the template wizard of the x
144144

145145
==== Add Semantics operations
146146

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".
148148

149149
** in the .dsl file, fix the _k3_ entry by removing `qualified.class.name,` from the value.
150150
** edit the k3fsmAspect.xtend file and add the following methods in the aspects:
@@ -220,10 +220,11 @@ NOTE: Cf. <<defining-a-debug-representation-section>>
220220
** 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`;
221221
** add an image named _cursor-3-24.png_ in the icons folder of the design project.
222222
*** 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`
227228

228229
* in K3FSMViewPoint; _New Extension_ -> _Java Extension_; Qualified Class Name = `org.eclipse.gemoc.example.k3fsm.design.services.FsmAnimatorServices`
229230

0 commit comments

Comments
 (0)