Refactoring Wizard

A wizard guides you through the steps necessary to execute a selected refactoring.
Refactorings are available in the Refactor menu of the menu bar or in context menus.

Parameters page

This page gathers information that is required for the refactoring. For example, a Rename Refactoring Parameters page asks you for the new name for the Java element.
After you have provided all required information on this page, you can click Finish to carry out the refactoring without previewing the results.

Preview page

The JDT allows you to preview the results of a refactoring action before you finally choose to carry it out.
The preview page consists of two parts:

Problem page

The Refactoring Problem page tells you if there is a suspected, potential, or definite problem with the refactoring action you are attempting to do.
Four kinds of problems are possible:
Information
These kinds of problems will not affect the refactoring in any way, nor will they negatively affect the code in the workbench. You most likely can ignore these kinds of problems.
Warnings
These kinds of problems attempt to predict compiler warnings. These kinds of problems most likely will not negatively affect the code in your workbench.
Errors
These kinds of problems are very likely to cause compiler errors or change your workbench code semantically. You can choose to continue with the refactoring despite these errors, although it is not recommended.
Stop problems
These kinds of problems actually prevent the refactoring from taking place at all. For example, if you select a comment and choose the Extract Method command from it, the workbench will issue a stop problem on the refactoring attempt because you cannot extract a comment.
In the Refactoring preference page (Window > Preferences > Java > Refactoring), you can select the default level for problems to be displayed when you are carrying out a refactoring without a preview, (that is, you click Finish instead of Next from the Refactoring Parameters page).

 

Related concepts

Refactoring support

Related tasks

Refactoring without preview
Refactoring with preview
Previewing refactoring changes
Undoing a refactoring operation
Redoing a refactoring operation

Related reference

Refactoring actions
Refactoring preferences

Icons
 
 Copyright IBM Corporation 2000, 2002. All Rights Reserved.