This section explains how the views of Sonargraph can be used efficiently while working with the architecture definition and investigating reported architecture violations.
Investigate Violations
Architecture violations listed in the Issues view can have different root causes: a) There is a violating dependency, b) the architecture definition needs to be updated.
For further investigation, you can do the following:
-
Check the source code: Simply double-click on the violation.
-
Investigate the dependency with more context: Right-click on the violation and select → .
-
Check the architecture definition: Right-click on the violation and select . The Architecture view is opened with the artifact selected that contains the element causing the violation. Double-click on the artifact and the Architecture File view is opened, highlighting the line of the artifact's definition.
-
Check the artifact dependencies: The description of the architecture violation contains more details, e.g. "[Static Method Call] 'X' cannot access 'TypeA.java' from 'Y' ...". If you are interested in the context of the involved artifacts 'X' and 'Y', open the Architecture view via right-click . Open the context menu for the selected artifact and open the architecture-based Exploration view via → .
NOTE
The architecture-based Exploration view offers dependency information down to the component level, since that is the smallest unit of assignment to an artifact.
Related topics: