Copy Class Dialog Box
See Also
Use the Copy Class dialog box to specify where to copy classes
and to specify whether other code is updated to reflect the new location of the class.
The Copy Class dialog box appears after you have done one of the following actions:
- Chosen the Refactor > Copy refactoring command.
- Cut and pasted Java files in the Projects window or in the Files window.
- Dragged and dropped files in the Projects window or in the Files window.
The dialog box has the following fields:
- Project. The name of the project to which you are moving the classes.
- Location. The part of the project to which you are moving the classes.
The appropriate value here is generally Source Packages, but it is also
possible to have other source roots represented in this field.
- To Package. The package to which you are moving the classes.
If you want the class to be copied immediately, click Refactor.
If you want to preview the change first, follow these steps:
- 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
- Refactoring: Quick Reference
- Renaming a Class or Interface
- Renaming a Field or Method
- Moving a Class to Another Java Package
- Undoing Refactoring Changes
Legal Notices