blob: 0a0033b809aac8a26785353ec0f58de16ec6a574 [file] [log] [blame]
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<meta name="copyright" content="Copyright (c) IBM Corporation and others 2000, 2007. 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>
Wizard based refactoring user interface
</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 &gt;</strong> and <strong>
&lt; Back</strong> button.
</p>
<p>
After you have provided the required information, you can click <strong>Finish</strong> to carry out the refactoring without previewing
the results. If you want to preview the changes press <strong>Next &gt;</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>
<p>A tree at the top containing all Java elements affected by the refactoring. Each top-level
node in the tree represents one compilation unit.</p>
<p>Some refactorings allow to filter the tree by different kind of changes made by the refactoring.
Use the <b>Filter Changes</b> drop down to change the filtering.</p>
</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 &gt;</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/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>