Adding stereotype generalizations to custom UML profiles

You can use a stereotype generalization to build a stereotype in a UML profile that inherits the properties of another stereotype. These properties include the stereotype's attributes and constraints. The concept of stereotype generalization is similar to class generalization. When you apply the stereotype to a model element, the model element includes both the properties of the applied stereotype and generalized stereotype.

Before you begin

Before you can add a stereotype generalization, a profile that contains at least two stereotypes must be open in the Project Explorer view.

About this task

Restriction: Stereotypes can only inherit from stereotypes in the same UML profile or in an imported profile. Stereotypes cannot inherit from classes.

To add stereotype generalizations to a profile:

Procedure

  1. In the Project Explorer view, expand a project that contains a custom UML profile that contains two or more stereotypes.
  2. Expand the Profiles folder, expand the profile, right-click a stereotype; then click UML Properties.
  3. In the dialog box that opens, select Generalization. This list details the stereotypes that your stereotype inherits.
  4. Click Insert New Generalization in the Select Element window. In the Select Element window, navigate to and select the stereotype to inherit, and click OK.

Results

The stereotype generalization appears in the Generalization list and is added to the profile.

What to do next


Feedback