IntelliJ IDEA 2021.2 Help


The 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.

  1. On the main menu, select Refactor | Migrate.

  2. In the dialog that opens, select the desired migration map from the drop-down list, or click New to create a new map.

  3. Specify the name of the map, and optional map description.

  4. Click the Icons general add (Add) icon to create a new migration description.

  5. 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.

  6. Create or edit as many migration descriptions as required, and click OK.

  7. Click Run to start migration with the selected map.

Last modified: 02 August 2022