59 | | @CheckdefvoidcheckUnusedRule(Rule rule) { var List<RuleReference > references = EbnfAnalysisUtils . findReferences (rule); var List<Rule> references1 = EbnfAnalysisUtils . findReferences (rule,resourceDescriptions); if ((references.size+references1.size ==0) && (rule.getRulenumber() !=1)) warning( unusedRuleDescription , EbnfPackage $Literals:: RULE__ NAME , unusedRuleDescription , rule.name);}For this the@Checkannotation defines that the next function is a Validationcheck. |
| 59 | @Check |
| 60 | def void checkUnusedRule(Rule rule) { |
| 61 | |
| 62 | var List<RuleReference> references = EbnfAnalysisUtils.findReferences(rule); |
| 63 | var List<Rule> references1 = EbnfAnalysisUtils.findReferences(rule,resourceDescriptions); |
| 64 | if ((references.size+references1.size == 0) && (rule.getRulenumber() != 1)) |
| 65 | warning(unusedRuleDescription, EbnfPackage$Literals::RULE__NAME, unusedRuleDescription, rule.name); |
| 66 | } |