Creating links using the links editor¶
Creating new links in your model using the links editor is very easy.
When the links editor is in “edit” mode (i.e. “pinned”,using the pin button ), you can drag any element from another view (e.g. the UML explorer view) and drop it into the links editor view to create a new link between the dropped element and the element represented by the central node. You can even drop several elements at the same time, provided they are all instances of the same metaclass. For example, you can drop several classes, or several packages at once, but not a class AND a package at the same time.
The orientation of the created link (whether it is from the central node’s element to the dropped element or vice versa) is defined by the point at which you drop the element, with relation to the central node.
The links editor tries to determine the type of the created link based on the types of link visible at the time of the drop (i.e which of the , , ,  and/or  button are selected), and on the Metaclass of both the dropped element and the central node element. If several types among those visible are valid, a dialog will open, asking you to choose the exact type to use for the creation.
Let’s say you want to add several traceability links between the requirements given by the client and your implementation classes.
First of all, you may want to switch to the Trace perspective which organizes views in an optimal way for this kind of task, with the links editor view right in the center, and model explorers on both sides.
Next, you’ll want to configure the links editor by carrying out the following two operations:
Set the links editor so that only dependencies are visible (,  and  unchecked and  checked) and activate the dependencies filtering ( checked).
Set the dependencies filter to show only dependencies with a << trace >> stereotype (to do this, click on the “Set dependencies filter” button  and make sure that the right column contains only the << trace >> stereotype).
From this point on, creation is fast and easy. Simply unpin the editor if previously pinned ( unchecked), and select a requirement in any view (the “Analyst” view, a diagram, etc). The selected requirement then becomes the central node. Continue by pinning the editor ( checked), and then dragging one or several classes (from the “Model” view, for example) into the links editor.
Rinse and repeat, fast and easy!