Classifiers
In the context of this document, a classifier is a Java type. Java classes,
interfaces, enumerations and annotations are the supported classifiers.
Add to Diagram
Source and binary classifiers can be added to the diagram in various
ways (as long as they are not there already):
- Classifiers can be dragged from the Package Explorer, the Type
Hierarchy View and the Search View. Note that when you drag a file from
the Package Explorer, all classifiers in that file are added to the
diagram.
- Classifiers can be added directly by opening a
selection dialog from the class diagram's context menu.

- Classifiers with a particular relationship to the currently
selected classifer can be added from the context menu. The supported
relationships are: generalization (super classes only), nesting, realization and
association. If you want to add subclasses to a diagram, please open the Type
Hierarchy view for the classifier of interest and drag subclasses from there.

- When an attribute is selected whose type is a classifier (not a primitive), that
classifier can be added directly to the class diagram by selecting
it from the context menu. If the attribute's type is a non-generic Collection
or Map, you can drag an association to an arbitrary classifier in the diagram by
selecting 'Association'.

- Java elements can be copied and pasted from one diagram to another.
They appear in the same location as the previous diagram. All
relationships between the elements are are copied as well, relationships
to other classifiers are reverse engineered as usual.
Packages and package roots (i.e. JARs and source folders, modeled as
components) can be dragged from the Package Explorer
Context Menu
In the context menu for diagram nodes (i.e. classifiers, packages and
components) the following items can appear. If a menu item does not appear
for a particular type of node, then this action is not available for that
type. If the menu item is disabled, the action is possible but not
available for the current selection.
- Open Source - opens the source code in an editor.
- Open Type Hierarchy - opens the type hierarchy in the Hierarchy view.
- Delete - deletes the selected node(s) from the diagram.
- Refresh - refreshes the source code of the selected classifier(s).
This should rarely be necessary since Eclipse resource and refactoring
events have the same effect.
- Add - a sub-menu to add related classifiers or relationships.
- Generalized - a sub-menu containing classifiers that the selected
one generalizes (extends) and which are not yet in the diagram.
- Realized - a sub-menu containing classifiers that the selected
one realizes (implements) and which are not yet in the diagram.
- Associated - a sub-menu containing classifiers with which the selected
one associates (references through an attribute) and which are not yet
in the diagram.
- Nested - a sub-menu containing classifiers that are nested within
the selected one and which are not yet in the diagram.
- Relationships - Adds all relationships of the selected classifier(s)
to other classifiers in the diagram.
- Generalizations - Adds all generalizations of the selected
classifier(s) to other classifiers in the diagram.
- Realizations - Adds all realizations of the selected classifier(s)
to other classifiers in the diagram.
- Associations - Adds all associations of the selected classifier(s)
to other classifiers in the diagram.
- Dependencies - Adds all dependencies of the selected classifier(s)
to other classifiers in the diagram.
- Nesting Relationships - Adds all nesting relationships of the
selected classifier(s) to other classifiers in the diagram.

- References - the standard Eclipse JDT references menu. Please see the
the JDT documentation of 'Search Actions' for details.

- Read Access - the standard Eclipse JDT read access menu for fields.
Please see the the JDT documentation of 'Search Actions' for details.
- Write Access - the standard Eclipse JDT write access menu for fields.
Please see the the JDT documentation of 'Search Actions' for details.
- Align - a sub-menu to align multiple nodes. The last selected node
remains fixed while the others are moved.
- Align Left - horizontally aligns the left sides of two or more nodes.
- Align Center - horizontally aligns the centers of two or more nodes.
- Align Right - horizontally aligns the right sides of two or more nodes.
- Align Top - vertically aligns the top sides of two or more nodes.
- Align Middle - vertically aligns the middle of two or more nodes.
- Align Bottom - vertically aligns the bottom sides of two or more nodes.

- Options - a sub-menu with various display options.
- Automatic Resize - determines if a classifier is automatically or
manually sized. Automatic Resize is turned off when you change the
classifier's size.
- Show Attribute Default - shows or hides the default (initial) values
of all attributes. If the initial value is an anonymous inner class,
the actual code is shown as '{...}'.
- Show Operation Signature - shows or hides the operation (method) signatures.
- Show Package Name - shows or hides the package name of classifiers.
- Show Stereotype - shows or hides the stereotype of classifiers.
- Show Visibility - shows or hides the visibility (public '+',
package '~', protected '#', private '-') of attributes and
operations.

- Self Relationships - Determines around which corner self-relationships
should loop.

- Show Attributes - a sub-menu to filter attributes (fields) by their
visibility. If all attributes are filtered, their compartment is hidden.
- Public - show or hide public attributes.
- Package - show or hide package-visible attributes.
- Private - show or hide protected attributes.
- Protected - show or hide private attributes.
- Static - show or hide static attributes.
- All - show all attributes.
- None - hide all attributes and their compartment.

- Show Operations - a sub-menu to filter operations (methods) by their
visibility. If all operations are filtered, their compartment is hidden.
- Public - show or hide public operations.
- Package - show or hide package-visible operations.
- Private - show or hide protected operations.
- Protected - show or hide private operations.
- Static - show or hide static operations.
- All - show all operations.
- None - hide all operations and their compartment.