Stereotypes Stereotypes Defined stereotypes are displayed in the browser. Stereotypes can be owned by both packages and profiles. To define a stereotype: 1. In the Rational Rhapsody browser, right-click the profile or package that owns the stereotype and then select Add New > Stereotype . Rational Rhapsody creates a new stereotype called stereotype_n under the Stereotypes category. 2. Enter a name for the new stereotype. 3. Double-click the new stereotype to open its Features window : 4. Select one or more metaclasses to which the stereotype is applicable to. 5.
For profiles, if you are working in a domain with specialized terminology and notation, select the New Term check box to create a new metaclass. Since a term is based on an out-of-box metaclass, it functions in the same manner as its base metaclass. For more information about new terms, see Special stereotypes . 6. Click OK . 7. Optionally, to set the formatting for the stereotype, right-click the new stereotype name in the browser and select Format . Use the Format window to define the visual characteristics for the stereotype. Associating stereotypes with an element You associate stereotypes with a model element using the Stereotype field of the Features window for that element.
The Stereotype field includes a list of all the stereotypes defined in the profiles and packages that can extend the metaclass of that element. For example, if the element is a class, the Stereotype list includes all the stereotypes in all the profiles and packages that extend that class. To associate stereotypes with an element: Rational Rhapsody 385