Pārlūkot izejas kodu

updated documentation

Simon Van Mierlo 8 gadi atpakaļ
vecāks
revīzija
23600f91e8

BIN
doc/_build/doctrees/environment.pickle


BIN
doc/_build/doctrees/new_language.doctree


BIN
doc/_build/doctrees/overview.doctree


BIN
doc/_build/html/_images/cs_toolbar.png


+ 38 - 2
doc/_build/html/_sources/new_language.txt

@@ -152,12 +152,12 @@ A class or association can have attributes. These attributes are represented by
     * *boolean*: a boolean
     * *boolean*: a boolean
     * *code*: a block of code
     * *code*: a block of code
     * *file<pattern>*: a string which specifies the locatation of a file (such as a model). Attribute values have to match the specified pattern.
     * *file<pattern>*: a string which specifies the locatation of a file (such as a model). Attribute values have to match the specified pattern.
-    * *map<[keys...], [base-types...]>*: a dictionary with specified keys, and for each key, a value of the specified base-type.
+    * *map<[keys...],[base-types...]>*: a dictionary with specified keys, and for each key, a value of the specified base-type.
     * *list<base-type>*: a list of base-type values.
     * *list<base-type>*: a list of base-type values.
     * *ENUM(options...)*: a choice of several options.
     * *ENUM(options...)*: a choice of several options.
     * *$ATTRIBUTE*: *map<[name,type,default],[string,string,string]>*
     * *$ATTRIBUTE*: *map<[name,type,default],[string,string,string]>*
     * *$CARDINALITY*: *map<[dir,type,min,max],[string,string,string,string]>*
     * *$CARDINALITY*: *map<[dir,type,min,max],[string,string,string,string]>*
-    * *$EVENT*: *ENUM( pre-connect , pre-create , pre-disconnect , pre-delete , pre-edit , post-connect , post-create , post-disconnect , post-delete , post-edit )*
+    * *$EVENT*: *ENUM(pre-connect,pre-create,pre-disconnect,pre-delete,pre-edit,post-connect,post-create,post-disconnect,post-delete,post-edit)*
     * *$EVENT_HANDLER*: *map<[name,event,code],[string,$EVENT,code]>*	
     * *$EVENT_HANDLER*: *map<[name,event,code],[string,$EVENT,code]>*	
     * *$ARG*: *map<[name,type],[string,string]>*	
     * *$ARG*: *map<[name,type],[string,string]>*	
     * *$METHOD*: *map<[name,args,returntype,body],[string,list<$ARG>,string,code]>*
     * *$METHOD*: *map<[name,args,returntype,body],[string,list<$ARG>,string,code]>*
@@ -165,6 +165,8 @@ A class or association can have attributes. These attributes are represented by
 
 
 .. warning:: Default values need to evaluate to values that are of the specified type!
 .. warning:: Default values need to evaluate to values that are of the specified type!
 
 
+.. warning:: When defining a map/ENUM, its keys/options are defined as a comma-separated list. Do NOT insert any whitespaces before or after the comma's, as these will be seen as part of the key/option name.
+
 Depending on the type, the editor presented to the user is different. For an int/float/string it is an input field, for code a text area, for a file the user is presented with a file browser, etc.
 Depending on the type, the editor presented to the user is different. For an int/float/string it is an input field, for code a text area, for a file the user is presented with a file browser, etc.
 
 
 .. _inheritance:
 .. _inheritance:
@@ -187,6 +189,8 @@ As a local constraint:
 
 
 .. image:: img/local_constraint.png
 .. image:: img/local_constraint.png
 
 
+.. warning:: Multi-line local constraints need to have each line end with "\\".
+
 One disadvantage of this constraint is that the minimum number of instances (also 1) is not checked. A global constraint solves this:
 One disadvantage of this constraint is that the minimum number of instances (also 1) is not checked. A global constraint solves this:
 
 
 .. image:: img/global_constraint.png
 .. image:: img/global_constraint.png
@@ -207,6 +211,8 @@ As a local action:
 
 
 .. image:: img/local_action.png
 .. image:: img/local_action.png
 
 
+.. warning:: Multi-line local actions need to have each line end with "\\".
+
 As a global action:
 As a global action:
 
 
 .. image:: img/global_action.png
 .. image:: img/global_action.png
@@ -285,6 +291,8 @@ Action Library
 Defining Concrete Syntax
 Defining Concrete Syntax
 ------------------------
 ------------------------
 
 
+.. image:: img/cs_toolbar.png
+
 The concrete syntax definition of a language is a model in the */Formalisms/__LanguageSyntax__/ConcreteSyntax.defaultIcons.metamodel* language. It defines for each non-abstract class and association a visual icon.
 The concrete syntax definition of a language is a model in the */Formalisms/__LanguageSyntax__/ConcreteSyntax.defaultIcons.metamodel* language. It defines for each non-abstract class and association a visual icon.
 
 
 There are two "main" classes: **Icon** and **Link**. The first is a container for visual elements that make up the visualization of a class instance. The second is a definition of the visualization of an association instance (an arrow). For example, this is the definition of the concrete syntax of the *TrafficLights* language:
 There are two "main" classes: **Icon** and **Link**. The first is a container for visual elements that make up the visualization of a class instance. The second is a definition of the visualization of an association instance (an arrow). For example, this is the definition of the concrete syntax of the *TrafficLights* language:
@@ -295,6 +303,34 @@ There are two "main" classes: **Icon** and **Link**. The first is a container fo
 
 
 .. note:: For Icons, place its contents as close as possible to the top-left corner. This ensures that the icon is instantiated as close as possible to the mouse position.
 .. note:: For Icons, place its contents as close as possible to the top-left corner. This ensures that the icon is instantiated as close as possible to the mouse position.
 
 
+*Icon* and *Link* contents are modelled as instances of eight classes:
+
+#. *Rectangle*
+    * *width* defines the width (in pixels).
+    * *height* defines the width (in pixels).
+    * *cornerRadius* defines the amount of rounding of the corners (as a percentage).
+#. *Text*
+    * *textContent* defines the text content of the text element.
+#. *Circle*
+    * *r* defines the readius of the instantiated rectangle (in pixels).
+#. *Ellips*
+    * *rx* defines the radius on the x-axis (in pixels).
+    * *ry* defines the radius on the y-axis (in pixels).
+#. *Polygon*
+    * *r* defines the radius (in pixels).
+    * *sides* defines the amount of sides.
+#. *Star*
+    * *r* defines the radius (in pixels).
+    * *rays* defines the amount of rays.
+#. *Path*
+    * *segments* defines the segments of the path -- this allows for arbitrary shapes using the `SVG Paths <https://www.w3.org/TR/SVG/paths.html>`_ syntax.
+#. *Image*
+    * *src* specifies where the image can be found. This is a path relative to your user folder. It is recommended to put your images in your formalism folder (for example */Formalisms/<FormalismName>/images/).
+    * *width* defines the width of the image (in pixels).
+    * *height* defines the width of the image (in pixels).
+    
+.. warning:: Scaling your elements with the geometry controls does not affect the size of the instantiated elements! You need to change the *width*/*height*/*r*/*rx*/*ry* attributes (depending on the element).
+
 Mappers and Parsers
 Mappers and Parsers
 ^^^^^^^^^^^^^^^^^^^
 ^^^^^^^^^^^^^^^^^^^
 All visual elements have a number of attributes that change its appearance. For example, a circle has a radius that can be changed to resize it. But, you might want to make the values of concrete syntax attributes depend on the values of abstract syntax attributes, and vice versa, make the values of abstract syntax attributes depend on the value of concrete syntax attributes.
 All visual elements have a number of attributes that change its appearance. For example, a circle has a radius that can be changed to resize it. But, you might want to make the values of concrete syntax attributes depend on the values of abstract syntax attributes, and vice versa, make the values of abstract syntax attributes depend on the value of concrete syntax attributes.

