| <!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//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.75 [en] (Windows NT 5.0; U) [Netscape]"> |
| <title> |
| Refactor actions |
| </title> |
| <link rel="stylesheet" href="../book.css" charset="ISO-8859-1" type="text/css"> |
| </head> |
| <body> |
| <h1> |
| Refactor actions |
| </h1> |
| <p> |
| Refactor menu commands: |
| </p> |
| <table border="1" cellspacing="0"> |
| <tbody> |
| <tr> |
| <th> |
| <p> |
| Name |
| </p> |
| </th> |
| <th> |
| <p> |
| Function |
| </p> |
| </th> |
| <td> |
| <strong>Keyboard Shortcut</strong> |
| </td> |
| </tr> |
| <tr align="left" valign="top"> |
| <td align="left" valign="top"> |
| <p> |
| Undo |
| </p> |
| </td> |
| <td align="left" valign="top"> |
| <p> |
| Does an Undo of the last refactoring. The refactoring undo buffer is only valid as long as no other source changes than refactoring have been performed. |
| </p> |
| </td> |
| <td> |
| Alt + Shift + Z |
| </td> |
| </tr> |
| <tr> |
| <td align="left" valign="top"> |
| <p> |
| Redo |
| </p> |
| </td> |
| <td align="left" valign="top"> |
| <p> |
| Does a Redo of the last undone refactoring. The refactoring undo/redo buffer is only valid as long as no other source changes than refactoring have been performed. |
| </p> |
| </td> |
| <td> |
| Alt + Shift + Y |
| </td> |
| </tr> |
| <tr> |
| <td align="left" valign="top"> |
| <p> |
| Rename |
| </p> |
| </td> |
| <td align="left" valign="top"> |
| |
| <p> Starts the Rename refactoring dialog: Renames the selected element |
| and (if enabled) corrects all references to the elements (also in other |
| files). Is available on methods, fields, local variables, method parameters, |
| types, compilation units, packages, source folders, projects and on a |
| text selection resolving to one of these element types. </p> |
| </td> |
| <td> |
| Alt + Shift + R |
| </td> |
| </tr> |
| <tr> |
| <td align="left" valign="top"> |
| <p> |
| Move |
| </p> |
| </td> |
| |
| <td align="left" valign="top"> |
| <p> Starts the Move refactoring dialog: Moves the selected elements and |
| (if enabled) corrects all references to the elements (also in other files). |
| Can be applied to one instance method (which can be moved to a component), |
| one or more static methods, static fields, types, compilation units, packages, |
| source folders and projects and on a text selection resolving to one of |
| these element types. </p> |
| </td> |
| <td> |
| Alt + Shift + V |
| </td> |
| </tr> |
| <tr> |
| <td>Change Method Signature </td> |
| <td> |
| <p>Starts the Change Method Signature refactoring dialog. Changes parameter |
| names, parameter types, parameter order and updates all references to |
| the corresponding method. Additionally, parameters can be removed or added |
| and method return type as well as its visibility can be changed. This |
| refactoring can be applied to methods or on text selection resolving to |
| a method. </p> |
| </td> |
| <td> </td> |
| </tr> |
| <tr> |
| |
| <td>Convert Anonymous Class to Nested</td> |
| |
| <td> |
| <p>Start the Convert Anonymous Class to Nested Class refactoring dialog. |
| Helps you convert an anonymous inner class to a member class. This refactoring |
| can be applied to anonymous inner classes.</p> |
| </td> |
| <td> </td> |
| </tr> |
| <tr> |
| |
| <td>Convert Nested Type to Top Level</td> |
| |
| <td> |
| <p>Starts the Convert Nested Type to Top Level Type refactoring dialog. |
| Creates a new Java compilation unit for the selected member type, updating |
| all references as needed. For non-static member types, a field is added |
| to allow access to the former enclosing instance. This refactoring can |
| be applied to member types or text resolving to a member type.</p> |
| </td> |
| <td> </td> |
| </tr> |
| <tr> |
| |
| <td>Push Down</td> |
| |
| <td> |
| <p>Starts the Push Down refactoring dialog. Moves a set of methods and fields |
| from a class to its subclasses. This refactoring can be applied to one |
| or more methods and fields declared in the same type or on a text selection |
| inside a field or method. </p> |
| </td> |
| <td> </td> |
| </tr> |
| |
| <tr> |
| <td align="left" valign="top"> |
| <p> |
| Pull Up |
| </p> |
| </td> |
| |
| <td align="left" valign="top"> |
| <p> Starts the Pull Up refactoring wizard. Moves a field or method to a |
| superclass of its declaring class or (in the case of methods) declares |
| the method as abstract in the superclass. This refactoring can be applied |
| on one or more methods, fields and member types declared in the same type |
| or on a text selection inside a field, method or member type. </p> |
| </td> |
| <td> |
| |
| </td> |
| </tr> |
| <tr> |
| |
| <td>Extract Interface</td> |
| |
| <td> |
| <p>Starts the Extract Interface refactoring dialog. Creates a new interface |
| with a set of methods and makes the selected class implement the interface, |
| optionally changing references to the class to the new interface wherever |
| possible. This refactoring can be applied to types.</p> |
| </td> |
| <td> </td> |
| </tr> |
| <tr> |
| |
| <td>Use Supertype Where Possible</td> |
| |
| <td> |
| <p>Starts the Use Supertype Where Possible dialog. Replaces occurrences |
| of a type with one of its supertypes after identifying all places where |
| this replacement is possible.This refactoring is available on types.</p> |
| </td> |
| <td> </td> |
| </tr> |
| <tr align="left" valign="top"> |
| |
| <td> Inline</td> |
| |
| <td> Starts the Inline refactoring dialog. Inlines local variables, methods |
| or constants. This refactoring is available on methods, static final fields |
| and text selections that resolve to methods, static final fields or local |
| variables.</td> |
| <td> |
| Alt + Shift + I |
| </td> |
| </tr> |
| |
| <tr align="left" valign="top"> |
| <td> |
| Extract Method |
| </td> |
| |
| <td> Starts the Extract Method refactoring dialog. Creates a new method containing |
| the statements or expression currently selected and replaces the selection |
| with a reference to the new method. You can use <em>Expand Selection |
| to</em> from the <a href="ref-menu-edit.htm">Edit</a> menu to get a valid |
| selection range.<br> |
| This feature is useful for cleaning up lengthy, cluttered, or overly-complicated methods. |
| </td> |
| <td> |
| Alt + Shift + M |
| </td> |
| </tr> |
| <tr align="left" valign="top"> |
| |
| <td> Extract Local Variable </td> |
| <td> |
| <p>Starts the Extract Variable refactoring dialog. Creates a new variable |
| assigned to the expression currently selected and replaces the selection |
| with a reference to the new variable. This refactoring is available on |
| text selections that resolve to local variables. You can use <em>Expand |
| Selection to</em> from the <a href="ref-menu-edit.htm">Edit</a> menu to |
| get a valid selection range. </p> |
| </td> |
| <td> |
| Alt + Shift + L |
| </td> |
| </tr> |
| <tr> |
| |
| <td>Extract Constant</td> |
| |
| <td> |
| <p>Starts the Extract Constant refactoring dialog. Creates a static final |
| field from the selected expression and substitutes a field reference, |
| and optionally rewrites other places where the same expression occurs. |
| This refactoring is available on static final fields and text selections |
| that resolve to static final fields.</p> |
| </td> |
| <td> </td> |
| </tr> |
| <tr> |
| |
| <td>Convert Local Variable to Field</td> |
| |
| <td> |
| <p>Start the Convert Local Variable to Field refactoring dialog. Turn a |
| local variable into a field. If the variable is initialized on creation, |
| then the operation moves the initialization to the new field's declaration |
| or to the class's constructors. This refactoring is available on text |
| selections that resolve to local variables.</p> |
| </td> |
| <td> </td> |
| </tr> |
| <tr> |
| |
| <td> Encapsulate Field </td> |
| |
| <td> Starts the Self Encapsulate Field refactoring dialog. Replaces all references |
| to a field with getting and setting methods. Is applicable to a selected |
| field or a text selection resolving to a field. </td> |
| <td> |
| |
| </td> |
| </tr> |
| </tbody> |
| </table> |
| <p> |
| Refactoring commands are also available from the context menus in many views and the Java editor. |
| </p> |
| <p> |
| <img border="0" src="../images/ngrelc.gif" alt="Related concepts" width="159" height="27"><br> |
| <a href="../concepts/concepts-9.htm">Refactoring support</a> |
| </p> |
| <p> |
| <img border="0" src="../images/ngrelt.gif" alt="Related tasks" width="159" height="27"><br> |
| <a href="../tasks/tasks-80.htm">Refactoring</a><br> |
| <a href="../tasks/tasks-176.htm">Using Structured Selection</a> |
| </p> |
| <p> |
| <img src="../images/ngrelr.gif" width=159 height=27 alt="Related reference"><br> |
| <a href="ref-23.htm">Refactoring preference page</a><br> |
| <a href="ref-117.htm">Refactoring dialogs</a><br> |
| <a href="ref-154.htm">Extract Method Errors</a> |
| </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" height="14" width= |
| "324"></a> |
| </p> |
| </body> |
| </html> |
| |