Package Diagram
Overview
You can use a package diagram to visualize the dependencies between packages. This page describes the operations for using the package diagram in the following order.
- Place the package diagram
- Define a package
- Define dependencies
Place the package diagram
To place the package diagram, follow the steps below.
Operation procedure
- Select a package in the model navigator and click Add Model> Package Diagram in the context menu.
- The package diagram is placed on the child elements of the selected package.
Define a package
To define a package, do the following:
Operation procedure
- Drag and drop the displayed package diagram [Package].
- A new package is added as a sibling element of the displayed package diagram.
Elements that can be added from the toolbox
In the package diagram, you can place the following elements displayed in the toolbox.
Icon | Name |
---|---|
Package | |
Note | |
Labels | |
Shape |
Add stereotypes to packages
To add a stereotype, do the following:
Operation procedure
- Select a package.
- Click the Add button in the Basic information> Stereotype field in the Property inspector to see the choices.
- Select a stereotype and press the [OK] button to set the stereotype for the package and display the stereotype for the package shape.
tip
Stereotype choices can be defined in the Detail view of the package model.
tip
You can edit the added stereotype from the package diagram by following the steps below.
- Double-click the stereotype displayed on the package to enter the edit state.
- If you change the stereotype and confirm the edit, it will be reflected on the package diagram and the stereotype of the package will be changed.
tip
If you want to display an existing package on the package diagram, you can display it by dragging and dropping the package on the model navigator onto the package diagram.
Define dependencies
To define a dependency, do the following:
Operation procedure
- Move the pointer over the package you want to associate.
- Drag the [โฒ] icons that appear on all sides of the package and drop them on the other package.
Add stereotypes to dependencies
To add a stereotype, do the following:
Operation procedure
- Select a dependency.
- Double-click the grayed out [<< stereotype>>] to enter the edit state.
- When you enter the stereotype you want to set, the stereotype is displayed for the dependency of the package diagram, and the stereotype is set for the dependency.
tip
If you want to represent an import or merge, use the dependent stereotypes to represent it.