Associating stereotypes with UML model elements

You can specify the types of model elements that a stereotype extends. When you apply a profile to a model, you can only apply the stereotypes that are applicable to the types of model element that the stereotypes extend.

About this task

Before you can associate stereotypes with UML model elements, a custom profile must be open in the Project Explorer view.

To associate a stereotype with a UML model element:

Procedure

  1. In the Project Explorer view, click a stereotype.
  2. In the Properties view, click the Extensions tab.
  3. On the Extensions page, click Add Extension.
  4. In the Create Metaclass Extension window, in the Metaclass list, click a model element.
  5. Optional: To automatically apply the stereotype to the type of model element that you specified in the previous step, select the Required check box. The attributes of the stereotype are added to the model element automatically.
  6. Optional: To associate additional model element types with the selected stereotype, repeat steps 1 through 5 .

Feedback