IBM Support

How to visually distinguish elements having a specific stereotype is applied

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
    1. Create a new stereotype called "my_stereotype".

    2. Set "Applicable to" to "Class".



    3. Right click on the stereotype and choose "Format" from the pop-up menu.



    4. Select "Class" in the list.



    5. Press "Format selected Meta-class..." button and choose a color for marking.

    6. Apply "my_stereotype" to any class on diagrams.

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
    1. Open Feature window of "my_stereotype" and set it as a New Term.



    2. 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)


    3. Close the project, and open it again.

    4. Open OMD diagram, you will see a new icon displayed on the toolbox.



    5. To change icons on the toolbox and browser, override following properties for the stereotype.

      Properties:
      Model::Stereotype::BrowserGroupIcon
      Model::Stereotype::BrowserIcon
      Model::Stereotype::DrawingToolIcon

[{"Product":{"code":"SSB2MU","label":"IBM Engineering Systems Design Rhapsody"},"Business Unit":{"code":"BU059","label":"IBM Software w\/o TPS"},"Component":"General Information","Platform":[{"code":"PF033","label":"Windows"}],"Version":"8.0;8.0.1;8.0.2","Edition":"","Line of Business":{"code":"LOB59","label":"Sustainability Software"}}]

Product Synonym

Rational Rhapsody

Document Information

Modified date:
27 May 2022

UID

swg21638463