You can create class diagrams of existing Java™ source elements, including projects, packages,
classes, and interfaces, to visually represent and develop structures
and relationships in applications.
Before you begin
You must be in the
Package Explorer view
or have a class diagram open.
Procedure
- In the Package Explorer view or in
the diagram editor, right-click a source element or selected source
elements; then click Visualize and complete
one of the following steps:
- To add the selected elements to the new diagram, click .
- To add the selected Java project
or packages and their contents to the new diagram, click .
- In the New Class Diagram wizard, in
the Enter or select the parent folder field,
specify the parent folder.
- In the File name field, type a file
name.
- Optional: To enable the associated capabilities,
click Next and complete the following steps:
- Select the Customize UI visibility for this
diagram by selecting capabilities below check box.
- From the Capabilities list, expand
a category and select the capabilities.
- Click Finish.
Results
A class diagram is created and opens in the diagram editor
with the selected source elements and contents in it.
Tip: If
any selected source elements are Java 2
Platform, Standard Edition (J2SE) 5.0 classes with annotations, the
details of the annotations are shown in the annotation compartments
of the classes in the diagram. You can also add or edit annotations
in the Properties view on the Annotation page
.