You can create custom UML metrics to collect on a UML model
in addition to the metrics that are available by default. You can
also create custom UML review rules to supplement the rules that are
available by default. Two templates are available for creating custom
UML metrics. Four templates are available for creating custom UML
review rules. You can add custom rules and metrics to existing analysis
configurations or to new analysis configurations.
About this task
To create custom metrics and rules for UML models by using
templates:
Procedure
- Click Window > Preferences.
- Expand Software Analyzer and click Custom
Rules and Categories.
- To add a custom category, complete the following steps:
- On the Custom Rules and Categories page,
click Add Category.
- In the Add Custom Category window,
on the Choose Parent Category Location page,
either select Model metrics for UML or Model
review for UML; then click Next.
- In the Name field, type a name
for a category and click Finish. The new category
is displayed in the Current Custom Categories list.
- To add a custom rule, complete the following steps:
- On the Custom Rules and Categories page, click Add
Rule.
- In the Add Custom Rule window,
on the Choose a parent category page, select a category under UML
Model Review or UML Model Metrics;
then click Next.
- On the Select Template page, select a template and click Next.
- On the Assign Template Values page,
follow the instructions in the Description field
to fill in the template values and click Finish.
The new rule is displayed in the Current Custom Rules list.
- Optional: To export custom rules, click Export,
type a name for the export file and click Save.
The custom rules are saved in a file with .ccr as a file name extension.
- Optional: To import custom rules, click Import,
browse to a file with .ccr as a file name extension, and click Open.
- Optional: To delete a custom category, complete
the following steps:
- Ensure that the category does not contain any rules.
To delete rules, in the Current Custom Rules list,
select a rule from the category and click Delete Rule;
then repeat this action for any remaining rules in that category.
- In the Current Custom Categories list,
select the category to delete and click Delete
Category.