| <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0//EN"> | |
| <html> | |
| <head> | |
| <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1"> | |
| <meta http-equiv="Content-Style-Type" content="text/css"> | |
| <meta name="GENERATOR" content="Mozilla/4.76 [en] (Windows NT 5.0; U) [Netscape]"> | |
| <title> | |
| Refactoring wizard | |
| </title> | |
| <link rel="stylesheet" href="../book.css" charset="ISO-8859-1" type="text/css"> | |
| </head> | |
| <body> | |
| <h1> | |
| Wizard | |
| based refactoring user interface</h1> | |
| <p> | |
| A wizard based user interface guides you through the steps necessary to execute a refactoring. | |
| A refactoring wizard consists of 1 - n parameter pages, a preview page and a problem page.</p><h2> | |
| Parameter pages | |
| </h2> | |
| <p> | |
| These pages gather information that is required for the refactoring. For example, the | |
| <em>Pull Up</em> refactoring uses two pages to gather the methods and fields to be pulled | |
| up and to gather the obsolete methods and fields in subclasses that can be deleted. The | |
| user can navigate the parameter pages using the <strong>Next ></strong> and <strong> | |
| < Back</strong> button. | |
| </p> | |
| <p> | |
| After you have provided the required information, you can click <strong><strong>Finish</strong></strong> to carry out the refactoring without previewing | |
| the results. If you want to preview the changes press <strong>Next ></strong>.</p> | |
| <h2> | |
| Preview page | |
| </h2> | |
| <p> | |
| The JDT allows you to preview the results of a refactoring action before you execute it. | |
| </p> | |
| <p> | |
| The preview page consists of two parts: | |
| </p> | |
| <ul> | |
| <li> | |
| A tree at the top containing all Java elements affected by the refactoring. Each top-level node in the tree represents one compilation unit. | |
| </li> | |
| <li> | |
| A compare viewer at the bottom. The left side of the compare viewer shows the original, the right side displays the refactored source. | |
| </li> | |
| </ul> | |
| <h2> | |
| Problem page | |
| </h2> | |
| <p> | |
| The Refactoring Problem page indicates if there are suspected, potential, or definite problems with the refactoring action you are attempting. | |
| </p> | |
| <p> | |
| Four types of problems are possible: | |
| </p> | |
| <dl> | |
| <dt> | |
| Information | |
| </dt> | |
| <dd> | |
| A problem described as Information will not affect the refactoring in any way, nor will it negatively affect the code in the workbench. You can most likely ignore this type of | |
| problem. | |
| </dd> | |
| <dt> | |
| Warnings | |
| </dt> | |
| <dd> | |
| Warnings attempt to predict compiler warnings. This type of problem most likely will not negatively affect the code in your workbench. | |
| </dd> | |
| <dt> | |
| Errors | |
| </dt> | |
| <dd> | |
| A problem described as an Error is very likely to cause compiler errors or change your workbench code semantically. You can choose to continue with the refactoring in spite of these | |
| errors, although it is not recommended. | |
| </dd> | |
| <dt> | |
| Stop problems | |
| </dt> | |
| <dd> | |
| This type of problem prevents the refactoring from taking place. 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. | |
| </dd> | |
| </dl> | |
| <p> | |
| If there aren't any stop problems then the refactoring can be carried out by pressing the <strong> | |
| Finish</strong> button. To preview the results of the refactoring action, press the | |
| <strong>Next ></strong> button. | |
| </p> | |
| <p> | |
| In the <a href="ref-23.htm">Refactoring preference</a> page (<strong>Window</strong> > <strong>Preferences</strong> > <strong>Java</strong> > | |
| <strong>Refactoring</strong>), you can select the default level for problems to be displayed when you are carrying out a refactoring. | |
| </p> | |
| <p> | |
| <img src="../images/ngrelc.gif" alt="Related concepts" border="0" height="27" width="159"> | |
| </p> | |
| <p> | |
| <a href="../concepts/concepts-9.htm">Refactoring support</a> | |
| </p> | |
| <p> | |
| <img src="../images/ngrelt.gif" alt="Related tasks" border="0" height="27" width="159"> | |
| </p> | |
| <p> | |
| <a href="../tasks/tasks-84.htm">Previewing refactoring changes</a><br> | |
| <a href="../tasks/tasks-100.htm">Undoing a refactoring operation</a><br> | |
| <a href="../tasks/tasks-101.htm">Redoing a refactoring operation</a> | |
| </p> | |
| <p> | |
| <img src="../images/ngrelr.gif" alt="Related reference" border="0" height="27" width="159"> | |
| </p> | |
| <p> | |
| <a href="ref-menu-refactor.htm">Refactoring actions</a><br> | |
| <a href="ref-23.htm">Refactoring preferences</a> | |
| <a href="ref-156.htm">Icons</a><br> | |
| </p> | |
| <p> | |
| <a href="../hglegal2003.htm"><img src="../images/ngibmcpy2003.gif" alt="Copyright (c) 2000, 2003 IBM Corporation and others. All Rights Reserved." border="0" width="324" height= | |
| "14"></a> | |
| </p> | |
| </body> | |
| </html> | |