Editing Diagram Elements

Together provides several different ways to edit diagram elements, so you can choose the method most appropriate for your editing needs.

Renaming

You can use one of the options listed to rename an element:

Alias

The Alias property of elements allows you to give an element a name that would not normally be accepted for that element. For example, to make a class name more readable, use the Alias property to represent a class name with spaces. Using the Alias property does not effect the original name. The Diagram view displays the Alias name for an element.

Using the Properties View

By selecting the element on the diagram, you can edit its properties in the Properties view.

If the Property View is not open, right click on the element and select Properties from the context menu.

For more information, see Using the Properties View

Editing the Source Code

For elements represented by source code, simply double click on the element on the Diagram view to open the Editor. Alternatively, you can right click on the element in the UML Explorer or UML Navigator view, and select Open from the context menu. The Editor opens to the appropriate source code and highlights the code accordingly.

The source code editor can be used to change the diagram element or add further subelements to it, for example, attributes and methods.

Changes to source code are immediately reflected back in the diagram.

Using Cut, Copy and Paste

The standard clipboard options for Cut, Copy and Paste are available for all elements.

Adding a Stereotype

Add a stereotype to an element by using the Properties view. By default, the Properties view is displayed. However, if needed, open the Properties view by selecting Window > Show View > Properties from the menubar, or right click on the diagram element in the Diagram view or UML Navigator view, and select Properties from the context menu.

To apply a stereotype:

  1. Click on the diagram element in the Diagram view or in the UML Navigator view. The corresponding properties page displays for the diagram element.


  2. Select the stereotype field, and click the ellipsis to open the stereotype dialog box.


  3. Using the drop-down arrow, scroll to and select the desired stereotype from the list.

You can add more than one stereotype to an element. When doing so, the stereotype values display on the diagram element separated by commas.

TIP: Once a stereotype has been added to an element, it can be edited directly on the diagram. You can double-click the stereotype field to enable the in-place editor. Deleting the stereotype field from the element on the diagram removes the stereotype property.