Use the Move Members dialog box to specify the target where selected methods and fields of the source are to be moved. The Move Members dialog box appears after you have chosen the Refactor > Move refactoring command while having a class method or field selected in the Source Editor or in the Members View of the Navigator.
The dialog box has the following fields:
The following table lists buttons that are available in the toolbar at the bottom of the members list. Hold the cursor over a button to display a description of the command.
Button | Function |
---|---|
![]() |
Show fields. Click to display fields in the list. |
![]() |
Show static members. Click to display static members in the list. |
![]() |
Show non-public members. Click to display non-public members in the list. |
![]() |
Sort by name. Click to display members sorted out by names. |
![]() |
Sort by source. Click to display members sorted out by their position in the source code. |
![]() |
Select all. Click to select all members in the list. |
![]() |
Deselect all. Click to deselect all members in the list. |
The following table lists the visibility levels that a member can have.
Level | Description |
---|---|
Escalate | Automatically raise the visibility to a necessary level based on usages. |
As is | Keep the current visibility level of the member. |
Private | Change to or keep the visibility private. |
<default> | Change to or keep the visibility the default level. |
Protected | Change to or keep the visibility protected. |
Public | Change to or keep the visibility public. |
If you want the class to be moved immediately, click Refactor.
If you want to preview the change first, follow these steps:
The Refactoring window opens and displays a tree view of the code to be affected by the refactoring.