Creating a Class Diagram for a Component

You can create a class diagram for a selected component to have an overall view of the classes and interfaces associated with the component. You can only create one class diagram per component.

The Create/Update Class Diagram feature from the component contextual menu, acts as follows:

  • Creates a class diagram if none exists

  • Attaches a class diagram to a component

  • Adds symbols of all related interfaces and classes in the class diagram

  • Completes the links in the diagram

This feature also allows you to update a class diagram after you have made some modifications to a component.

The Open Class Diagram feature, available from the component contextual menu, opens the specific class diagram if it exists, or it creates a new default class diagram.

For EJB components for example, the Open Class Diagram feature opens the class diagram where the Bean class of the component is defined.

If you delete a component that is attached to a class diagram, the class diagram is also deleted. Moreover, the classes and interfaces symbols are deleted in the class diagram, but the classes and interfaces objects remain in the model.

Right-click the component in the component diagram and select Create/Update Class Diagram from the contextual menu.

A new class diagram, specific to the component, is displayed in the diagram window and the corresponding node is displayed under in the Browser. You can further create objects related to the component in the new class diagram.

Note:

To open the class diagram for a component, right-click the component in the diagram and select Open Class Diagram from the contextual menu or press Ctrl and double-click the component.