A stereotyped model type can appear in a project many times. For example, when modeling an online shopping system with use case diagram you might have multiple actors who are <<administrator>>. Same for class model, you might have multiple <<Enum>> or <<Model>> classes. When a stereotyped model type is being used so frequently that they become primitive building blocks in a model, allowing to create it directly saves time in redefining it again and again. This article demonstrate how to configure the diagram toolbar to let you create a stereotyped model element easily.
Configuring the diagram toolbar
- Right-click on the diagram toolbar of the opening diagram and select Configure Buttons from the popup menu.
- In the Configure Buttons window, expand the tree node of the interested model element type.
- Click > to add the stereotype(s) into selection.
- Now, you can create the selected type(s) of class via the diagram toolbar. To do this, press on the element type button in the diagram toolbar and select the chosen element type from the popup menu.
- Click on the diagram to create such an element.
Auxiliary options
There are auxiliary options for rearranging items in the diagram toolbar such that selection can be made easier. We will go through two of them.
Show Name displays buttons' names when on. Turning it off can reduce spaces consumed by the buttons.
Expand Group expands all collapsed groups such that all stereotyped model types are visible and ready for direct selection.