Child pages
  • Shapes - an introductory MPS tutorial

Versions Compared


  • This line was added.
  • This line was removed.
  • Formatting was changed.


Hit Enter to create a new cell. Type "x:" to mark that the following cell contains the value of the x property.

Hit Enter again to create a new cell. Remember to press Enter first each time you want to add a new cell and then select the kind of cell to insert from the completion menu (Control + Space).

Now you have to pick the x property from the code-completion menu to bind the cell to the right property.


Now bind the red cell to the name property. Since the property is inherited from the _INamedConcept _ INamedConcept concept interface, it will be further down in the listcompletion menu (Control + Space), but it is surely there.

You ensure that you have inserted the name property correctly if you can see the curly braces wrapping it. (Beware, you are not supposed to insert these curly braces yourself, they are added by MPS for all property cells.)
The following cell will hold a collection of shapes that have been added to the Canvas. Note how we compose editors here - Canvas only marks an area, in which individual shapes should be edited, and leaves that up to the shapes how they use that area.
Since the shapes should be organized vertically, each on a single line, you should pick vertical collection layout from the completion menu.