IntelliJ IDEA 13.1.0 Web Help

Refactor | Copy
F5F5F5F5F5F5F5F5F5F5F5F5
CloneElementCloneElementCloneElementCloneElementCloneElementCloneElementCloneElementCloneElementCloneElementCloneElementCloneElementCloneElement


Use this dialog to specify the settings for the Copy or Clone refactoring .

Copy dialog

Item Description
New name Specify the name of the class, file, package or directory to be created.
To directory When creating a copy of a file, directory or package: specify in which directory the copy of the file, directory or package should be created.

Select the destination directory from the list, or click browseButton (Shift+EnterShift+EnterShift+EnterShift+EnterShift+EnterShift+EnterShift+EnterShift+EnterShift+EnterShift EnterShift EnterShift Enter) and select the directory in the Select target directory dialog that opens. (If necessary, you can create a new directory.)

Destination package When creating a copy of a class: specify in which package the new class should be created.

Select the package from the list, or click browseButton (Shift+EnterShift+EnterShift+EnterShift+EnterShift+EnterShift+EnterShift+EnterShift+EnterShift+EnterShift EnterShift EnterShift Enter) and select the destination package in the Choose Destination Package dialog that opens. (If necessary, you can create a new package.)

Target destination directory When creating a copy of a class: if there is more than one source root in your module (e.g. one source and one test source root), you have an option of selecting in which of the source roots the new class should be created.

Select the destination source root from the list, or click browseButton (Shift+EnterShift+EnterShift+EnterShift+EnterShift+EnterShift+EnterShift+EnterShift+EnterShift+EnterShift EnterShift EnterShift Enter) and select the source root in the Choose Destination Directory dialog that opens.

If the specified destination package doesn't exist in the selected source root, it will be created automatically.

Open Copy in Editor Select this check box to automatically open a file, directory or package after it is copied. If you clear this check box, then the file, directory or package that you have copied will not be opened.

Clone dialog

Item Description
New name Specify the name of the clone (i.e. a copy of the class, file, package or directory).

See Also

Procedures:

Web Resources: