IBM Support

Support for the containment icon or containment in IBM Rational Rhapsody

Question & Answer


Question

In IBM Rational Rhapsody, is there support for the Containment icon or Containment?

Answer

There is support for Containment in Rhapsody. There is a property that you need to enable. The property is called "ObjectModelGe:ClassDiagram:TreeContainmentStyle" which once enabled will allow you to see the relationships between elements in the object model diagram.

Following is the information on this property:

ObjectModelGe:ClassDiagram:TreeContainmentStyle

Rhapsody allows you to display namespace containment in object model diagrams. This type of notation is also referred to as "alternative membership notation." It depicts the hierarchical relationship between elements and the element that contains them, for example:

  • Requirements that contain other requirements
  • Packages that contain classes
  • Classes that contain other classes

The ability to display namespace containment is controlled by the boolean property TreeContainmentStyle, which can be set at the diagram, package, or project level. Namespace containment can only be displayed if the property is set to True.

Default = False (Note that in the SysML profile the default value of the property is True.)

If you have enabled the display of namespace containment by setting the value of the property to True, you can then display namespace containment as follows:

Drag the "container" element and the "contained" elements to the diagram. Then, from the menu, select Layout -> Complete Relations -> All.

The hierarchical relationship between the elements are depicted in the diagram.

Alternatively, you can select the Populate Diagram option when creating a new diagram. If you then select elements that have a hierarchical relationship, the diagram created will display the namespace containment for the elements.

Note that there is no drawing tool to manually draw this type of relationship on the canvas. Containment relationships between elements can only be displayed automatically based on existing relationships, using one of the methods described above.

[{"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":"7.5.1","Edition":"","Line of Business":{"code":"LOB59","label":"Sustainability Software"}}]

Product Synonym

Rational Rhapsody

Document Information

Modified date:
27 May 2022

UID

swg21425044