Specifying read-only stereotype attributes in UML profiles

You can specify read-only stereotype attributes in profiles.

Before you begin

Before you can mark a stereotype or attribute in a profile as read-only, a profile must be open in the Project Explorer view.

About this task

Specifying read-only stereotype attributes is helpful when you have a programmatic way to calculate the values of the stereotype attribute properties. For example, your enterprise might set up a derived property that calculates the precise values of an attribute. Specifying a specific attribute as read-only prevents modelers from updating or overriding the values of a property that are automatically generated. While modelers need to see the value of the property, they should not modify it.

To mark stereotype attributes as read-only:

Procedure

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

Results

The values of the attribute properties cannot be changed through the Rational® modeling product user interface (UI), regardless of where the stereotype is applied.
Note: To specify all properties of a stereotype as read-only instead of individual attributes, select a stereotype and then select the Properties UI Read Only check box. This check box provides a shortcut that enables you to mark all properties of the stereotype as read-only.

Feedback