The Migrate refactoring allows you to easily switch between the old packages and classes used in your project and the new ones. IntelliJ IDEA comes with the default migration map. You can use it to provide Swing 1.1 support in a project that includes Swing 1.0.3 packages and classes.
This refactoring is also available from UML Class diagram.
- On the main menu, choose Package and Class Migration dialog box opens. . The
- Select the desired migration map from the drop-down list, or click the New button to create a new one. Edit Migration Map dialog appears.
- Specify the name of the map, and optional map description.
- Create a new migration description. To do that, click Add.
- In the Edit Class/Package Migration Description dialog box 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 descriptions as required, and click OK to apply changes and close the Edit Migration Map dialog.
- Click Run to start migration with the selected map.