Tips & Tricks

Maintaining Common Project Configuration in a Mixed-IDE Team

When you are working in a team that uses different IDEs, keeping project configuration in sync between team members is very complicated task. Sometimes it can be so cumbersome that you may want to stop trying to put them all together and resort to sharing Ant scripts as the repository for project configurations.
With IntelliJ IDEA 7 (Selena), you can export, import and synchronize IntelliJ IDEA and Eclipse projects.
To import existing EcIipse projects to IntelliJ IDEA:

  1. Open the File menu, select Import from Eclipse
  2. Select whether you want a New project or import to the Current project
  3. If you selected to create the new project, walk through the wizard steps
  4. Specify the Eclipse projects you want to import (each Eclipse project is converted to a separate IntelliJ IDEA module)
  5. Select the Link option for all specified projects if you want them automatically synchronized between IntelliJ IDEA and Eclipse and click Finish
    Note that if the option is cleared, the one-time import operation is performed and no future synchronization is done.

Project import wizard
In case you want to export an IntelliJ IDEA project to Eclipse, open the File menu and select Export to Eclipse. Selecting the Link option keeps Eclipse project file automatically synchronized with IntelliJ IDEA.

You can also convert the arbitrary IntelliJ IDEA project module to an Eclipse-compatible format by adjusting the module settings.
Open the Project Structure dialog, click Dependencies tab and select the appropriate storage format.
Setting the dependencies storage format
This table shows the mapping between some Eclipse and IntelliJ IDEA concepts:

Eclipse IDEA
A number of projects Project
Project Module
Project-specific JRE Module JDK
User library Global library
Classpath variable Path variable
Project dependency Module dependency
Library Module library

Named entities are converted to the entities with the same names. If imported Eclipse projects refer to user libraries or classpath variables that do not exist in IntelliJ IDEA project, IntelliJ IDEA will prompt to create them.
As of yet some limitations apply to migrating projects between IntelliJ IDEA and Eclipse:

  • IntelliJ IDEA modules with multiple content roots are not migrated
  • External sources in Eclipse are not migrated
  • Only Java modules created automatically when importing. However, any module can be converted to Eclipse
    compatible format manually
  • Default workspace JRE is not converted to/from Project JDK

To try this feature, download IntelliJ IDEA 7 Milestone 1.
Read more about InteliJ IDEA 7 Milestone 1 features and improvements.
Watch Live Demo about the most remarkable features of this release.

Technorati tags: IntelliJ IDEA, Eclipse, Migration, Coexistence, IntelliJ
image description