Move Inner to Outer Level Dialog Box
See Also
Use this dialog box to specify options for the Move Inner to Outer Level refactoring command.
You can use the Move Inner to Outer Level command to move an inner class up
one level of hierarchy.
You can open the Move Inner to Outer Level dialog box by choosing
Refactor > Move Inner to Outer Level after you have selected an inner class in the
Source Editor, Projects window, or Files window.
The dialog box has the following fields:
- Class Name. Contains the name of the class to be moved.
- Declare Field for the Current Outer Class. If selected, an
instance field for the current outer class will be generated and
the outer class will be passed to the constructor. If you select
this checkbox, type a name for the the outer class' instance field
in the Field Name text field.
- Field Name. The name of the field to be created if the
Declare Field for the Current Outer Class is checked.
If you want to preview the changes, you need to follow these steps
to complete the refactoring:
- Click Preview.
The Refactoring
window opens and displays a tree view of the code to be affected by the refactoring.
- Check the items displayed in the Refactoring window to make sure that you want them
all changed. Clear the checkbox next to any parts of the code that
you do not want changed.
- Click Do Refactoring.
- You should always perform a clean build after completing
any refactoring commands. You can do a clean build by right-clicking the project's
node in the Projects window and choosing Clean and Build Project.
- See Also
- About Refactoring
- Refactoring: Quick Reference
- Undoing Refactoring Changes
Legal Notices