Question & Answer
Question
How can you distinguish elements having a specific stereotype applied from other ordinary UML models placed on diagrams in IBM Rational Rhapsody?
Cause
Rhapsody provides many options and properties to increase the visibility of your model, but the availability of documentation that provides a complete solution is limited when it comes to the effective use of stereotype and toolbox customization.
Answer
Rhapsody provides mechanism to distinguish model elements having particular stereotypes are applied. You can also add classes with your stereotype applied to the diagram tool box. This way, you can create classes with your stereotype applied in a single click, allowing you to distinguish them from other model elements on the browser and various diagrams. This technote highlights that the toolbox part of Rhapsody GUI is configurable and it is not difficult to get Rhapsody working just how you want it once you understand what properties are available and how to use them.
- How to color up classes with your stereotype applied
- Create a new stereotype called "my_stereotype".
- Set "Applicable to" to "Class".
- Right click on the stereotype and choose "Format" from the pop-up menu.
- Select "Class" in the list.
- Press "Format selected Meta-class..." button and choose a color for marking.
- Apply "my_stereotype" to any class on diagrams.
![](/support/pages/system/files/support/swg/rattech.nsf/0/8f98b4d8880b250585257b740014b51e/Content/2.355C.gif)
You may want to add "my_stereotype" to the diagram toolbox. To customize further, follow the steps below:
- How to color up classes with your stereotype applied
- Open Feature window of "my_stereotype" and set it as a New Term.
- Override following properties according to the image (*1). You can modify those properties either at project level or in your profile.
Properties:
General::Graphics::ObjectModelDiagramToolbar
Model::Stereotype::AddToDiagramsToolbar
(*1)
- Close the project, and open it again.
- Open OMD diagram, you will see a new icon displayed on the toolbox.
- To change icons on the toolbox and browser, override following properties for the stereotype.
Properties:
Model::Stereotype::BrowserGroupIcon
Model::Stereotype::BrowserIcon
Model::Stereotype::DrawingToolIcon
Related Information
Product Synonym
Rational Rhapsody
Was this topic helpful?
Document Information
Modified date:
27 May 2022
UID
swg21638463