+ 24 - 19
doc/_build/html/_sources/overview.txt

@@ -114,18 +114,19 @@ When in the **DEFAULT** state,
 +---------------------------------+-----------------------------------------------------------------------------+
 +---------------------------------+-----------------------------------------------------------------------------+
 | Select an entity                | Left-click any entity. This will also select the entity's contents, if      |
 | Select an entity                | Left-click any entity. This will also select the entity's contents, if      |
 |                                 | any. To select a container without selecting its contents, SHIFT-Left-click |
 |                                 | any. To select a container without selecting its contents, SHIFT-Left-click |
-|                                 | it.                                                                         |
+|                                 | it. Enters the **SOMETHING SELECTED** state.                                |
 +---------------------------------+-----------------------------------------------------------------------------+
 +---------------------------------+-----------------------------------------------------------------------------+
 | Select one or more entity       | Left-press anywhere on Canvas, drag selection box around desired            |
 | Select one or more entity       | Left-press anywhere on Canvas, drag selection box around desired            |
-|                                 | entity or entities and release.                                             |
+|                                 | entity or entities and release. Enters the **SOMETHING SELECTED** state.    |
 +---------------------------------+-----------------------------------------------------------------------------+
 +---------------------------------+-----------------------------------------------------------------------------+
-| Connect entities                | Right-press an entity, drag to-be edge to target entity and release.        |
+| Connect entities                | Right-press an entity (enters the **DRAWING EDGE** state), drag to-be edge  |
+|                                 | to target entity and release.                                               |
 +---------------------------------+-----------------------------------------------------------------------------+
 +---------------------------------+-----------------------------------------------------------------------------+
 | Edit icon text                  | SHIFT-Middle-click any text from any icon on the Canvas (this               |
 | Edit icon text                  | SHIFT-Middle-click any text from any icon on the Canvas (this               |
 |                                 | will display a very simple text editor).                                    |
 |                                 | will display a very simple text editor).                                    |
 +---------------------------------+-----------------------------------------------------------------------------+
 +---------------------------------+-----------------------------------------------------------------------------+
 | Edit entity                     | Middle-click or SHIFT-Left-click any entity on the Canvas (this will        | 
 | Edit entity                     | Middle-click or SHIFT-Left-click any entity on the Canvas (this will        | 
-|                                 | display the abstract attribute editor).                                     |
+|                                 | display the attribute editor).                                              |
 +---------------------------------+-----------------------------------------------------------------------------+
 +---------------------------------+-----------------------------------------------------------------------------+
 
 
 When in the **SOMETHING SELECTED** state (*i.e.*, when one or more entity is selected), |something_selected|
 When in the **SOMETHING SELECTED** state (*i.e.*, when one or more entity is selected), |something_selected|
