1.10. Check at Development Time with Sonargraph Eclipse Integration

The following steps describe how to use the Sonargraph Eclipse plugin to execute the quality checks at development time. Start the Eclipse IDE and import the example project.

  1. Install the plugin. Section 14.1, “ Eclipse Plugin ” provides details about the plugin's update site.

  2. Use the "Sonargraph" menu to activate the plugin by assigning a licsense file or activation code.

  3. Assign the Sonargraph system file. Check that the Sonargraph markers appear on the project and root directories.

  4. Check that the Sonargraph issues are listed in the problems view. Update the code by introducing / removing violations and check that the markers get updated after saving the changes. ("Build Automatically" must be enabled in Eclipse.)

  5. Create a custom "Problems" view and configure it to only show the Sonargraph issues.

  6. Switch back to the Sonargraph Architect application. Open the package cycle from the Cycle Groups view and open then the Cycle Breakup view. The dependency to breakup is now much easier to identify, because of the existing architecture definition.

  7. Create a delete refactoring for the proposed breakup and save the changes.

  8. Create a move/rename refactoring for a compilation unit or package of your choice and save the changes.

  9. Refresh the system files in Eclipse using the corresponding Sonargraph menu entry. A new task marker should be visible in the Tasks view and also at the position within the file. Move the violating line up and down and save frequently. The task marker moves accordingly. Comment out the offending lines and see the marker disappear.

  10. Open the Sonargraph Refactorings view in Eclipse and execute the refactoring via the context menu.

  11. Refresh the system in Sonargraph Architect and notice that the status of the refactoring changed to "Potentially Done". The architect can now review the changes and delete the task.

Related topics: