| <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0//EN"> | |
| <html> | |
| <head> | |
| <meta name="copyright" content="Copyright (c) IBM Corporation and others 2000, 2005. This page is made available under license. For full details see the LEGAL in the documentation book that contains this page." > | |
| <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> | |
| Dialog based refactoring user interface | |
| </title> | |
| <link rel="stylesheet" href="../book.css" charset="ISO-8859-1" type="text/css"> | |
| </head> | |
| <body> | |
| <h1> | |
| Dialog based refactoring user interface</h1> | |
| <p> | |
| A dialog based user interface guides you through the steps necessary to execute a selected | |
| refactoring. A dialog based refactoring user interface consists of a short first dialog | |
| gathering information that is required to execute the refactoring, a separate problem dialog | |
| that pops up if any errors are detected and a preview dialog to preview the results of a | |
| refactoring.</p> | |
| <h2> | |
| Input dialog | |
| </h2> | |
| <p> | |
| This dialog gathers information that is required for the refactoring. For example, for a rename | |
| refactoring you will enter the new name for the Java element. You can either press <strong>OK | |
| </strong> to execute the refactoring or <strong>Preview ></strong> to preview the result | |
| of the refactoring. | |
| </p> | |
| <h2> | |
| Preview dialog | |
| </h2> | |
| <p> | |
| The JDT allows you to preview the results of a refactoring action before you execute it. | |
| </p> | |
| <p> | |
| The preview dialog 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 dialog | |
| </h2> | |
| <p> | |
| The problem dialog 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> | |
| OK</strong> button. To preview the results of the refactoring action, press the | |
| <strong>Continue</strong> button. | |
| </p> | |
| <p> | |
| <img src="../images/ngrelc.png" alt="Related concepts" border="0" > | |
| </p> | |
| <p> | |
| <a href="../concepts/concepts-9.htm">Refactoring support</a> | |
| </p> | |
| <p> | |
| <img src="../images/ngrelt.png" alt="Related tasks" border="0" > | |
| </p> | |
| <p> | |
| <a href="../tasks/tasks-82.htm">Refactoring without preview</a><br> | |
| <a href="../tasks/tasks-83.htm">Refactoring with preview</a><br> | |
| <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.png" alt="Related reference" border="0" > | |
| </p> | |
| <p> | |
| <a href="ref-menu-refactor.htm">Refactoring actions</a><br> | |
| </p> | |
| <p> | |
| <a href="ref-156.htm">Icons</a> | |
| </p> | |
| </body> | |
| </html> | |