DevDocRulesAndMetrics - JUCMNAV/projetseg-update GitHub Wiki
This page is related to the Semantic Verification and Metrics Computation sub-project of jUCMNav.
The 3 seg.jucmnav sub-packages affected by updates to the default static semantic rules and/or metrics are:
- Edit the appropriate .xml file in the staticSemantic (or metrics) directory. Simply edit it in a text editor.
- Test your modification using the "Restore Defaults" button in the Preference page of your plug-in under test.
- Update the Predefined Semantics Rules Overview (or Predefined Metrics Overview) documentation page.
- Export the new rules (created with jUCMNav) to a .xml file in the staticSemantic (or metrics) directory.
- Edit StaticSemanticDefMgr.java (or MetricsDefinitionManager.java)
- In the method getDefaultGroups(), add a line stating where to get the new group of rules/metrics:
-
- For rules: defaultGroups.add(createDefaultGroup("Your Group Name", "GroupName.xml", all, MetricsDefinitionManager.class)); //$NON-NLS-1$ //$NON-NLS-2$
-
- For metrics: defaultGroups.add(createDefaultGroup("Your Group Name", "GroupName.xml", all, StaticSemanticDefMgr.class)); //$NON-NLS-1$ //$NON-NLS-2$
- Update the Predefined Semantics Rules Overview (or Predefined Metrics Overview) documentation page.
- Simply edit the file library.ocl. Update in the code base and also the file on the Semantic Verification page (since this also serves as user documentation).
- Do not hesitate to add more functions to this library (and minimize the number of helper functions local to rules).
- Make sure the definition is added to the right package and the right context. Packages/contexts can be declared many times in this file.
- Beware: an OCL function in this library can invoke another one only if it was defined earlier in the file.
-- Main.DanielAmyot - 16 Nov 2009