20.1.7.  Execute Refactorings in Eclipse

The list of Sonargraph refactorings definitions is shown in the Sonargraph Refactorings View. The view can be opened from the Eclipse main menu "Window""Show View""Other...". Select the folder "Sonargraph" and select "Sonargraph Refactorings".

The "Sonargraph Refactorings" view offers filter options in the top right corner. Refactorings can be filtered by status, priority, assignee and description.


Refactorings defined in Sonargraph might affect a lot of resources. We recommend committing all pending changes to your version control system before executing the refactorings, so you have a safe fallback.


Execute the refactorings in the order of their definition. Otherwise subsequent refactorings might no longer be applicable.

The Sonargraph plugin delegates the refactorings to the refactoring mechanism of Eclipse. Some Sonargraph refactorings cannot be converted into a single Eclipse refactoring. The following refactorings need to be split:

  1. Namespace refactorings that effectively merge two packages by moving or renaming a package into an existing target package.

  2. Move refactorings that change the source root of a namespace or compilation unit.

  3. Move refactorings of a package containing subpackages.

  4. Move+Rename refactorings are not supported as an atomic operation in Eclipse and need to be split.

The following steps are executed for each refactoring:

  1. If the Sonargraph refactoring needs to be split, a confirmation dialog will inform you about the necessary actions.

  2. The standard Eclipse refactoring dialogs are shown that allow you to control the affected resources (e.g. change names in non-Java files) and preview the changes.

  3. If you chose to deviate from the planned refactoring, a dialog prompts you to add a comment.


    Subsequent Sonargraph refactorings might become obsolete if you deviate from the planned refactoring!

  4. The refactoring log containing the list of changed resources is shown in the end. You can copy&paste these details as a protocol e.g. into your task management system.

Related topics: