Detailed Walkthrough

This walkthrough will explain the basic steps which are needed to create a multi-level model and work with Melanee.

Opening the Melanee Perspective

With the new build, the Melanee perspective is displayed by default. If you need to reopen the perspective go to “Window” -> “Open Persepecitve” -> “Other” -> “Melanee”

Creating a new Project

New models can only be created within projects. For this purpose create any project, e.g. general, plug-in or Java project. For the tutorial a “General Project” is used because no features gained through other project natures are needed to use a multi-level model. To create a new Project right-click in the “Project Explorer” and select New -> Project. The “New Project” dialog opens. In this dialog select General -> Project from the tree view. Press “Next >” and follow the instruction of the wizard.

Creating a new File

Now that a new project is created, new models can be added to it. To do so, right click on the project and select New -> LML Diagram. LML stands for the concrete default syntax used in many, named Level-agnostic Modeling Language. After selecting a LML file to create press “Next >” and follow the instructions of the wizard.

Creating a new Deep Model

The first model element which needs to be created when creating a multi-level model is the DeepModel. It is the container for all levels which represent the problem domain through their content. To add a DeepModel from the palette click on the “DeepModel” element in the category “DeepModel Definition”, move the mouse at the position of the diagram where it shall be placed and left mouse click. After adding the DeepModel, levels can be added to it. Therefore, select the element from the palette and click on the DeepModel.

Add Entities

Entities represent objects of the domain, they can have attributes, methods and connections to other entities. To add an entity to a level select “Entity” from the category “Domain Definition” palette at the right and click at the location in the model where you want to place the entity. Pay attention to the mouse pointer as it indicates where an entity can be added and where not.

Add Attributes/Methods

To add an inheritance to a level, select “Inhertiance” from the category “Correlation Definition” palette and click at the place in the model where it shall be placed. To connect the inheritance with entities, choose the “Super-/Subtype” element of the palette. For drawing the connection, you need to start in the middle of the inheritance symbol, hold a left click and move the mouse to the wanted entity. With the close of the left click, a menu opens where the type of the entity can be chosen, either being the Supertype or the Subtype. Pay attention to the mouse pointer as it indicates where the connection can be drawn. Inheritances can have multiple Sub- and Supertypes.

Add Connections

Select “Connection” in the “Domain Definition” palette, click on the first entity, hold the left click and move the mouse to the second entity, close the left click. The connection can be named and the links between the entities can be modified. Therefore, select one of the links and open the linguistic properties in the property view. The property “Kind” defines if the Connection is a Composition, Aggregation or a Basic Connection. By selecting the Kind, the visualization changes, e.g. in case of a Composition the end residing at the entity is changed to a filled lozenge. Also the multiplicity constraints can be modified in the “Lower” and “Upper” property. An upper bound of “-1” indicates the star. The “navigable” property defines if the link should have an arrowhead or not. With the “role name” property, the name of the link can be defined.

Expand/Collapse Generalizations, Connections, etc.

Inheritances and connections have both a dotted, visually insignificant and an exploded, verbose visualization. To toggle between both, select the model element and click the +/- sign from the pop up menu. Another way to change the appearance of the model element is by changing the visual properties. Select the visualization tab within the properties view and set the collapsed value to true/false.

Using the dynamic DSL palette in lower levels

In lower levels, there appears a new palette — the “DSL Elements”. This palette provides all elements of the level above that are instantiable (linguistic property of the element).