Showing and masking elements in a diagram

 

Introduction

UML diagrams can quickly become cluttered and consequently difficult to work with, if all model elements, their contents and associated links are visible.  For this reason, Objecteering lets you decide whether to show or mask diagram components and referenced elements.

 

Elements can be shown by:

·         dragging and dropping them from the explorer into a diagram

·         using the "Unmask" command in the context menu

 

Elements can be masked using the "Mask" command in the context menu.

 

 

Showing using the drag and drop function from the explorer

To reveal an element in a diagram, simply select the element in question in the explorer, drag it over the diagram and drop it at the point where you want it to appear in the diagram.

 

Several elements can be shown simultaneously using this method, simply by making a multiple selection in the explorer.

 

Showing three classes using the drag and drop function

 

Steps:

1.      In the explorer, select the element or elements you want to show in the diagram.

2.      Holding down the left mouse button, drag them over the diagram in the work view window.

3.      Drop them at the location where you want them to appear in the diagram.

4.      The elements are now shown in the diagram.

 

 

Showing using the "Unmask" command

In UML 2 diagrams, the "Unmask" command in the context menu of an element can be used to unmask specific elements belonging to or linked to the selected element.

 

In UML 1.4 diagrams, the following elements can be shown using the "Unmask" command in the context menu on an element:

·         the contents of a selected element

·         any links stemming from the selected element

 

Note:      For both UML 2 and UML 1.4 diagrams, all these elements can also be shown by dragging and dropping them from the explorer into the diagram.

 

The screenshot below illustrates the unmasking of an association between two classes in a UML 2 class diagram.

 

Showing an association between two classes

 

Steps:

1.      Right-click on a class in the diagram to open the context menu.

2.      Run the "Unmask/Associations" command.

3.      The association is now shown in the diagram.

 

Note:      In order to unmask a link, the element selected in the diagram must be the link origin element, in other words, the element from which the link stems.

 

 

Representation options in UML 2 diagrams

For each element in a UML 2 diagram, you can define a representation option from the possibilities below:

·         The "Show visibility" option is used to graphically display the visibility of the selected element (using the +, - and # visibility symbols).

·         The "Show namespacing" option is used to show the full namespace of the selected element.

·         The "Show tagged values" option displays the tagged values used to annotate the selected element.

·         The "Show keyword" option displays the keyword associated with the selected element (interface realizations only).

·         The "Show signature" option displays the signature of the selected element (for elements that have a signature).

·         The "Stereotype representation" option is used to select how you want stereotypes to appear.  You can choose from no representation, textual representation, icon representation or large icon representation.

 

 

To select a representation option, simply carry out the steps shown below.

 

Selecting a representation option

 

Steps:

1.      Right-click on the element for which you want to select a representation option to open the context menu.

2.      Select  "Representation options" and select the option of your choice.  The selected representation option is then immediately implemented.

 

Note:      The "Reset default options" command is used to reset all properties to their default values. 

 

 

Representation options in UML 1.4 diagrams

If you want the tagged values and stereotypes belonging to an element to be displayed in your diagram, simply use the following commands in the context menu:

·         the "Detail level/Tagged value visibility" command to display tagged values

·         the "Detail level/Stereotype visibility" command to display stereotypes.  Stereotype display can be further customized by selecting to use an icon or a label.

 

 

Masking an element

In UML 2 diagrams, the "Mask" command in the context menu of an element can be used to mask the selected element.

 

Similarly, the "Mask" command in the context menu of an element in a UML 1.4 diagram can be used to mask the following:

·         the selected element itself

·         the contents of the selected element

 

The screenshot below illustrates the masking of a class in a UML 2 class diagram.

 

Masking a class

 

Steps:

1.      Right-click on a class in the diagram to open the context menu.

2.      Run the "Mask/Selection" command.

3.      The class is still present in the diagram, but it is no longer visible.

 

 

Shortcuts for showing and masking elements in UML 2 diagrams

Several keyboard shortcuts exist, to help you show and mask elements in UML 2 diagrams. 

 

For example, if you have selected a package, you can unmask the classes it contains by pressing Shift + C.

 

For a complete list of the shortcuts used to show and mask elements in UML 2 diagrams, please see the "Shortcuts in UML 2 diagrams" appendix of this user guide.