You can create custom UML metrics to collect on a UML model in
addition to the 19 metrics that are available by default. You can also create
custom UML review rules to supplement the 15 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.
To create custom metrics and rules for UML models by using templates:
- Click Window > Preferences.
- Expand Analysis 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 theChoose
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, either select one of the categories listed under Model
Review for UML or Model Metrics for UML;
then click Next.
- On the Select Template page, select one of templates 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:
- In the Current Custom Rules list, select
a rule from a category you want to delete and click Delete Rule.
Repeat for all rules in the category.
- In the Current Custom Categories list,
select a category to delete and click Delete Category.