|
|
Apply Stereotypes |
This helper allows easy application of stereotype(s) to model elements based on eligibility criteria.
|
Applicable To |
All |
|
Menu
Entry |
Power
Pack Apply Stereotype(s) |
|
Demonstration |
In addition, if using Rhapsody 10 or later then the helper may be launched from the main toolbar as well as the Tools menu.
When launched the helper presents all stereotypes that could be applied to the selection based on eligibility criteria see below). Any stereotypes already applied are selected (see multiple selection below)

Right-click a stereotype and select Locate in Browser to Locate it in the Rhapsody model browser (to avoid the tooltip keep your mouse in the Select column – or disable tooltips using the Options menu)
Selecting a checkbox immediately applies / removes that stereotype.
Stereotypes may be applied / removed in bulk using Select All / Clear All / Invert Selection
Hovering over the name of a stereotype presents a tooltip (if applicable – see below). Tooltips may be disabled using the menu Options Disable Tooltips

Only valid stereotypes are presented in the UI, that is they must meet the following criteria:
· The stereotype must have the same Applicable To as the selected element(s).
· The stereotype must not be a new term (application of new terms are handled by Change To)

This is optional. If the stereotype has a value in the following property, then the selected model element(s) are checked for that new term
Model.Stereotype.ApplicableToNewTerm

If the selected element is a dependency, then the stereotype(s) are also checked for any source or target properties and if present, these are also used as eligibility checks (both base terms and new terms may be used)
Model.Stereotype.Sources
Model.Stereotype.Targets

Multiple selection is supported with the following constraints:
· The selected elements must all share a base type (for example you can select multiple dependencies but not a dependency and a use case)
· The UI only sets a stereotype to selected on launch if ALL selected elements have that stereotype applied
When presenting tooltips, the helper first checks if the stereotype has the following property set (this is a new property to allow profile designers to specify their own html-based tooltip content):
Model.Stereotype.HTMLDescription
If not empty, then the property content is simply wrapped in <html> </html> tags and presented. Note that if a full page is used (that is the content already has <html> … then only the <body> part of the content is extracted and used.
If the above property is empty, then the helper checks the stereotype Description field. If this is empty then no tooltip is presented, otherwise the description is converted into HTML and displayed (this mneans that rich text formatting may be used in the description.