IntelliJ IDEA
 
Get IntelliJ IDEA
You are viewing the documentation for an earlier version of IntelliJ IDEA.

Copy and Move Refactorings

Last modified: 10 August 2022

The Copy refactoring lets you create a copy of a class in a different package. It also lets you create a copy of a file, directory or package in a different directory or package.

The Move refactoring lets you move packages and classes between the source roots of a project, class members to other classes and inner classes to upper hierarchy levels. For example, you can perform the move refactoring on method or field if it is used more in another class than in its own class.