@@ -138,21 +139,21 @@ When in the **SOMETHING SELECTED** state (*i.e.*, when one or more entity is sel
 +--------------------------------------+-----------------------------------------------------------------------------+
 +--------------------------------------+-----------------------------------------------------------------------------+
 | Action                               | Shortcut(s)                                                                 |
 | Action                               | Shortcut(s)                                                                 |
 +======================================+=============================================================================+
 +======================================+=============================================================================+
-| Unselect selection                   | Right-/Left-/Middle-click anywhere on the Canvas, or click ESC.             |
+| Unselect selection                   | Right-/Left-/Middle-click anywhere on the Canvas, or click ESC. Enters the  |
+|                                      | **DEFAULT** state.                                                          |
 +--------------------------------------+-----------------------------------------------------------------------------+
 +--------------------------------------+-----------------------------------------------------------------------------+
 | Move selection                       | Left-press selection, drag preview overlay to desired position and          |
 | Move selection                       | Left-press selection, drag preview overlay to desired position and          |
-|                                      | release.                                                                    |
+|                                      | release. Enters the **DEFAULT** state.                                      |
 +--------------------------------------+-----------------------------------------------------------------------------+
 +--------------------------------------+-----------------------------------------------------------------------------+
-| Delete selection                     | Press DELETE.                                                               |
+| Delete selection                     | Press DELETE. Enters the **DEFAULT** state.                                 |
 +--------------------------------------+-----------------------------------------------------------------------------+
 +--------------------------------------+-----------------------------------------------------------------------------+
-| Edit first entity in selection       | Click INSERT, or click COMMAND (this will display the abstract attribute    |
-|                                      | editor).                                                                    |
+| Edit first entity in selection       | Click INSERT, or click COMMAND (this will display the attribute editor.     |
 +--------------------------------------+-----------------------------------------------------------------------------+
 +--------------------------------------+-----------------------------------------------------------------------------+
-| Enter geometry editing mode          | Click CTRL (this will display geometry controls).                           |
+| Change the geometry of the selection | Click CTRL. Enters the **GEOMETRY EDITING** state.                          |
 +--------------------------------------+-----------------------------------------------------------------------------+
 +--------------------------------------+-----------------------------------------------------------------------------+
-| Enter edge editing mode              | Click SHIFT (this will display editable edge control points).               |
+| Edit the selected edge               | Click SHIFT. Enters the **EDGE EDITING** state.                             |
 +--------------------------------------+-----------------------------------------------------------------------------+
 +--------------------------------------+-----------------------------------------------------------------------------+
-| Snap selection to nearest grid point | Click TAB.                                                                  |
+| Snap selection to nearest grid point | Click TAB. Enters the **DEFAULT** state.                                    |
 +--------------------------------------+-----------------------------------------------------------------------------+
 +--------------------------------------+-----------------------------------------------------------------------------+
 
 
 When in the **DRAGGING SELECTION** state (*i.e.*, when left-dragging one or more selected entity), |dragging_selection|
 When in the **DRAGGING SELECTION** state (*i.e.*, when left-dragging one or more selected entity), |dragging_selection|
@@ -165,14 +166,14 @@ When in the **DRAGGING SELECTION** state (*i.e.*, when left-dragging one or more
 +--------------------------------------+-----------------------------------------------------------------------------+
 +--------------------------------------+-----------------------------------------------------------------------------+
 | Action                               | Shortcut(s)                                                                 |
 | Action                               | Shortcut(s)                                                                 |
 +======================================+=============================================================================+
 +======================================+=============================================================================+
-| Insert selection into container      | Left-release on top of the target entity.                                   |
+| Insert selection into container      | Left-release on top of the target entity. Enters the **DEFAULT** state.     |
 +--------------------------------------+-----------------------------------------------------------------------------+
 +--------------------------------------+-----------------------------------------------------------------------------+
 | Remove selection from container      | Left-release outside of current container. Containment relationships can    |
 | Remove selection from container      | Left-release outside of current container. Containment relationships can    |
-|                                      | also be deleted manually if visible.                                        |
+|                                      | also be deleted manually if visible. Enters the **DEFAULT** state.          |
 +--------------------------------------+-----------------------------------------------------------------------------+
 +--------------------------------------+-----------------------------------------------------------------------------+
-| Confirm motion                       | Left-release on the Canvas.                                                 |
+| Confirm motion                       | Left-release on the Canvas. Enters the **DEFAULT** state.                   |
 +--------------------------------------+-----------------------------------------------------------------------------+
 +--------------------------------------+-----------------------------------------------------------------------------+
-| Cancel motion                        | Click ESC.                                                                  |
+| Cancel motion                        | Click ESC. Enters the **DEFAULT** state.                                    |
 +--------------------------------------+-----------------------------------------------------------------------------+
 +--------------------------------------+-----------------------------------------------------------------------------+
 
 
 When in the **DRAWING EDGE** state (*i.e.*, when dragging to-be edge from source to target entities), |drawing_edge|
 When in the **DRAWING EDGE** state (*i.e.*, when dragging to-be edge from source to target entities), |drawing_edge|
@@ -191,7 +192,7 @@ When in the **DRAWING EDGE** state (*i.e.*, when dragging to-be edge from source
 +---------------------------------------+-----------------------------------------------------------------------------+
 +---------------------------------------+-----------------------------------------------------------------------------+
 | Delete last control point             | Middle-click anywhere, or click ALT.                                        |
 | Delete last control point             | Middle-click anywhere, or click ALT.                                        |
 +---------------------------------------+-----------------------------------------------------------------------------+
 +---------------------------------------+-----------------------------------------------------------------------------+
-| Cancel current edge                   | Left-release anywhere on the Canvas.                                        |
+| Cancel current edge                   | Left-release anywhere on the Canvas. Enters the **DEFAULT** state.          |
 +---------------------------------------+-----------------------------------------------------------------------------+
 +---------------------------------------+-----------------------------------------------------------------------------+
 
 
 When in the **EDGE EDITING** state, |edge_editing|
 When in the **EDGE EDITING** state, |edge_editing|
@@ -214,6 +215,9 @@ When in the **EDGE EDITING** state, |edge_editing|
 | Delete control point                  | Middle-click any control point (extremities and the central control         |
 | Delete control point                  | Middle-click any control point (extremities and the central control         |
 |                                       | point cannot be removed).                                                   |
 |                                       | point cannot be removed).                                                   |
 +---------------------------------------+-----------------------------------------------------------------------------+
 +---------------------------------------+-----------------------------------------------------------------------------+
+| Finish editing                        | Right-/Left-/Middle-click anywhere on the Canvas, or click ESC. Enters the  |
+|                                       | **DEFAULT** state.                                                          |
++---------------------------------------+-----------------------------------------------------------------------------+
 
 
 When in the **GEOMETRY EDITING** state, |geometry_editing|
 When in the **GEOMETRY EDITING** state, |geometry_editing|
 
 
@@ -237,9 +241,10 @@ When in the **GEOMETRY EDITING** state, |geometry_editing|
 | Rotate                                | Mouse-wheel up/down on rotation icon until preview overlay reaches desired  |
 | Rotate                                | Mouse-wheel up/down on rotation icon until preview overlay reaches desired  |
 |                                       | shape.                                                                      |
 |                                       | shape.                                                                      |
 +---------------------------------------+-----------------------------------------------------------------------------+
 +---------------------------------------+-----------------------------------------------------------------------------+
-| Cancel changes                        | Right-/Left-/Middle-click anywhere on the Canvas, or click ESC.             |
+| Cancel changes                        | Right-/Left-/Middle-click anywhere on the Canvas, or click ESC. Enters the  |
+|                                       | **DEFAULT** state.                                                          |
 +---------------------------------------+-----------------------------------------------------------------------------+
 +---------------------------------------+-----------------------------------------------------------------------------+
-| Confirm changes                       | Left-click confirmation icon.                                               |
+| Confirm changes                       | Left-click confirmation icon. Enters the **DEFAULT** state.                 |
 +---------------------------------------+-----------------------------------------------------------------------------+
 +---------------------------------------+-----------------------------------------------------------------------------+
 
 
 Console
 Console

+ 93 - 2
doc/_build/html/new_language.html

@@ -178,12 +178,12 @@
 <li><em>boolean</em>: a boolean</li>
 <li><em>boolean</em>: a boolean</li>
 <li><em>code</em>: a block of code</li>
 <li><em>code</em>: a block of code</li>
 <li><em>file&lt;pattern&gt;</em>: a string which specifies the locatation of a file (such as a model). Attribute values have to match the specified pattern.</li>
 <li><em>file&lt;pattern&gt;</em>: a string which specifies the locatation of a file (such as a model). Attribute values have to match the specified pattern.</li>
-<li><em>map&lt;[keys...], [base-types...]&gt;</em>: a dictionary with specified keys, and for each key, a value of the specified base-type.</li>
+<li><em>map&lt;[keys...],[base-types...]&gt;</em>: a dictionary with specified keys, and for each key, a value of the specified base-type.</li>
 <li><em>list&lt;base-type&gt;</em>: a list of base-type values.</li>
 <li><em>list&lt;base-type&gt;</em>: a list of base-type values.</li>
 <li><em>ENUM(options...)</em>: a choice of several options.</li>
 <li><em>ENUM(options...)</em>: a choice of several options.</li>
 <li><em>$ATTRIBUTE</em>: <em>map&lt;[name,type,default],[string,string,string]&gt;</em></li>
 <li><em>$ATTRIBUTE</em>: <em>map&lt;[name,type,default],[string,string,string]&gt;</em></li>
 <li><em>$CARDINALITY</em>: <em>map&lt;[dir,type,min,max],[string,string,string,string]&gt;</em></li>
 <li><em>$CARDINALITY</em>: <em>map&lt;[dir,type,min,max],[string,string,string,string]&gt;</em></li>
-<li><em>$EVENT</em>: <em>ENUM( pre-connect , pre-create , pre-disconnect , pre-delete , pre-edit , post-connect , post-create , post-disconnect , post-delete , post-edit )</em></li>
+<li><em>$EVENT</em>: <em>ENUM(pre-connect,pre-create,pre-disconnect,pre-delete,pre-edit,post-connect,post-create,post-disconnect,post-delete,post-edit)</em></li>
 <li><em>$EVENT_HANDLER</em>: <em>map&lt;[name,event,code],[string,$EVENT,code]&gt;</em></li>
 <li><em>$EVENT_HANDLER</em>: <em>map&lt;[name,event,code],[string,$EVENT,code]&gt;</em></li>
 <li><em>$ARG</em>: <em>map&lt;[name,type],[string,string]&gt;</em></li>
 <li><em>$ARG</em>: <em>map&lt;[name,type],[string,string]&gt;</em></li>
 <li><em>$METHOD</em>: <em>map&lt;[name,args,returntype,body],[string,list&lt;$ARG&gt;,string,code]&gt;</em></li>
 <li><em>$METHOD</em>: <em>map&lt;[name,args,returntype,body],[string,list&lt;$ARG&gt;,string,code]&gt;</em></li>
@@ -198,6 +198,10 @@
 <p class="first admonition-title">Warning</p>
 <p class="first admonition-title">Warning</p>
 <p class="last">Default values need to evaluate to values that are of the specified type!</p>
 <p class="last">Default values need to evaluate to values that are of the specified type!</p>
 </div>
 </div>
+<div class="admonition warning">
+<p class="first admonition-title">Warning</p>
+<p class="last">When defining a map/ENUM, its keys/options are defined as a comma-separated list. Do NOT insert any whitespaces before or after the comma&#8217;s, as these will be seen as part of the key/option name.</p>
+</div>
 <p>Depending on the type, the editor presented to the user is different. For an int/float/string it is an input field, for code a text area, for a file the user is presented with a file browser, etc.</p>
 <p>Depending on the type, the editor presented to the user is different. For an int/float/string it is an input field, for code a text area, for a file the user is presented with a file browser, etc.</p>
 </div>
 </div>
 <div class="section" id="inheritance">
 <div class="section" id="inheritance">
@@ -211,6 +215,10 @@
 <p>A constraint needs to evaluate to a boolean value. The constraint code is written in Javascript. This means <strong>the last statement executed by the constraint needs to evaluate to a boolean value</strong>. For example, let&#8217;s model the constraint that only one instance of the <em>Time</em> class can be instantiated.</p>
 <p>A constraint needs to evaluate to a boolean value. The constraint code is written in Javascript. This means <strong>the last statement executed by the constraint needs to evaluate to a boolean value</strong>. For example, let&#8217;s model the constraint that only one instance of the <em>Time</em> class can be instantiated.</p>
 <p>As a local constraint:</p>
 <p>As a local constraint:</p>
 <img alt="_images/local_constraint.png" src="_images/local_constraint.png" />
 <img alt="_images/local_constraint.png" src="_images/local_constraint.png" />
+<div class="admonition warning">
+<p class="first admonition-title">Warning</p>
+<p class="last">Multi-line local constraints need to have each line end with &#8220;\&#8221;.</p>
+</div>
 <p>One disadvantage of this constraint is that the minimum number of instances (also 1) is not checked. A global constraint solves this:</p>
 <p>One disadvantage of this constraint is that the minimum number of instances (also 1) is not checked. A global constraint solves this:</p>
 <img alt="_images/global_constraint.png" src="_images/global_constraint.png" />
 <img alt="_images/global_constraint.png" src="_images/global_constraint.png" />
 <p>This constraint checks, when the user presses the <em>validate</em> button on the <em>MainMenu</em> toolbar, whether exactly one instance of the <em>Time</em> class is instantiated. For more information on which functions are available, see <a class="reference internal" href="#action-library"><span class="std std-ref">Action Library</span></a>.</p>
 <p>This constraint checks, when the user presses the <em>validate</em> button on the <em>MainMenu</em> toolbar, whether exactly one instance of the <em>Time</em> class is instantiated. For more information on which functions are available, see <a class="reference internal" href="#action-library"><span class="std std-ref">Action Library</span></a>.</p>
@@ -222,6 +230,10 @@
 <p>For example, let&#8217;s model an action that sets the <em>clock</em> attribute of a <em>Time</em> instance to 0 whenever a <em>Time</em> instance is created. Note that this is not really necessary, as the default value already makes sure the attribute is correctly initialized.</p>
 <p>For example, let&#8217;s model an action that sets the <em>clock</em> attribute of a <em>Time</em> instance to 0 whenever a <em>Time</em> instance is created. Note that this is not really necessary, as the default value already makes sure the attribute is correctly initialized.</p>
 <p>As a local action:</p>
 <p>As a local action:</p>
 <img alt="_images/local_action.png" src="_images/local_action.png" />
 <img alt="_images/local_action.png" src="_images/local_action.png" />
+<div class="admonition warning">
+<p class="first admonition-title">Warning</p>
+<p class="last">Multi-line local actions need to have each line end with &#8220;\&#8221;.</p>
+</div>
 <p>As a global action:</p>
 <p>As a global action:</p>
 <img alt="_images/global_action.png" src="_images/global_action.png" />
 <img alt="_images/global_action.png" src="_images/global_action.png" />
 <p>One major disadvantage of the global action is that the clock will be set to 0 every time an instance is created, regardless of its type.</p>
 <p>One major disadvantage of the global action is that the clock will be set to 0 every time an instance is created, regardless of its type.</p>
@@ -347,6 +359,7 @@ do not trigger pre-editing constraints and post-editing actions).</td>
 </div>
 </div>
 <div class="section" id="defining-concrete-syntax">
 <div class="section" id="defining-concrete-syntax">
 <span id="id12"></span><h2>Defining Concrete Syntax<a class="headerlink" href="#defining-concrete-syntax" title="Permalink to this headline">¶</a></h2>
 <span id="id12"></span><h2>Defining Concrete Syntax<a class="headerlink" href="#defining-concrete-syntax" title="Permalink to this headline">¶</a></h2>
+<img alt="_images/cs_toolbar.png" src="_images/cs_toolbar.png" />
 <p>The concrete syntax definition of a language is a model in the <em>/Formalisms/__LanguageSyntax__/ConcreteSyntax.defaultIcons.metamodel</em> language. It defines for each non-abstract class and association a visual icon.</p>
 <p>The concrete syntax definition of a language is a model in the <em>/Formalisms/__LanguageSyntax__/ConcreteSyntax.defaultIcons.metamodel</em> language. It defines for each non-abstract class and association a visual icon.</p>
 <p>There are two &#8220;main&#8221; classes: <strong>Icon</strong> and <strong>Link</strong>. The first is a container for visual elements that make up the visualization of a class instance. The second is a definition of the visualization of an association instance (an arrow). For example, this is the definition of the concrete syntax of the <em>TrafficLights</em> language:</p>
 <p>There are two &#8220;main&#8221; classes: <strong>Icon</strong> and <strong>Link</strong>. The first is a container for visual elements that make up the visualization of a class instance. The second is a definition of the visualization of an association instance (an arrow). For example, this is the definition of the concrete syntax of the <em>TrafficLights</em> language:</p>
 <img alt="_images/trafficlights_cs.png" src="_images/trafficlights_cs.png" />
 <img alt="_images/trafficlights_cs.png" src="_images/trafficlights_cs.png" />
@@ -358,6 +371,84 @@ do not trigger pre-editing constraints and post-editing actions).</td>
 <p class="first admonition-title">Note</p>
 <p class="first admonition-title">Note</p>
 <p class="last">For Icons, place its contents as close as possible to the top-left corner. This ensures that the icon is instantiated as close as possible to the mouse position.</p>
 <p class="last">For Icons, place its contents as close as possible to the top-left corner. This ensures that the icon is instantiated as close as possible to the mouse position.</p>
 </div>
 </div>
+<p><em>Icon</em> and <em>Link</em> contents are modelled as instances of eight classes:</p>
+<ol class="arabic">
+<li><dl class="first docutils">
+<dt><em>Rectangle</em></dt>
+<dd><ul class="first last simple">
+<li><em>width</em> defines the width (in pixels).</li>
+<li><em>height</em> defines the width (in pixels).</li>
+<li><em>cornerRadius</em> defines the amount of rounding of the corners (as a percentage).</li>
+</ul>
+</dd>
+</dl>
+</li>
+<li><dl class="first docutils">
+<dt><em>Text</em></dt>
+<dd><ul class="first last simple">
+<li><em>textContent</em> defines the text content of the text element.</li>
+</ul>
+</dd>
+</dl>
+</li>
+<li><dl class="first docutils">
+<dt><em>Circle</em></dt>
+<dd><ul class="first last simple">
+<li><em>r</em> defines the readius of the instantiated rectangle (in pixels).</li>
+</ul>
+</dd>
+</dl>
+</li>
+<li><dl class="first docutils">
+<dt><em>Ellips</em></dt>
+<dd><ul class="first last simple">
+<li><em>rx</em> defines the radius on the x-axis (in pixels).</li>
+<li><em>ry</em> defines the radius on the y-axis (in pixels).</li>
+</ul>
+</dd>
+</dl>
+</li>
+<li><dl class="first docutils">
+<dt><em>Polygon</em></dt>
+<dd><ul class="first last simple">
+<li><em>r</em> defines the radius (in pixels).</li>
+<li><em>sides</em> defines the amount of sides.</li>
+</ul>
+</dd>
+</dl>
+</li>
+<li><dl class="first docutils">
+<dt><em>Star</em></dt>
+<dd><ul class="first last simple">
+<li><em>r</em> defines the radius (in pixels).</li>
+<li><em>rays</em> defines the amount of rays.</li>
+</ul>
+</dd>
+</dl>
+</li>
+<li><dl class="first docutils">
+<dt><em>Path</em></dt>
+<dd><ul class="first last simple">
+<li><em>segments</em> defines the segments of the path &#8211; this allows for arbitrary shapes using the <a class="reference external" href="https://www.w3.org/TR/SVG/paths.html">SVG Paths</a> syntax.</li>
+</ul>
+</dd>
+</dl>
+</li>
+<li><dl class="first docutils">
+<dt><em>Image</em></dt>
+<dd><ul class="first last simple">
+<li><em>src</em> specifies where the image can be found. This is a path relative to your user folder. It is recommended to put your images in your formalism folder (for example <a href="#id13"><span class="problematic" id="id14">*</span></a>/Formalisms/&lt;FormalismName&gt;/images/).</li>
+<li><em>width</em> defines the width of the image (in pixels).</li>
+<li><em>height</em> defines the width of the image (in pixels).</li>
+</ul>
+</dd>
+</dl>
+</li>
+</ol>
+<div class="admonition warning">
+<p class="first admonition-title">Warning</p>
+<p class="last">Scaling your elements with the geometry controls does not affect the size of the instantiated elements! You need to change the <em>width</em>/<em>height</em>/<em>r</em>/<em>rx</em>/<em>ry</em> attributes (depending on the element).</p>
+</div>
 <div class="section" id="mappers-and-parsers">
 <div class="section" id="mappers-and-parsers">
 <h3>Mappers and Parsers<a class="headerlink" href="#mappers-and-parsers" title="Permalink to this headline">¶</a></h3>
 <h3>Mappers and Parsers<a class="headerlink" href="#mappers-and-parsers" title="Permalink to this headline">¶</a></h3>
 <p>All visual elements have a number of attributes that change its appearance. For example, a circle has a radius that can be changed to resize it. But, you might want to make the values of concrete syntax attributes depend on the values of abstract syntax attributes, and vice versa, make the values of abstract syntax attributes depend on the value of concrete syntax attributes.</p>
 <p>All visual elements have a number of attributes that change its appearance. For example, a circle has a radius that can be changed to resize it. But, you might want to make the values of concrete syntax attributes depend on the values of abstract syntax attributes, and vice versa, make the values of abstract syntax attributes depend on the value of concrete syntax attributes.</p>

+ 27 - 21
doc/_build/html/overview.html

@@ -152,14 +152,15 @@
 <tr class="row-even"><td>Select an entity</td>
 <tr class="row-even"><td>Select an entity</td>
 <td>Left-click any entity. This will also select the entity&#8217;s contents, if
 <td>Left-click any entity. This will also select the entity&#8217;s contents, if
 any. To select a container without selecting its contents, SHIFT-Left-click
 any. To select a container without selecting its contents, SHIFT-Left-click
-it.</td>
+it. Enters the <strong>SOMETHING SELECTED</strong> state.</td>
 </tr>
 </tr>
 <tr class="row-odd"><td>Select one or more entity</td>
 <tr class="row-odd"><td>Select one or more entity</td>
 <td>Left-press anywhere on Canvas, drag selection box around desired
 <td>Left-press anywhere on Canvas, drag selection box around desired
-entity or entities and release.</td>
+entity or entities and release. Enters the <strong>SOMETHING SELECTED</strong> state.</td>
 </tr>
 </tr>
 <tr class="row-even"><td>Connect entities</td>
 <tr class="row-even"><td>Connect entities</td>
-<td>Right-press an entity, drag to-be edge to target entity and release.</td>
+<td>Right-press an entity (enters the <strong>DRAWING EDGE</strong> state), drag to-be edge
+to target entity and release.</td>
 </tr>
 </tr>
 <tr class="row-odd"><td>Edit icon text</td>
 <tr class="row-odd"><td>Edit icon text</td>
 <td>SHIFT-Middle-click any text from any icon on the Canvas (this
 <td>SHIFT-Middle-click any text from any icon on the Canvas (this
@@ -167,7 +168,7 @@ will display a very simple text editor).</td>
 </tr>
 </tr>
 <tr class="row-even"><td>Edit entity</td>
 <tr class="row-even"><td>Edit entity</td>
 <td>Middle-click or SHIFT-Left-click any entity on the Canvas (this will
 <td>Middle-click or SHIFT-Left-click any entity on the Canvas (this will
-display the abstract attribute editor).</td>
+display the attribute editor).</td>
 </tr>
 </tr>
 </tbody>
 </tbody>
 </table>
 </table>
@@ -184,27 +185,27 @@ display the abstract attribute editor).</td>
 </thead>
 </thead>
 <tbody valign="top">
 <tbody valign="top">
 <tr class="row-even"><td>Unselect selection</td>
 <tr class="row-even"><td>Unselect selection</td>
-<td>Right-/Left-/Middle-click anywhere on the Canvas, or click ESC.</td>
+<td>Right-/Left-/Middle-click anywhere on the Canvas, or click ESC. Enters the
+<strong>DEFAULT</strong> state.</td>
 </tr>
 </tr>
 <tr class="row-odd"><td>Move selection</td>
 <tr class="row-odd"><td>Move selection</td>
 <td>Left-press selection, drag preview overlay to desired position and
 <td>Left-press selection, drag preview overlay to desired position and
-release.</td>
+release. Enters the <strong>DEFAULT</strong> state.</td>
 </tr>
 </tr>
 <tr class="row-even"><td>Delete selection</td>
 <tr class="row-even"><td>Delete selection</td>
-<td>Press DELETE.</td>
+<td>Press DELETE. Enters the <strong>DEFAULT</strong> state.</td>
 </tr>
 </tr>
 <tr class="row-odd"><td>Edit first entity in selection</td>
 <tr class="row-odd"><td>Edit first entity in selection</td>
-<td>Click INSERT, or click COMMAND (this will display the abstract attribute
-editor).</td>
+<td>Click INSERT, or click COMMAND (this will display the attribute editor.</td>
 </tr>
 </tr>
-<tr class="row-even"><td>Enter geometry editing mode</td>
-<td>Click CTRL (this will display geometry controls).</td>
+<tr class="row-even"><td>Change the geometry of the selection</td>
+<td>Click CTRL. Enters the <strong>GEOMETRY EDITING</strong> state.</td>
 </tr>
 </tr>
-<tr class="row-odd"><td>Enter edge editing mode</td>
-<td>Click SHIFT (this will display editable edge control points).</td>
+<tr class="row-odd"><td>Edit the selected edge</td>
+<td>Click SHIFT. Enters the <strong>EDGE EDITING</strong> state.</td>
 </tr>
 </tr>
 <tr class="row-even"><td>Snap selection to nearest grid point</td>
 <tr class="row-even"><td>Snap selection to nearest grid point</td>
-<td>Click TAB.</td>
+<td>Click TAB. Enters the <strong>DEFAULT</strong> state.</td>
 </tr>
 </tr>
 </tbody>
 </tbody>
 </table>
 </table>
@@ -221,17 +222,17 @@ editor).</td>
 </thead>
 </thead>
 <tbody valign="top">
 <tbody valign="top">
 <tr class="row-even"><td>Insert selection into container</td>
 <tr class="row-even"><td>Insert selection into container</td>
-<td>Left-release on top of the target entity.</td>
+<td>Left-release on top of the target entity. Enters the <strong>DEFAULT</strong> state.</td>
 </tr>
 </tr>
 <tr class="row-odd"><td>Remove selection from container</td>
 <tr class="row-odd"><td>Remove selection from container</td>
 <td>Left-release outside of current container. Containment relationships can
 <td>Left-release outside of current container. Containment relationships can
-also be deleted manually if visible.</td>
+also be deleted manually if visible. Enters the <strong>DEFAULT</strong> state.</td>
 </tr>
 </tr>
 <tr class="row-even"><td>Confirm motion</td>
 <tr class="row-even"><td>Confirm motion</td>
-<td>Left-release on the Canvas.</td>
+<td>Left-release on the Canvas. Enters the <strong>DEFAULT</strong> state.</td>
 </tr>
 </tr>
 <tr class="row-odd"><td>Cancel motion</td>
 <tr class="row-odd"><td>Cancel motion</td>
-<td>Click ESC.</td>
+<td>Click ESC. Enters the <strong>DEFAULT</strong> state.</td>
 </tr>
 </tr>
 </tbody>
 </tbody>
 </table>
 </table>
@@ -257,7 +258,7 @@ also be deleted manually if visible.</td>
 <td>Middle-click anywhere, or click ALT.</td>
 <td>Middle-click anywhere, or click ALT.</td>
 </tr>
 </tr>
 <tr class="row-odd"><td>Cancel current edge</td>
 <tr class="row-odd"><td>Cancel current edge</td>
-<td>Left-release anywhere on the Canvas.</td>
+<td>Left-release anywhere on the Canvas. Enters the <strong>DEFAULT</strong> state.</td>
 </tr>
 </tr>
 </tbody>
 </tbody>
 </table>
 </table>
@@ -287,6 +288,10 @@ point to previous control point</td>
 <td>Middle-click any control point (extremities and the central control
 <td>Middle-click any control point (extremities and the central control
 point cannot be removed).</td>
 point cannot be removed).</td>
 </tr>
 </tr>
+<tr class="row-even"><td>Finish editing</td>
+<td>Right-/Left-/Middle-click anywhere on the Canvas, or click ESC. Enters the
+<strong>DEFAULT</strong> state.</td>
+</tr>
 </tbody>
 </tbody>
 </table>
 </table>
 <p>When in the <strong>GEOMETRY EDITING</strong> state, <img alt="geometry_editing" class="inline-image" src="_images/geometry_editing.png" /></p>
 <p>When in the <strong>GEOMETRY EDITING</strong> state, <img alt="geometry_editing" class="inline-image" src="_images/geometry_editing.png" /></p>
@@ -318,10 +323,11 @@ desired shape.</td>
 shape.</td>
 shape.</td>
 </tr>
 </tr>
 <tr class="row-even"><td>Cancel changes</td>
 <tr class="row-even"><td>Cancel changes</td>
-<td>Right-/Left-/Middle-click anywhere on the Canvas, or click ESC.</td>
+<td>Right-/Left-/Middle-click anywhere on the Canvas, or click ESC. Enters the
+<strong>DEFAULT</strong> state.</td>
 </tr>
 </tr>
 <tr class="row-odd"><td>Confirm changes</td>
 <tr class="row-odd"><td>Confirm changes</td>
-<td>Left-click confirmation icon.</td>
+<td>Left-click confirmation icon. Enters the <strong>DEFAULT</strong> state.</td>
 </tr>
 </tr>
 </tbody>
 </tbody>
 </table>
 </table>

Failā izmaiņas netiks attēlotas, jo tās ir par lielu
+ 1 - 1
doc/_build/html/searchindex.js


BIN
doc/img/cs_toolbar.png


+ 38 - 2
doc/new_language.rst

@@ -152,12 +152,12 @@ A class or association can have attributes. These attributes are represented by
     * *boolean*: a boolean
     * *boolean*: a boolean
     * *code*: a block of code
     * *code*: a block of code
     * *file<pattern>*: a string which specifies the locatation of a file (such as a model). Attribute values have to match the specified pattern.
     * *file<pattern>*: a string which specifies the locatation of a file (such as a model). Attribute values have to match the specified pattern.
-    * *map<[keys...], [base-types...]>*: a dictionary with specified keys, and for each key, a value of the specified base-type.
+    * *map<[keys...],[base-types...]>*: a dictionary with specified keys, and for each key, a value of the specified base-type.
     * *list<base-type>*: a list of base-type values.
     * *list<base-type>*: a list of base-type values.
     * *ENUM(options...)*: a choice of several options.
     * *ENUM(options...)*: a choice of several options.
     * *$ATTRIBUTE*: *map<[name,type,default],[string,string,string]>*
     * *$ATTRIBUTE*: *map<[name,type,default],[string,string,string]>*
     * *$CARDINALITY*: *map<[dir,type,min,max],[string,string,string,string]>*
     * *$CARDINALITY*: *map<[dir,type,min,max],[string,string,string,string]>*
-    * *$EVENT*: *ENUM( pre-connect , pre-create , pre-disconnect , pre-delete , pre-edit , post-connect , post-create , post-disconnect , post-delete , post-edit )*
+    * *$EVENT*: *ENUM(pre-connect,pre-create,pre-disconnect,pre-delete,pre-edit,post-connect,post-create,post-disconnect,post-delete,post-edit)*
     * *$EVENT_HANDLER*: *map<[name,event,code],[string,$EVENT,code]>*	
     * *$EVENT_HANDLER*: *map<[name,event,code],[string,$EVENT,code]>*	
     * *$ARG*: *map<[name,type],[string,string]>*	
     * *$ARG*: *map<[name,type],[string,string]>*	
     * *$METHOD*: *map<[name,args,returntype,body],[string,list<$ARG>,string,code]>*
     * *$METHOD*: *map<[name,args,returntype,body],[string,list<$ARG>,string,code]>*
@@ -165,6 +165,8 @@ A class or association can have attributes. These attributes are represented by
 
 
 .. warning:: Default values need to evaluate to values that are of the specified type!
 .. warning:: Default values need to evaluate to values that are of the specified type!
 
 
+.. warning:: When defining a map/ENUM, its keys/options are defined as a comma-separated list. Do NOT insert any whitespaces before or after the comma's, as these will be seen as part of the key/option name.
+
 Depending on the type, the editor presented to the user is different. For an int/float/string it is an input field, for code a text area, for a file the user is presented with a file browser, etc.
 Depending on the type, the editor presented to the user is different. For an int/float/string it is an input field, for code a text area, for a file the user is presented with a file browser, etc.
 
 
 .. _inheritance:
 .. _inheritance:
@@ -187,6 +189,8 @@ As a local constraint:
 
 
 .. image:: img/local_constraint.png
 .. image:: img/local_constraint.png
 
 
+.. warning:: Multi-line local constraints need to have each line end with "\\".
+
 One disadvantage of this constraint is that the minimum number of instances (also 1) is not checked. A global constraint solves this:
 One disadvantage of this constraint is that the minimum number of instances (also 1) is not checked. A global constraint solves this:
 
 
 .. image:: img/global_constraint.png
 .. image:: img/global_constraint.png
@@ -207,6 +211,8 @@ As a local action:
 
 
 .. image:: img/local_action.png
 .. image:: img/local_action.png
 
 
+.. warning:: Multi-line local actions need to have each line end with "\\".
+
 As a global action:
 As a global action:
 
 
 .. image:: img/global_action.png
 .. image:: img/global_action.png
@@ -285,6 +291,8 @@ Action Library
 Defining Concrete Syntax
 Defining Concrete Syntax
 ------------------------
 ------------------------
 
 
+.. image:: img/cs_toolbar.png
+
 The concrete syntax definition of a language is a model in the */Formalisms/__LanguageSyntax__/ConcreteSyntax.defaultIcons.metamodel* language. It defines for each non-abstract class and association a visual icon.
 The concrete syntax definition of a language is a model in the */Formalisms/__LanguageSyntax__/ConcreteSyntax.defaultIcons.metamodel* language. It defines for each non-abstract class and association a visual icon.
 
 
 There are two "main" classes: **Icon** and **Link**. The first is a container for visual elements that make up the visualization of a class instance. The second is a definition of the visualization of an association instance (an arrow). For example, this is the definition of the concrete syntax of the *TrafficLights* language:
 There are two "main" classes: **Icon** and **Link**. The first is a container for visual elements that make up the visualization of a class instance. The second is a definition of the visualization of an association instance (an arrow). For example, this is the definition of the concrete syntax of the *TrafficLights* language:
@@ -295,6 +303,34 @@ There are two "main" classes: **Icon** and **Link**. The first is a container fo
 
 
 .. note:: For Icons, place its contents as close as possible to the top-left corner. This ensures that the icon is instantiated as close as possible to the mouse position.
 .. note:: For Icons, place its contents as close as possible to the top-left corner. This ensures that the icon is instantiated as close as possible to the mouse position.
 
 
+*Icon* and *Link* contents are modelled as instances of eight classes:
+
+#. *Rectangle*
+    * *width* defines the width (in pixels).
+    * *height* defines the width (in pixels).
+    * *cornerRadius* defines the amount of rounding of the corners (as a percentage).
+#. *Text*
+    * *textContent* defines the text content of the text element.
+#. *Circle*
+    * *r* defines the readius of the instantiated rectangle (in pixels).
+#. *Ellips*
+    * *rx* defines the radius on the x-axis (in pixels).
+    * *ry* defines the radius on the y-axis (in pixels).
+#. *Polygon*
+    * *r* defines the radius (in pixels).
+    * *sides* defines the amount of sides.
+#. *Star*
+    * *r* defines the radius (in pixels).
+    * *rays* defines the amount of rays.
+#. *Path*
+    * *segments* defines the segments of the path -- this allows for arbitrary shapes using the `SVG Paths <https://www.w3.org/TR/SVG/paths.html>`_ syntax.
+#. *Image*
+    * *src* specifies where the image can be found. This is a path relative to your user folder. It is recommended to put your images in your formalism folder (for example */Formalisms/<FormalismName>/images/).
+    * *width* defines the width of the image (in pixels).
+    * *height* defines the width of the image (in pixels).
+    
+.. warning:: Scaling your elements with the geometry controls does not affect the size of the instantiated elements! You need to change the *width*/*height*/*r*/*rx*/*ry* attributes (depending on the element).
+
 Mappers and Parsers
 Mappers and Parsers
 ^^^^^^^^^^^^^^^^^^^
 ^^^^^^^^^^^^^^^^^^^
 All visual elements have a number of attributes that change its appearance. For example, a circle has a radius that can be changed to resize it. But, you might want to make the values of concrete syntax attributes depend on the values of abstract syntax attributes, and vice versa, make the values of abstract syntax attributes depend on the value of concrete syntax attributes.
 All visual elements have a number of attributes that change its appearance. For example, a circle has a radius that can be changed to resize it. But, you might want to make the values of concrete syntax attributes depend on the values of abstract syntax attributes, and vice versa, make the values of abstract syntax attributes depend on the value of concrete syntax attributes.

+ 24 - 19
doc/overview.rst

@@ -114,18 +114,19 @@ When in the **DEFAULT** state,
 +---------------------------------+-----------------------------------------------------------------------------+
 +---------------------------------+-----------------------------------------------------------------------------+
 | Select an entity                | Left-click any entity. This will also select the entity's contents, if      |
 | Select an entity                | Left-click any entity. This will also select the entity's contents, if      |
 |                                 | any. To select a container without selecting its contents, SHIFT-Left-click |
 |                                 | any. To select a container without selecting its contents, SHIFT-Left-click |
-|                                 | it.                                                                         |
+|                                 | it. Enters the **SOMETHING SELECTED** state.                                |
 +---------------------------------+-----------------------------------------------------------------------------+
 +---------------------------------+-----------------------------------------------------------------------------+
 | Select one or more entity       | Left-press anywhere on Canvas, drag selection box around desired            |
 | Select one or more entity       | Left-press anywhere on Canvas, drag selection box around desired            |
-|                                 | entity or entities and release.                                             |
+|                                 | entity or entities and release. Enters the **SOMETHING SELECTED** state.    |
 +---------------------------------+-----------------------------------------------------------------------------+
 +---------------------------------+-----------------------------------------------------------------------------+
-| Connect entities                | Right-press an entity, drag to-be edge to target entity and release.        |
+| Connect entities                | Right-press an entity (enters the **DRAWING EDGE** state), drag to-be edge  |
+|                                 | to target entity and release.                                               |
 +---------------------------------+-----------------------------------------------------------------------------+
 +---------------------------------+-----------------------------------------------------------------------------+
 | Edit icon text                  | SHIFT-Middle-click any text from any icon on the Canvas (this               |
 | Edit icon text                  | SHIFT-Middle-click any text from any icon on the Canvas (this               |
 |                                 | will display a very simple text editor).                                    |
 |                                 | will display a very simple text editor).                                    |
 +---------------------------------+-----------------------------------------------------------------------------+
 +---------------------------------+-----------------------------------------------------------------------------+
 | Edit entity                     | Middle-click or SHIFT-Left-click any entity on the Canvas (this will        | 
 | Edit entity                     | Middle-click or SHIFT-Left-click any entity on the Canvas (this will        | 
-|                                 | display the abstract attribute editor).                                     |
+|                                 | display the attribute editor).                                              |
 +---------------------------------+-----------------------------------------------------------------------------+
 +---------------------------------+-----------------------------------------------------------------------------+
 
 
 When in the **SOMETHING SELECTED** state (*i.e.*, when one or more entity is selected), |something_selected|
 When in the **SOMETHING SELECTED** state (*i.e.*, when one or more entity is selected), |something_selected|
@@ -138,21 +139,21 @@ When in the **SOMETHING SELECTED** state (*i.e.*, when one or more entity is sel
 +--------------------------------------+-----------------------------------------------------------------------------+
 +--------------------------------------+-----------------------------------------------------------------------------+
 | Action                               | Shortcut(s)                                                                 |
 | Action                               | Shortcut(s)                                                                 |
 +======================================+=============================================================================+
 +======================================+=============================================================================+
-| Unselect selection                   | Right-/Left-/Middle-click anywhere on the Canvas, or click ESC.             |
+| Unselect selection                   | Right-/Left-/Middle-click anywhere on the Canvas, or click ESC. Enters the  |
+|                                      | **DEFAULT** state.                                                          |
 +--------------------------------------+-----------------------------------------------------------------------------+
 +--------------------------------------+-----------------------------------------------------------------------------+
 | Move selection                       | Left-press selection, drag preview overlay to desired position and          |
 | Move selection                       | Left-press selection, drag preview overlay to desired position and          |
-|                                      | release.                                                                    |
+|                                      | release. Enters the **DEFAULT** state.                                      |
 +--------------------------------------+-----------------------------------------------------------------------------+
 +--------------------------------------+-----------------------------------------------------------------------------+
-| Delete selection                     | Press DELETE.                                                               |
+| Delete selection                     | Press DELETE. Enters the **DEFAULT** state.                                 |
 +--------------------------------------+-----------------------------------------------------------------------------+
 +--------------------------------------+-----------------------------------------------------------------------------+
-| Edit first entity in selection       | Click INSERT, or click COMMAND (this will display the abstract attribute    |
-|                                      | editor).                                                                    |
+| Edit first entity in selection       | Click INSERT, or click COMMAND (this will display the attribute editor.     |
 +--------------------------------------+-----------------------------------------------------------------------------+
 +--------------------------------------+-----------------------------------------------------------------------------+
-| Enter geometry editing mode          | Click CTRL (this will display geometry controls).                           |
+| Change the geometry of the selection | Click CTRL. Enters the **GEOMETRY EDITING** state.                          |
 +--------------------------------------+-----------------------------------------------------------------------------+
 +--------------------------------------+-----------------------------------------------------------------------------+
-| Enter edge editing mode              | Click SHIFT (this will display editable edge control points).               |
+| Edit the selected edge               | Click SHIFT. Enters the **EDGE EDITING** state.                             |
 +--------------------------------------+-----------------------------------------------------------------------------+
 +--------------------------------------+-----------------------------------------------------------------------------+
-| Snap selection to nearest grid point | Click TAB.                                                                  |
+| Snap selection to nearest grid point | Click TAB. Enters the **DEFAULT** state.                                    |
 +--------------------------------------+-----------------------------------------------------------------------------+
 +--------------------------------------+-----------------------------------------------------------------------------+
 
 
 When in the **DRAGGING SELECTION** state (*i.e.*, when left-dragging one or more selected entity), |dragging_selection|
 When in the **DRAGGING SELECTION** state (*i.e.*, when left-dragging one or more selected entity), |dragging_selection|
@@ -165,14 +166,14 @@ When in the **DRAGGING SELECTION** state (*i.e.*, when left-dragging one or more
 +--------------------------------------+-----------------------------------------------------------------------------+
 +--------------------------------------+-----------------------------------------------------------------------------+
 | Action                               | Shortcut(s)                                                                 |
 | Action                               | Shortcut(s)                                                                 |
 +======================================+=============================================================================+
 +======================================+=============================================================================+
-| Insert selection into container      | Left-release on top of the target entity.                                   |
+| Insert selection into container      | Left-release on top of the target entity. Enters the **DEFAULT** state.     |
 +--------------------------------------+-----------------------------------------------------------------------------+
 +--------------------------------------+-----------------------------------------------------------------------------+
 | Remove selection from container      | Left-release outside of current container. Containment relationships can    |
 | Remove selection from container      | Left-release outside of current container. Containment relationships can    |
-|                                      | also be deleted manually if visible.                                        |
+|                                      | also be deleted manually if visible. Enters the **DEFAULT** state.          |
 +--------------------------------------+-----------------------------------------------------------------------------+
 +--------------------------------------+-----------------------------------------------------------------------------+
-| Confirm motion                       | Left-release on the Canvas.                                                 |
+| Confirm motion                       | Left-release on the Canvas. Enters the **DEFAULT** state.                   |
 +--------------------------------------+-----------------------------------------------------------------------------+
 +--------------------------------------+-----------------------------------------------------------------------------+
-| Cancel motion                        | Click ESC.                                                                  |
+| Cancel motion                        | Click ESC. Enters the **DEFAULT** state.                                    |
 +--------------------------------------+-----------------------------------------------------------------------------+
 +--------------------------------------+-----------------------------------------------------------------------------+
 
 
 When in the **DRAWING EDGE** state (*i.e.*, when dragging to-be edge from source to target entities), |drawing_edge|
 When in the **DRAWING EDGE** state (*i.e.*, when dragging to-be edge from source to target entities), |drawing_edge|
@@ -191,7 +192,7 @@ When in the **DRAWING EDGE** state (*i.e.*, when dragging to-be edge from source
 +---------------------------------------+-----------------------------------------------------------------------------+
 +---------------------------------------+-----------------------------------------------------------------------------+
 | Delete last control point             | Middle-click anywhere, or click ALT.                                        |
 | Delete last control point             | Middle-click anywhere, or click ALT.                                        |
 +---------------------------------------+-----------------------------------------------------------------------------+
 +---------------------------------------+-----------------------------------------------------------------------------+
-| Cancel current edge                   | Left-release anywhere on the Canvas.                                        |
+| Cancel current edge                   | Left-release anywhere on the Canvas. Enters the **DEFAULT** state.          |
 +---------------------------------------+-----------------------------------------------------------------------------+
 +---------------------------------------+-----------------------------------------------------------------------------+
 
 
 When in the **EDGE EDITING** state, |edge_editing|
 When in the **EDGE EDITING** state, |edge_editing|
@@ -214,6 +215,9 @@ When in the **EDGE EDITING** state, |edge_editing|
 | Delete control point                  | Middle-click any control point (extremities and the central control         |
 | Delete control point                  | Middle-click any control point (extremities and the central control         |
 |                                       | point cannot be removed).                                                   |
 |                                       | point cannot be removed).                                                   |
 +---------------------------------------+-----------------------------------------------------------------------------+
 +---------------------------------------+-----------------------------------------------------------------------------+
+| Finish editing                        | Right-/Left-/Middle-click anywhere on the Canvas, or click ESC. Enters the  |
+|                                       | **DEFAULT** state.                                                          |
++---------------------------------------+-----------------------------------------------------------------------------+
 
 
 When in the **GEOMETRY EDITING** state, |geometry_editing|
 When in the **GEOMETRY EDITING** state, |geometry_editing|
 
 
@@ -237,9 +241,10 @@ When in the **GEOMETRY EDITING** state, |geometry_editing|
 | Rotate                                | Mouse-wheel up/down on rotation icon until preview overlay reaches desired  |
 | Rotate                                | Mouse-wheel up/down on rotation icon until preview overlay reaches desired  |
 |                                       | shape.                                                                      |
 |                                       | shape.                                                                      |
 +---------------------------------------+-----------------------------------------------------------------------------+
 +---------------------------------------+-----------------------------------------------------------------------------+
-| Cancel changes                        | Right-/Left-/Middle-click anywhere on the Canvas, or click ESC.             |
+| Cancel changes                        | Right-/Left-/Middle-click anywhere on the Canvas, or click ESC. Enters the  |
+|                                       | **DEFAULT** state.                                                          |
 +---------------------------------------+-----------------------------------------------------------------------------+
 +---------------------------------------+-----------------------------------------------------------------------------+
-| Confirm changes                       | Left-click confirmation icon.                                               |
+| Confirm changes                       | Left-click confirmation icon. Enters the **DEFAULT** state.                 |
 +---------------------------------------+-----------------------------------------------------------------------------+
 +---------------------------------------+-----------------------------------------------------------------------------+
 
 
 Console
 Console