Specifying read-only stereotypes in UML profiles

You can specify stereotypes in profiles as read-only so that team members cannot manually apply or remove read-only stereotypes in a model.

Before you begin

Before you can specify a read-only stereotype in a profile, a profile must be open in the Project Explorer view.

About this task

When you specify a read-only stereotype in a profile, you cannot apply or remove these stereotypes in a model; however, you can see the stereotype in the Project Explorer view or anywhere else in the model and diagrams. Specifying a stereotype as read-only is helpful when your team has another way of programmatically controlling the properties, such as a custom pop-up menu. For example, you could create a custom pop-up menu that applies a C++ class stereotype to every class in the model. In an example such as this, you do not want team members to apply or remove these stereotypes because of the potential problems that could result in the model.

To mark stereotypes in profiles as read-only:

Procedure

  1. In the Project Explorer view, select a stereotype in a profile.
  2. In the Properties view, on the General tab, select the UI Read Only check box.

Results

You cannot apply or remove the stereotype throughout the model.

Feedback