The Copy refactoring lets you create a copy of a class in a different package. It can also be used to create a copy of a file, directory or package in a different directory or package.
Performing copy refactoring
To perform the Copy refactoring
- Select the item of interest in a tool window (e.g. the Project tool window). Alternatively, open the necessary class or file in the editor.
Do one of the following:
- Choose Refactor | Copy in the main menu or the context menu.
- In the Project tool window, press and hold the Ctrl key, and drag the item to the target location.
- In the Copy dialog that opens, specify the name and location for the copy that you are creating, and click OK.
Last modified: 4 December 2014