Skip to main content

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

Package Diagram

Place the package diagram

To place the package diagram, follow the steps below.

Place package diagram

Operation procedure
  1. Select a package in the model navigator and click Add Model> Package Diagram in the context menu.
  2. The package diagram is placed on the child elements of the selected package.

Define a package

To define a package, do the following:

Add Package

Operation procedure
  1. Drag and drop the displayed package diagram [Package].
  2. 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.

IconName
PackagePackage
NoteNote
LabelLabels
ShapeShape
Add stereotypes to packages

To add a stereotype, do the following:

Add stereotype

Operation procedure
  1. Select a package.
  2. Click the Add button in the Basic information> Stereotype field in the Property inspector to see the choices.
  3. 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.

  1. Double-click the stereotype displayed on the package to enter the edit state.
  2. 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:

Add Dependency

Operation procedure
  1. Move the pointer over the package you want to associate.
  2. 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:

Add Stereotype

Operation procedure
  1. Select a dependency.
  2. Double-click the grayed out [<< stereotype>>] to enter the edit state.
  3. 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.