Adding Shortcuts

To refer to a class located outside the current diagram, or to another diagram, you can use shortcuts. To add a shortcut, right-click on the diagram background and choose New > Shortcut from the context menu. The Shortcuts dialog displays. From this dialog, you can choose the desired element to add from the Model Elements list, or you can use the Java Elements list and browse/search for an interface or class that you want to add. The Shortcuts dialog is shown as follows:

NB: You can not use the Copy and Paste operations to create shortcut elements on class diagrams. The Paste operation does not create a new shortcut element. Use the "Paste shortcut" operation instead.

Shortcut elements are indicated on a diagram with the shortcut icon .

Shortcuts for class or interface elements located outside of their current package display the appropriate package and class name information. For example, if you add a shortcut in Package 2 to ClassA located in Package1, then the shortcut class name for ClassA displays on the diagram in Package2 as Package1.ClassA.

By default, shortcuts to diagrams display the name of the diagram (in bold) and its diagram type. Enabling Show Icons on Class and Package Diagrams under Together View Management, displays the associated icon for the appropriate diagram type:

TIP: When you delete a design element, you have the option to delete it only from the view. If you choose to delete the element from view, then the diagram element is considered to be unattached. Use the Shortcut dialog to reattach these diagram elements to the diagram.