Attribute Context Menu

All of the UML diagram elements share common context menu commands. To use the context menu for an element, simply right click on the element in the Diagram view. To view the common context menu commands, see Common Element Context Commands.

The context menu for an attribute shares the common element context commands as well as the following commands specific to it:

Open

Selecting Open from the context menu, opens the selected class containing the attribute in the text editor highlighting the attribute in the source code.

Show in Packages View

The Show in Packages View command highlights the node selected in the Packages tree-view. The Packages view will expand and highlight that element in the tree-view. If closed, the Packages view will open.

Show in UML Explorer

The Show in UML Explorer View command highlights the node selected in the UML Explorer tree-view. The UML Explorer view will expand and highlight that element in the tree-view. If closed, this view will open.

Static

Selecting Static from the context menu sets the static property for the attribute.

Visibility

The Visibility command for the attribute offers a submenu with the following options:

Public

Selecting Public from the submenu sets the visibility property for the attribute to public.

Protected

Selecting Protected from the submenu sets the visibility property for the attribute to protected

Private

Selecting Private from the submenu sets the visibility property for the attribute to private.

Package Local

Selecting Package Local from the submenu sets the visibility property for the attribute to package local.


NB:
The visibility options are not available for Interface members.

Apply Pattern

Selecting this command launches the Apply Pattern dialog displaying the available patterns. Select a pattern from the Patterns list to apply.

Generate Getter and Setter

Using this command displays the Generate Getter and Setter dialog.

Within this special dialog, you can select attributes to designate as getters and setters.

References

The References command offers a submenu with the following options:

Workspace

By selecting Workspace from the submenu, you can search the entire workbench for references to the element.

Hierarchy

By selecting Hierarchy from the submenu, you can search the Hierarchy view for references to the element.

Working Set

By selecting Working Set from the submenu, the Select Working Sets dialog displays. From this dialog, you can select which working sets to search.

Declarations

The Declarations command offers a submenu with the following options:

Workspace

By selecting Workspace from the submenu, you can search the entire workbench for declarations of the element.

Hierarchy

By selecting Hierarchy from the submenu, you can search the Hierarchy view for references to the element.

Working Set

By selecting Working Set from the submenu, the Select Working Sets dialog displays. From this dialog, you can select which working sets to search.