Migrate
Last modified: 29 November 2022The Migrate refactoring lets you easily switch between the old packages and classes used in your project and the new ones. IntelliJ IDEA comes with the default migration map.
tip
This refactoring is also available from UML Class diagram.
Run the migration refactoring
From the main menu, select Refactor | Migrate Packages and Classes.
Select the desired migration map from the list.
In the dialog that opens, select the scope of file in which you want to refactor your code and click Run.
Create a new migration
From the main menu, select Refactor | Migrate Packages and Classes, and click Create New Migration.
Specify the name of the map and an optional map description.
Click the
icon to create a new migration rule.
In the dialog that opens, specify the following options:
Select whether you want to migrate packages or classes.
Specify the old and the new names of the package or class.
Click OK to apply changes and close the dialog.
Create or edit as many migration rules as required. Use the
icon to edit the exiting rules.
Click Save. After than, you can run it from the main menu.
Thanks for your feedback!