Configure stereotypes

You can configure stereotypes, not just to create and name stereotypes for specific model element types, but also to format stereotypes like to set their colors, line formatting and font, and to define their tagged values. By configuring stereotypes, domain specific stereotype set can be built.

To configure stereotypes:

  1. Select Window > Configuration > Configure Stereotypes... from the toolbar.
  2. Click on the drop down menu Scope at the top left corner of the Configure Stereotypes window, select whether to configure stereotypes in workspace or in the opening project.
    NOTE: Initially, stereotypes exist in workspace rather than in project. When you apply a stereotype to any model element, a copy of that stereotype will be made from workspace to project.
    By modifying stereotype in workspace, changes will not be applied to current project nor any project that has used the stereotype.
    To configure stereotype only in current project, you must select Project as scope.
    Alternatively, select Workspace but let the option Apply changes to stereotypes in current project on.
  3. Select the type of model element that you want to add stereotype or edit its existing stereotypes.
    Select class to edit its stereotypes
    Select class to edit its stereotypes
  4. You may now perform any of the following action:
    • If you want to edit an existing stereotype, select the stereotype and click Edit....
    • If you want to add a stereotype, click Add....
    • If you want to remove a stereotype, select the stereotype and click Remove.
  5. If you are adding or editing a stereotype, update its specification and click OK to confirm editing. For details about editing a stereotype, read the coming section.
  6. Click OK to confirm.

An overview of Configure Stereotypes window

An overview of Configure Stereotypes window
An overview of Configure Stereotypes window
No.Name Description
1 Scope Initially, stereotypes exist in workspace rather than in project. When you apply a stereotype to any model element, a copy of that stereotype will be made from workspace to project.

By modifying stereotype in workspace, changes will not be applied to current project nor any project that has used the stereotype because the stereotype copied to project is being followed. If you want to configure stereotype only in current project, you must select Project as scope, or select Workspace but let the option Apply changes to stereotypes in current project on to make changes apply on both workspace and project.
2 Model element list A list of categorized model element types. You can select a type to configure its stereotypes.
3 Stereotypes A list of stereotypes of the selected model element type.
4 Apply changes to stereotypes in current project Available only when scope is Workspace, this option cause the stereotype configuration applies to both stereotypes in workspace and project, when pressing OK.
5 Duplicate Click to duplicate the stereotype selected in Stereotype pane.
6 Import Click this to import stereotype configuration (an XML) produced by others. Once clicked, the Import Stereotypes window will popup. You need to choose the XML file to import. At the bottom of the window, there is an option Add and update only (do not delete stereotypes). When checked, Visual Paradigm will only add and update stereotypes from XML. When unchecked, Visual Paradigm will add and update stereotypes, and additionally delete stereotypes that are not defined within the XML.
7 Export Click to export stereotype configuration to an XML file.
8 Add Click this to add a stereotype for the selected type of model element.
9 Edit Click to edit the selected stereotype.
10 Remove Click to delete the selected stereotype.
11 OK Click to apply the configuration and close the dialog.
12 Cancel Click to discard the changes (if any) and close the window.
13 Help Click to open the Help contents.
14 Number of stereotypes shown in popup menu You can assign stereotype to a shape easily by right clicking on that shape and selecting Stereotypes > %STEREOTYPE% from the popup menu. This option is to control the number of stereotype to be listed for selection. The larger the number, the longer the popup menu, the easier you can find the desired stereotype.
Description of Configure Stereotypes window

Editing stereotype

By adding or editing a stereotype, you can specify its icon and adjust its fill, line and font style in the General page within the Stereotype Specification.

Editing stereotype
Editing stereotype

By applying a stereotype that has icon defined to a model element, the icon above the name of model element, near the stereotype. You can optionally make the model element shown as the icon. For details, read the previous chapter. To specify icon, click on the ... button near the preview of Icon. Then, select the image file of icon.

You can also configure the formatting properties of the stereotype by clicking Configure.... In the popup window, you can set the foreground, background and line styles by first checking Use and then start the editing. The settings will be applied automatically to model elements that have the stereotype applied.

Defining tagged values for stereotypes

A stereotype may have properties, which may be referred to as tag definitions. When a stereotype is applied to a model element, the values of the properties may be referred to as tagged values.

You can define tagged values for stereotypes. By doing so, when you apply the stereotype with tagged values defined to a model element, you can fill in the values for the model element.

  1. Select Window > Configuration > Configure Stereotypes... from the toolbar.
  2. In the Configure Stereotypes window, select the stereotype that you want to define tagged value and click Edit. If you want to add a new stereotype, select the base model type and click Add...
  3. In the Stereotype Specification window, open the Tagged Value Definitions tab.
  4. Click Add. Select the type of tagged value to define. The type of tagged value limits the type of content user can enter for a tag.
    Adding a tag
    Adding a tag
    Tag type
    Description
    Text
    The most common and general type of tagged value that consists of words.
    Multi-line Text
    The value of tag is a text in multiple lines.
    Model element
    The value of tag is a model element in project.
    Enumeration The value of tag can be chosen from a list of possible values. For example, to select "red" out of values red, green and blue.
    Integer
    The value of tag must be a real number.
    Floating point number
    The value of tag must be a number that consists of one or more digits.
    Boolean The value of tag muse be either true or false.
    Date The value of tag is a date.
    Time The value of tag is a time.
    Currency The value of tag is a text that represents currency (e.g. USD, RMB).

    Type of tags
  5. Double click the name cell and enter the name of tag. Repeat step 4 and 5 to add all tagged values for this stereotype.
    Tags defined
    Tags defined
  6. You can assign a default value to a tag by editing the Default Value cell. Usually, you give a tag a default value when the value is true in most cases. For example, a tag "in-door-temperature" can have "25" as default value.

Related Resources

The following resources may help you to learn more about the topic discussed in this page.

 
1. Apply Stereotype to Model Element Table of Contents 3. Shortcut of creating stereotyped model element

We use cookies to offer you a better experience. By visiting our website, you agree to the use of cookies as described in our Cookie Policy.OK