There are two ways to add a new metric suite to your model:
- Create a metric suite using the BaseMetricSuite (recommended).
- Create a metric suite from scratch.
The BaseMetricSuite is a predefined metric suite stored in the DSL Customization profile of the UML Standard Profile.
You are free to choose either way, but we highly recommend the first one. It aids the creation of a new metric suite, which inherits the BaseMetricSuite attributes that are necessary for calculating metrics (e.g., the context parameter definition and the metric definition for date tracking). This way you don’t have to specify them on your own.
To create a new metric using the BaseMetricSuite
- Make sure that your project uses the UML Standard Profile. If not, use it by going to Options > Project Usages.
- Create a package to store all the metric suites of your model.
- In the package, create a Profile Diagram. If you can't find it in the list of available diagrams, enable the Expert mode.
Press Ctrl+Alt+F and in the Quick Find dialog type “BMS”.
Make sure you clear the Apply Filter check box.
Click the BaseMetricSuite in the list of search results. The BaseMetricSuite is selected in the Containment tree.
Drag the BaseMetricSuite from the Containment tree onto the diagram pane. Its shape appears on the diagram.
On the diagram palette, click MetricSuite, and then click a free space on the diagram. A new metric suite is created and its shape appears on the diagram.
Draw a generalization relationship from the newly created metric suite to the BaseMetricSuite.
Now the newly created metric suite inherits all the parameter and metric definitions of the BaseMetricSuite.
To create a new metric suite from scratch
- Create a package to store all the metric suites of your model.
- In the package, create a Profile Diagram. If you can't find it in the list of available diagrams, enable the Expert mode.
- On the diagram palette, click MetricSuite, and then click a free space on the diagram.
A new metric suite is created and its shape appears on the diagram.
To specify the description of a metric suite
- Double-click the shape of a metric suite to open its Specification window.
- Click Documentation/Hyperlinks on the left side of the window.
- In the text box on the right side of the window, type the description.
- Click Close.