Drawing package diagrams

Package diagram shows the arrangement and organization of model elements in middle to large scale project. It can show both structure and dependencies between sub-systems or modules.

Creating package diagram

Right click Package Diagram on Diagram Navigator and select New Package Diagram from the pop-up menu to create a package diagram.

Create package diagram
Create package diagram

Creating package

To create package, click Package on the diagram toolbar and then click on the diagram.

Create package
Create package

A package will be created.

Package created
Package created

Assigning stereotypes

Right click on the package and select Stereotypes > Edit Stereotypes... from the pop-up menu.

Assign stereotypes
Assign stereotypes

When the Package Specification dialog box pops out, the Stereotypes tab is opened by default. The list on the left shows the selectable stereotypes.

If the stereotype you want to use is not on the list, click Edit Stereotypes... button.

Edit stereotypes
Edit stereotypes

Click Add... button in the Configure Stereotypes dialog box.

Add stereotype
Add stereotype

 

Enter name for the new stereotype (e.g. facade). Click OK button in Stereotype Specification dialog box and the Configure Stereotypes dialog box. You will see the added stereotype appears on the list in Package Specification dialog box. Select it and click Add Selected button. Next, click OK button to proceed.

Add selected stereotypes
Add selected stereotypes

Close the specification dialog box. Stereotypes will be applied to the package.

Stereotypes assigned
Stereotypes assigned

Continue to complete the diagram.

Completed diagram
Completed diagram