overview.txt 19 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255
  1. .. _overview:
  2. Overview
  3. ========
  4. This section presents an overview of AToMPM's user interface: how to create an account, and the different parts of the user interface (toolbars, canvas, and console).
  5. First Usage
  6. -----------
  7. When first opening the user interface at `localhost:8124/atompm`, the user is presented with a login screen.
  8. .. image:: img/first_login_screen.png
  9. :scale: 50
  10. Click the *create one now* link, which will allow you to create a new account with a user name and password. Fill out the form and click *Create new account*.
  11. .. image:: img/create_new_account.png
  12. :scale: 50
  13. AToMPM will initialize the account (by creating a user folder under the `users/` folder) and switch to the main user interface view. When you revisit the AToMPM webpage or create a new AToMPM instance, the tool will remember your username and password and automatically log you in. You can log out by clicking the *logout* link at the top right of the user interface.
  14. The AToMPM User Interface
  15. -------------------------
  16. When logged in, the AToMPM user interface is initialized with four button toolbars: *MainMenu*, *CompileMenu*, *TransformationController*, and *TransformationEditor*. They allow a langugage developer and a language user to perform most activities and are heavily used in the next sections of the documentation.
  17. .. image:: img/user_interface.png
  18. :scale: 50
  19. The user interface of AToMPM consists of three areas: the *toolbar area*, contained in the *canvas area*, and the *console*. To bring up the console, in Google Chrome press the F12 key. These areas are explained in more details in the next sections.
  20. Toolbars
  21. ^^^^^^^^
  22. There are two types of toolbars that can be loaded: button toolbars consist of a number of buttons that each perform a certain action, while formalism toolbars allow to instantiate language elements. A new toolbar can be loaded using the **(re)load a toolbar** button of the *MainMenu* toolbar. Toolbar models that can be loaded either have the *.buttons.model* extension (for button toolbars) or the *.metamodel* extension (for formalism toolbars).
  23. Button Toolbars
  24. """""""""""""""
  25. All button toolbar models can be found under the */Toolbars/* user folder. A button toolbar consists of a number of buttons that, when clicked, execute a particular action. Four button toolbar are loaded by default, explained below.
  26. .. image:: img/main_toolbar.png
  27. #. Launch a new AToMPM user interface in a new tab.
  28. #. (Re-)open a button or formalism toolbar.
  29. #. Close an opened toolbar. If this is a formalism toolbar, the model elements conforming to that formalism are removed from the model.
  30. #. Create a new formalism under the */Formalisms/* user folder with the given name.
  31. #. Open a model.
  32. #. Insert the elements of a model into the currently opened model.
  33. #. Save current model.
  34. #. Save current model as...
  35. #. Undo the last performed action.
  36. #. Redo the last undone action.
  37. #. Copy the selected elements on canvas.
  38. #. Paste the copied elements on the canvas (copy/paste also works across AToMPM tabs).
  39. #. Verify whether the constraints of the current model are satisfied.
  40. #. Show or hide entities of a particular formalism (but do not remove them from the model).
  41. #. Open the manual.
  42. Most of these actions are intuitive. Others are explained in more detail in the next sections.
  43. .. image:: img/compilation_toolbar.png
  44. #. Compile the current model (conforming to the *ConcreteSyntax* formalism) to a formalism toolbar.
  45. #. Compile the current model (conforming to the *SimpleClassDiagram* formalism) to a metamodel.
  46. #. Compile a metamodel to a pattern metamodel (and associated formalism toolbar(s)), used in model transformation rules.
  47. More information on these buttons can be found in :ref:`creating-a-modelling-language` and :ref:`modelling-a-model-transformation`.
  48. .. image:: img/transformation_controller.png
  49. #. Load a transformation.
  50. #. Run the currently loaded transformation until the end.
  51. #. Execute one step of the currently loaded transformation.
  52. #. Pause the running transformation.
  53. #. Stop the running transformation.
  54. #. Enable debugging, which opens a debug window when the transformation is executed that shows the transformation schedule and highlights the currently executing step.
  55. More information on these buttons can be found in :ref:`executing-a-model-transformation`.
  56. .. image:: img/transformation_editor.png
  57. #. Open a rule model.
  58. #. Open a transformation model.
  59. #. Open a formalism toolbar of a pattern metamodel.
  60. #. Create a new transformation model, and open it in a new tab.
  61. #. Create a new rule model, and open it in a new tab.
  62. More information on these buttons can be found in :ref:`modelling-a-model-transformation`.
  63. .. _formalism-toolbars:
  64. Formalism Toolbars
  65. """"""""""""""""""
  66. Loading a formalism toolbar allows you to create elements on the canvas conforming to that formalism. Multiple formalism toolbars can be loaded, which allows a model to contain elements conforming to multiple formalisms.
  67. As an example, we show the formalism toolbar of the *TrafficLight* language, which is used throughout the readme as an example.
  68. .. image:: img/trafficlight_toolbar.png
  69. Each button of a formalism toolbar corresponds to an icon in the concrete syntax definition of the formalism. Links are not shown. Clicking a button will select that particular type to be instantiated. Right-clicking on the canvas instantiates the icon on the canvas. More information on how to use a formalism toolbar to model can be found in :ref:`using-a-modelling-language`.
  70. Canvas
  71. ^^^^^^
  72. Below is a list of various states the Canvas can be in along with lists of actions available in each state and their corresponding shortcut(s).
  73. When in the **DEFAULT** state,
  74. .. rst-class:: table-with-borders
  75. +---------------------------------+-----------------------------------------------------------------------------+
  76. | Action | Shortcut(s) |
  77. +=================================+=============================================================================+
  78. | Choose an entity type to create | Left-click on desired type from a loaded formalism toolbar. |
  79. +---------------------------------+-----------------------------------------------------------------------------+
  80. | Create an entity | Right-click anywhere on the canvas. |
  81. +---------------------------------+-----------------------------------------------------------------------------+
  82. | Select an entity | Left-click any entity. This will also select the entity's contents, if |
  83. | | any. To select a container without selecting its contents, SHIFT-Left-click |
  84. | | it. Enters the **SOMETHING SELECTED** state. |
  85. +---------------------------------+-----------------------------------------------------------------------------+
  86. | Select one or more entity | Left-press anywhere on Canvas, drag selection box around desired |
  87. | | entity or entities and release. Enters the **SOMETHING SELECTED** state. |
  88. +---------------------------------+-----------------------------------------------------------------------------+
  89. | Connect entities | Right-press an entity (enters the **DRAWING EDGE** state), drag to-be edge |
  90. | | to target entity and release. |
  91. +---------------------------------+-----------------------------------------------------------------------------+
  92. | Edit icon text | SHIFT-Middle-click any text from any icon on the Canvas (this |
  93. | | will display a very simple text editor). |
  94. +---------------------------------+-----------------------------------------------------------------------------+
  95. | Edit entity | Middle-click or SHIFT-Left-click any entity on the Canvas (this will |
  96. | | display the attribute editor). |
  97. +---------------------------------+-----------------------------------------------------------------------------+
  98. When in the **SOMETHING SELECTED** state (*i.e.*, when one or more entity is selected), |something_selected|
  99. .. |something_selected| image:: img/something_selected.png
  100. :class: inline-image
  101. .. rst-class:: table-with-borders
  102. +--------------------------------------+-----------------------------------------------------------------------------+
  103. | Action | Shortcut(s) |
  104. +======================================+=============================================================================+
  105. | Unselect selection | Right-/Left-/Middle-click anywhere on the Canvas, or click ESC. Enters the |
  106. | | **DEFAULT** state. |
  107. +--------------------------------------+-----------------------------------------------------------------------------+
  108. | Move selection | Left-press selection, drag preview overlay to desired position and |
  109. | | release. Enters the **DEFAULT** state. |
  110. +--------------------------------------+-----------------------------------------------------------------------------+
  111. | Delete selection | Press DELETE. Enters the **DEFAULT** state. |
  112. +--------------------------------------+-----------------------------------------------------------------------------+
  113. | Edit first entity in selection | Click INSERT, or click COMMAND (this will display the attribute editor. |
  114. +--------------------------------------+-----------------------------------------------------------------------------+
  115. | Change the geometry of the selection | Click CTRL. Enters the **GEOMETRY EDITING** state. |
  116. +--------------------------------------+-----------------------------------------------------------------------------+
  117. | Edit the selected edge | Click SHIFT. Enters the **EDGE EDITING** state. |
  118. +--------------------------------------+-----------------------------------------------------------------------------+
  119. | Snap selection to nearest grid point | Click TAB. Enters the **DEFAULT** state. |
  120. +--------------------------------------+-----------------------------------------------------------------------------+
  121. When in the **DRAGGING SELECTION** state (*i.e.*, when left-dragging one or more selected entity), |dragging_selection|
  122. .. |dragging_selection| image:: img/dragging_selection.png
  123. :class: inline-image
  124. .. rst-class:: table-with-borders
  125. +--------------------------------------+-----------------------------------------------------------------------------+
  126. | Action | Shortcut(s) |
  127. +======================================+=============================================================================+
  128. | Insert selection into container | Left-release on top of the target entity. Enters the **DEFAULT** state. |
  129. +--------------------------------------+-----------------------------------------------------------------------------+
  130. | Remove selection from container | Left-release outside of current container. Containment relationships can |
  131. | | also be deleted manually if visible. Enters the **DEFAULT** state. |
  132. +--------------------------------------+-----------------------------------------------------------------------------+
  133. | Confirm motion | Left-release on the Canvas. Enters the **DEFAULT** state. |
  134. +--------------------------------------+-----------------------------------------------------------------------------+
  135. | Cancel motion | Click ESC. Enters the **DEFAULT** state. |
  136. +--------------------------------------+-----------------------------------------------------------------------------+
  137. When in the **DRAWING EDGE** state (*i.e.*, when dragging to-be edge from source to target entities), |drawing_edge|
  138. .. |drawing_edge| image:: img/drawing_edge.png
  139. :class: inline-image
  140. .. rst-class:: table-with-borders
  141. +---------------------------------------+-----------------------------------------------------------------------------+
  142. | Action | Shortcut(s) |
  143. +=======================================+=============================================================================+
  144. | Make current line horizontal/vertical | Click TAB. |
  145. +---------------------------------------+-----------------------------------------------------------------------------+
  146. | Create control point | Left-click anywhere, or click CTRL. |
  147. +---------------------------------------+-----------------------------------------------------------------------------+
  148. | Delete last control point | Middle-click anywhere, or click ALT. |
  149. +---------------------------------------+-----------------------------------------------------------------------------+
  150. | Cancel current edge | Left-release anywhere on the Canvas. Enters the **DEFAULT** state. |
  151. +---------------------------------------+-----------------------------------------------------------------------------+
  152. When in the **EDGE EDITING** state, |edge_editing|
  153. .. |edge_editing| image:: img/edge_editing.png
  154. :class: inline-image
  155. .. rst-class:: table-with-borders
  156. +---------------------------------------+-----------------------------------------------------------------------------+
  157. | Action | Shortcut(s) |
  158. +=======================================+=============================================================================+
  159. | Move control point | Left-press any control point, drag it to desired position and release. |
  160. +---------------------------------------+-----------------------------------------------------------------------------+
  161. | Vertically/Horizontally align control | Left-click any control point and click TAB. |
  162. | point to previous control point | |
  163. +---------------------------------------+-----------------------------------------------------------------------------+
  164. | Clone control point | Right-click any control point. |
  165. +---------------------------------------+-----------------------------------------------------------------------------+
  166. | Delete control point | Middle-click any control point (extremities and the central control |
  167. | | point cannot be removed). |
  168. +---------------------------------------+-----------------------------------------------------------------------------+
  169. | Finish editing | Right-/Left-/Middle-click anywhere on the Canvas, or click ESC. Enters the |
  170. | | **DEFAULT** state. |
  171. +---------------------------------------+-----------------------------------------------------------------------------+
  172. When in the **GEOMETRY EDITING** state, |geometry_editing|
  173. .. |geometry_editing| image:: img/geometry_editing.png
  174. :class: inline-image
  175. .. rst-class:: table-with-borders
  176. +---------------------------------------+-----------------------------------------------------------------------------+
  177. | Action | Shortcut(s) |
  178. +=======================================+=============================================================================+
  179. | Scale | Mouse-wheel up/down on scale icon until preview overlay reaches desired |
  180. | | shape. |
  181. +---------------------------------------+-----------------------------------------------------------------------------+
  182. | Scale vertically only | Mouse-wheel up/down on vertical scale icon until preview overlay reaches |
  183. | | desired shape. |
  184. +---------------------------------------+-----------------------------------------------------------------------------+
  185. | Scale horizontally only | Mouse-wheel up/down on horizontal scale icon until preview overlay reaches |
  186. | | desired shape. |
  187. +---------------------------------------+-----------------------------------------------------------------------------+
  188. | Rotate | Mouse-wheel up/down on rotation icon until preview overlay reaches desired |
  189. | | shape. |
  190. +---------------------------------------+-----------------------------------------------------------------------------+
  191. | Cancel changes | Right-/Left-/Middle-click anywhere on the Canvas, or click ESC. Enters the |
  192. | | **DEFAULT** state. |
  193. +---------------------------------------+-----------------------------------------------------------------------------+
  194. | Confirm changes | Left-click confirmation icon. Enters the **DEFAULT** state. |
  195. +---------------------------------------+-----------------------------------------------------------------------------+
  196. Console
  197. ^^^^^^^
  198. The developer console (press F12 in Chrome/Firefox) contains many useful debugging messages. Especially when :ref:`executing-a-model-transformation`, the console contains useful information on which rules were executed and whether they failed or succeeded.
  199. .. image:: img/console.png