|Prev - Next - Down||SDMetrics - the UML design measurement tool|
The measurement catalog indicates the applicable types of models for each rule. With the design rule filter, you can instruct SDMetrics to only check and report design rules that apply to your model at hand.
Writing Rule Filters
Table 3 shows some example filters and explains their function. For the example, we assume we have four application areas defined:
analysis(rules for analysis models)
design(rules for design models)
realtime(rules for models of real-time systems)
pedantic(rules about obsessive details)
To only check the rules of one application area, simply specify the
name of that application area.|
The example filter only checks rules that are applicable at the design phase.
To check rules applicable to all of several areas, combine the areas
with the & operator.|
The example filter only checks rules that are applicable to real-time systems at the design phase.
To check rules applicable to at least one of several areas, combine
the areas with the | operator.|
The example filter only checks rules that are applicable at the analysis phase or at the design phase.
To check rules that do not apply to a particular area, precede the
name of the area with the ! operator.|
The example filter only checks rules that do not apply to the analysis phase.
Some rules do not explicitly define an application area. Such rules
are implied to apply to all areas. Therefore, the
To instruct SDMetrics to only check rules that explicitly are defined for an application area, put the application area in single quotes.
The example filter only checks design rules which explicitly list "design" among their application areas.
|Using parentheses, you can define arbitrarily complex rule filters. The example filter checks all rules applicable to the design phase that are also not explicitly defined for real-time systems or are pedantic.|
Applying Rule Filters
To apply a filter, specify it in the "filter" text field at the top of the rule checker view, and press return or click the "Apply" button. To clear the filter, and show all design rule violations regardless of their application area, click the "Clear" button.
If your filter contains a syntax error (illegal operation, unmatched parentheses etc.) you will get an error message and the rules will not be checked. If your filter specifies an application area that is not defined explicitly by at least one rule, SDMetrics will warn you about this, but will check the rules anyway.
|Section 4.7 "The View 'Rule Checker'"||Contents||Section 4.7.2 "Accepting Design Rule Violations"|