Previous Next
sde-vs_user_guide Appendix B - Configuring Stereotypes and Tagged Value

Appendix B - Configuring Stereotypes and Tagged Value

This chapter explains in detail how to apply Stereotypes and Tagged Value to categorize model elements.

Introduction

Stereotypes  allow you to categorize different kinds of model elements. It may specify additional constraints and tag definitions for the models, and also be used to indicate a difference in meaning or usage between two model elements with an identical structure. An icon or formatting (fill, line and font) can be specified to a stereotype to present the elements that apply to that stereotype.

We know that everything in UML contains its own properties. Tagged values let you add properties for specifying keyword-value pairs of model elements. You can define tags that apply to a model element or a stereotype.

Adding Stereotype to a Model Element

Figure B.1 - Class with Stereotypes
To add stereotype for a model element:
  1. Select the desired model element from the diagram.
  2. Right-click on the selection and choose Stereotypes > Stereotypes...from the popup menu.
  3. Figure B.2 - Select Stereotype in popup menu
  4. This displays the Stereotypes page of the Class Specification dialog box.
  5. Figure B.3 - Class specification dialog (stereotypes)
  6. Select a stereotype listed under the All list.
  7. Press > to assign the stereotype to the model element.
  8. To assign multiple stereotypes to a model element, press on the Ctrl key and select the desired stereotypes and press >> to assign them to the model element.
  9. Press OK to apply the setting.

Configuring Stereotypes

Apart from using existing stereotypes, you can create new stereotypes to suit your need.  Similarly, you can edit stereotypes to change their properties and appearance in a diagram.  To configure stereotypes, you must first display the Configure Stereotypes dialog box. Select from main menu Tools > Configure Stereotypes...to display the dialog box.

Figure B.4 - Configure Stereotypes dialog
Command Description
Add Allows you to create a new stereotype for a particular model element by displaying the Stereotype Specification dialog box of the new stereotype. Fill in the details of the new stereotype from that dialog box and confirm the changes to create a new stereotype.
Edit Allows you to edit an existing stereotype by displaying the Stereotype Specification dialog box of the selected stereotype. Fill in the details of the stereotype from that dialog box and confirm the changes to edit the properties of the stereotype..
Remove Remove a stereotype available to a particular model element.
OK Close the dialog box by committing all changes made.
Cancel Close the dialog box without saving any changes made.
Help Display the Help content of the Configure Stereotypes dialog box.
Table B.1

Creating a New Stereotype

To create a new stereotype:
  1. Displays the Configure Stereotypes dialog box.
  2. Select the model element for which the new stereotype is to be available to.
  3. Figure B.5 - Model Elements
  4. Press on the Add...button. This displays the Stereotype Specification dialog box for specifying the details of the new stereotype.
  5. Figure B.6 - Stereotypes Specification dialog
  6. Specify the details of the stereotype such as its name, documentation and its icon. (For more details on the use of Stereotype Specification dialog box, please refer to the following section in this chapter)
  7. Click OK to confirm the changes.
The new stereotype is now available to the selected model element.
Figure B.7 - User defined stereotypes

Editing a Stereotype

Figure B.8 - Modify stereotype
To edit a stereotype:
  1. Display the Configure Stereotypes dialog box.
  2. Select a stereotype from the Stereotypes list for editing. The stereotype can be a predefined one or one defined by you.
  3. Figure B.9 - Select stereotype from the Stereotype list
  4. Press on the Edit...button. This displays the Stereotype Specification dialog box for specifying the details of the new stereotype.
  5. Figure B.10 - Edit Stereotype
  6. Specify the details of the stereotype such as its name, documentation and its icon. (For more details on the use of Stereotype Specification dialog box, please refer to the following section in this chapter)
  7. Click OK to confirm the changes.
If the stereotype is in use by a model element, the appearance of that stereotype needs to be refreshed by pressing OK from the Configure Stereotypes dialog box in order to commit the changes made.

Using the Stereotype Specification Dialog Box

When creating or editing a stereotype you will come across the Stereotype Specification dialog box.

Figure B.11 - Stereotype specification dialog
Field Description
Name The name of the stereotype.
Icon Path An image assigned to this stereotype. Click ...to select the path of the image, or click to discard the icon.
Fill, Line, Font To specify the appearance of the stereotyped shapes. Their usages will be described in detail in the Stereotype Formats section later in this chapter.
Documentation The description or any information relevant to the stereotype.
Abstract To specify the stereotype as abstract.
Leaf To specify the stereotype as leaf.
Root To specify the stereotype as root.
Reset Reset all changes made.
OK Close the dialog box by committing all changes made.
Cancel Close the dialog box without saving any changes made.
Apply Committing all changes made.
Help Display the Help content of Stereotypes Specification dialog box.
Table B.2

Adding Tagged Value to a Stereotype

To add Tagged Value definitions to a stereotype:
  1. Select Tools > Configure Stereotypes...from main menu. This displays the Configure Stereotypes dialog box.
  2. Select the desired stereotype and click Edit...
  3. Figure B.12 - Press Edit button to open Stereotype specification
  4. The Stereotype Specification dialog box is displayed. Switch to the Tagged Value Definitions tab.
  5. Figure B.13 - Tagged value definitions
  6. Click Add.  This displays two kind of tags for selection, Text or Model Element.  Click on the desired one.
  7. Figure B.14 - Tag options

