Capabilities and viewpoints for UML modeling

The IBM® Rational® modeling products provide two mechanisms for controlling the tools that are displayed as you work with UML models: capabilities and viewpoints. You can use these mechanisms to customize the product to suit your needs and goals so that you can focus on specific functions when you work with models.

Capabilities

Capabilities are associated with the product components that you install, and you use them to enable or disable specific product components. The capabilities that control the tools for UML modeling are contained in two groups: UML Diagram Building Blocks and UML Element Building Blocks. You can specify capabilities for the entire workbench, or specify capabilities for individual models. You define workbench capabilities by using preferences; you define model capabilities by using properties. The capabilities help reduce clutter in the workbench by controlling the availability of the following UI elements:
  • Palettes
  • Pop-up menus in the diagram editor and the Project Explorer view
  • Action bars and connector handles in the diagram editor

Some capabilities are associated with model templates so that, when you select a particular template from which to create a model, only the corresponding tools are displayed. For example, if you use specific diagram types in your models, you might choose to enable only the corresponding UML Diagram Building Block capabilities.

The model capabilities take precedence over workbench capabilities; they are written directly to the model. Therefore, if the model is opened in a different workspace, the capabilities that are associated with that model remain in effect.

When you work with models, if you try to perform an action for which the corresponding workbench capability is disabled, you are prompted to enable the capability in the Preferences window.

Viewpoints

Viewpoints are sets of capabilities that you can use to quickly enable or disable various components when you work with models. You can use viewpoints to limit the capabilities that are enabled in the workspace, without changing the capabilities that are associated with a model.

The default viewpoint is the Model viewpoint, which provides full UML element and UML diagram capabilities. IBM Rational modeling products include two additional predefined viewpoints: Use Case, and Analysis and Design. Each viewpoint provides the capabilities that are relevant to the user goal. For example, the Use Case viewpoint provides capabilities that support use-case modeling, such as use-case diagrams, freeform diagrams, and use-case building blocks. You can also create custom viewpoints that include only the capabilities that you require.

You should use viewpoints to control capabilities. If you enable workbench capabilities, and open a model that has specific model capabilities enabled, the resulting UI might not be limited as you expect; this occurs because model capabilities override workbench capabilities. However, if you use viewpoints, the available UI should be what you expect to see.

Enabled capabilities for a model

The final set of capabilities that is enabled for a model depends on how you define the capabilities. If you use the Model viewpoint, either the model capabilities or the workbench capabilities are applied. If you use other viewpoints, the final capabilities are calculated from the intersection of the capabilities that are associated with the selected viewpoint and the capabilities that are currently enabled in the workbench or in the model.

The following table outlines the possible scenarios and the capabilities that are applied to a model in each case:
Scenario Capabilities that are applied to the model
  • You create a new model.
  • You select specific capabilities in the wizard.
  • The Model viewpoint is selected.
  • The capabilities that you specified in the wizard
  • You create a new model.
  • You do not select capabilities in the wizard.
  • The Model viewpoint is selected.
  • The capabilities that you specified in the workbench preferences
  • You create a new model.
  • You select specific capabilities in the wizard.
  • You select a different viewpoint.
  • The common capabilities that you specified in both the wizard and the viewpoint preferences
  • You create a new model.
  • You do not select capabilities in the wizard.
  • You select a different viewpoint.
  • The common capabilities that you specified in both the viewpoint preferences and the workbench preferences
  • You select an existing model.
  • You select specific capabilities in the Properties view.
  • The Model viewpoint is selected.
  • The capabilities that you specified in the Properties view
  • You select an existing model that has no specific capabilities enabled.
  • The Model viewpoint is selected.
  • The capabilities that you specified in the workbench preferences
  • You select an existing model.
  • You select specific capabilities in the Properties view.
  • You select a different viewpoint.
  • The common capabilities that you specified in both the Properties view and the viewpoint preferences
  • You select an existing model that has no specific capabilities enabled.
  • You select a different viewpoint.
  • The common capabilities that you specified in both the viewpoint preferences and the workbench preferences

Example: Enabling capabilities

The following example illustrates how you can use the various workbench, model, and viewpoint capabilities in a modeling project.

In this example, you work as a developer on a project where the team members share several models; however, different members focus on different parts of the model, depending on their role.

The architect determined the style of modeling to use. To simplify the development of a particular model, the architect enabled the following UML diagram building blocks: Class Diagram, Sequence Diagram, State Machine Diagram, and UseCase Diagram.

As a developer, part of your work requires you to make designs based on use cases, so you create a viewpoint that refines the UI to only reveal those elements that pertain to use-case, class, and sequence diagrams. Another part of your work focuses on creating the state models for elements, so you create another viewpoint that reveals only those elements that pertain to class and state machine diagrams. You can then switch viewpoints when you work on different tasks.

Another member of the team only performs use-case analysis. This analyst creates new models that other team members add to. Because the analyst has a very specific role, a simplified user interface can help reduce the workspace clutter for that role. The analyst sets the workbench capabilities to only reveal those elements that pertain to use-case, class, and sequence diagrams. When this analyst creates a new model, there is no need to switch to a special viewpoint because the workbench preferences limit what is displayed in the user interface. Because no specific capabilities are enabled for the model, other team members can add other UML diagrams to the same model.

In summary, if specific capabilities are enabled for a model, team members can use only those capabilities; however, each team member can further limit the user interface by selecting a viewpoint. If specific capabilities are not enabled for the model, team members can limit the user interface to elements that are appropriate to a role by creating their own viewpoint or by setting their own workbench preferences.


Feedback