IntelliJ IDEA 2021.1 Help

Copy dialog

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

ItemDescription
New nameSpecify the name of the class, file, package or directory to be created.
To directorySpecify the directory where to create a copy.

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

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

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

Target destination directoryWhen 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 the Browse button   Shift+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 editorSelect this checkbox to automatically open a file, directory or package after it is copied. If you clear this checkbox, then the file, directory or package that you have copied will not be opened.
Last modified: 08 March 2021