Adding Text Tag to stereotypes

From the Stereotype Specification dialog box, press Add and then select Text Tag from the popup menu.
Figure B.15 - Add Text tag
This displays a new Tag entry.
Figure B.16 - A new text tag entry
To change the name of the Tag, double click to the Name field and enter a new name.
Figure B.17 - Rename the tag
You can also change the type of Tag from Text to Model Element. To change the type, click on Type field and select a type from the popup menu.
Figure B.18 - Change the type of tag
To specify a default value of the Tag, double click to the Default Value field and enter a value.
Figure B.19 - Enter the value

Adding Model Element Tag to a stereotype

From the Stereotype Specification dialog box, press Add and then select Model Element Tag from the popup menu.
Figure B.20 - Add Model Element Tag
This displays a new Tag entry.
Figure B.21 - A new model element tag
To change the name of the Tag, double click to the Name field and enter a new name.
Figure B.22 - Rename the model element tag
You can also change the type of Tag from Text to Model Element. To change the type, click on Type field and select a type from the popup menu.
Figure B.23 - Change the type of tag
To specify a default value of the Tag, double click to the Default Value field and enter a value.
Figure B.24 - Enter the value of tag

Adding Tagged Value to a Model Element

To add Tagged Value definitions to a model element:
  1. Right-click on a model element and select Open Specification...from the popup menu.
  2. Figure B.25 - Open specification
  3. The specification dialog box is displayed. Switch to the Tagged Value Definitions tab.
  4. Figure B.26 - Actor Specification dialog
  5. Click Add. This displays two kind of tag for selection. One is Text Tag and another is Model Element Tag. Click on the desired one.
  6. Figure B.27 - Add Tag options

Adding Text Tag to Model Element

From the Stereotype Specification dialog box, press Add and then select Text Tag from the popup menu.
Figure B.28 - Add text tag
This displays a new Tag entry.
Figure B.29 - The new text tag
To change the name of the Tag, double click to the Name field and enter a new name.
Figure B.30 - The name of tag
You can also change the type of Tag from Text to Model Element. To change the type, click on Type field and select a type from the popup menu.
Figure B.31 - the type of tag
To specify a default value of the Tag, double click to the Value field and enter a value.
Figure B.32 - The value of tag

Adding Model Element Tag to a Model Element

From the Stereotype Specification dialog box, press Add and then select Model Element Tag from the popup menu.
Figure B.33 - Add Model element Tag
This displays a new Tag entry.
Figure B.34 - The blank new model element tag
To change the name of the Tag, double click to the Name field and enter a new name.
Figure B.35 - The name of tag
You can also change the type of Tag from Text to Model Element. To change the type, click on Type field and select a type from the popup menu.
Figure B.36 - The type of tag
To specify a default value of the Tag, double click to the Value field and enter a value.
Figure B.37 - The tag value

Stereotype Formats

You can configure the formats of stereotypes including fill, line and font, so that stereotyped elements can be easily distinguished and emphasized in the diagram.

Configuring Stereotype Formats

  1. To configure stereotype formats, select menu Tools > Configure Stereotypes....
  2. In the Configure Stereotypes dialog box, select a model type in Model elements and the target stereotype in Stereotypes. Click the Edit... button.
  3. Figure B.38 - Configure Stereotype dialog
  4. The Stereotype Specification is shown.
  5. Figure B.39 - Stereotype Specification dialog

Applying Fill Color

  1. To apply fill color to stereotype, select the Use checkbox and click the ... button of the Fill property.
  2. Figure B.40 - Edit fill of stereotype
  3. Select a fill color in the Format Fill dialog box and click OK.
Figure B.41 - Format Fill dialog

Applying Line Style

  1. To apply line style to stereotype, select the Use checkbox and click the ... button of the Line property.
  2. Figure B.42 - Edit line of stereotype
  3. Configure the line style in the Format Line dialog box and click OK.
  4. Figure B.43 - Format Line dialog

Applying Font

  1. To apply font to stereotype, select the Use checkbox and click the ... button of the Font property.
  2. Figure B.44 - edit Font
  3. Select a font in the Select Font dialog box and click OK.
Figure B.45 - Select Font dialog

After setting a stereotype to a shape, the formats of the stereotype will be applied to the shape immediately.

Figure B.46 - The Modified stereotype

Changing Stereotype Formats

  1. Just like configuring stereotype formats, open the 'Configure Stereotypes' dialog box and select a model type in Model elements and the target stereotype in Stereotypes. Click the Edit... button to edit its fill, line and font in the Stereotype Specification.
  2. Figure B.47 - Edit the format of stereotype
  3. After changing stereotype formats, it is important that you ensure the 'Apply changes to stereotypes in current project' option is selected, otherwise the stereotypes used in the current project will not be updated.
  4. Figure B.48 - apply the change to current project
  5. The appearances of shapes assigned to the changed stereotype are updated.
 
Figure B.49 - Model style updated

Previous Next
Visual Paradigm International Limited
Website: www.visual-paradigm.com
E-mail: support@visual-paradigm.com