Working with diagram elements

 

Selecting an element in a diagram

To select an element in a diagram, simply click on it using the left mouse button.

 

When an element has been selected, it appears in blue and is surrounded by control points.

 

Note:      In UML 1.4 state diagrams, selected elements are only surrounded by control points, and do not appear in blue.

 

A class selected in a diagram

 

 

Selecting several elements in a diagram

To select several elements in a diagram, you can either:

or:

 

 

Selecting a diagram element in the explorer

It can be useful when working in a diagram to be able to jump back to a specific element in the explorer, without having to manually select it in the explorer.

 

To do this, simply right-click on the element in the diagram to open the context menu, and run the "Select in explorer" command. This automatically activates the explorer, displaying it in the foreground of the tool, and automatically selects the element in question.

 

Note 1:   This function is only available on box elements.

 

Note 2:   The "Select in explorer" command only functions with the main explorer (you cannot automatically select diagram elements in sub-explorers).

 

 

Opening a new explorer from a diagram element

If you want to launch a sub-explorer on an element appearing in a diagram, simply right-click on the element you want to use as the root in the new sub-explorer, and run the  "Open in new explorer" command from the context menu.

 

Sub-explorers appear in the work view window.  When a new sub-explorer is opened, it is automatically activated (in other words, it is the active view in the work view window).  To browse between open diagrams and sub-explorers, simply click on the corresponding tabs at the top of the work view window.

 

 

Moving an element to a different position in a diagram

If you want to move an element to a different position, simply select the element in question, hold down the left mouse button and move the selected element to the desired location.  The position of the object can be observed while it is being moved.

 

If the element has any links (associations, generalizations, ...), these links graphically "follow" the element when it is moved.

 

 

Moving an element to a different owner element in a UML 2 diagram

Using the Objecteering drag and drop feature, you can move an element from one parent element to another.  For example, you can move a class from one package into another package.

 

To do this, simply select the element you want to move and drag it into the new parent element.  When this type of operation is carried out, the explorer is automatically updated and model consistency maintained.

 

Note:      In UML 1.4 state diagrams, elements cannot be moved to different owner elements in this way.

 

 

Modifying elements in a diagram

To change an element's name in a UML 2 diagram, simply select the element and then press F2.  The element's name is then highlighted and you can directly enter a new name.

 

For UML 1.4 state diagrams, the procedure for changing an element's name in a diagram is slightly different.  Simply click on the element name to activate the edit mode and then directly enter a new name

 

An element's properties are modified in the associated dialog box, which is opened by:

 

For more information on dialog boxes, please see "Modifying elements".

 

 

Deleting an element from a diagram

To delete an element from a diagram, you can:

 

In both cases, the explorer is automatically updated and model consistency maintained.

 

If you select an element and then press the "Delete" or the "Backspace" key on your keyboard, the selected element will simply be masked in the diagram, but will not be deleted from the model.