<table width="100%"> <tr> <td width="33%" align="left"><a href="http://confluence.jetbrains.com/display/IntelliJIDEA/Configure+Keymap">Previous</a></td> <td width="33%" align="center"><a href="http://confluence.jetbrains.com/display/IntelliJIDEA/Working+in+Eclipse+Compatibility+Mode">Top</a></td> <td width="33%" align="right"><a href="http://confluence.jetbrains.com/display/IntelliJIDEA/FAQ+on+Migrating+to+IntelliJ+IDEA">Next</a></td> </table> |
A different set of coding styles may obviously create trouble in teams where not all members use the same IDE. Let's review a few strategies to share coding styles between IntelliJ IDEA and Eclipse.
Although through different user interfaces, Eclipse and IntelliJ IDEA offer nearly the same set of coding styles for you to configure. Configuration takes place from the
{span:class=shortcut}File → Settings{span} |
Of particular relevance are the code style settings available for the Java language. Settings are grouped in different categories in Eclipse and IntelliJ IDEA. However as the next two screenshots show, categories address nearly the same set of parameters.
Eclipse seems to have a few more tabs compared to IntelliJ, but IntelliJ fits more settings in each tab.
Both Eclipse and IntelliJ IDEA offer a preview of the currently selected code styles, at least those that impact directly on code writing.
Both Eclipse and IntelliJ IDEA let you save all settings to a file. A settings file can then be imported later into another instance of the IDE. Note, though, that Eclipse has a direct Export button to export code styles. In IntelliJ IDEA, instead, you export and import all IDE settings, including code style schemes. You select
{span:class=shortcut}File → Export Settings{span} |
To import a previously saved settings file you select
{span:class=shortcut}File → Import Settings{span} |
There are two approaches to import the Eclipse code styles in IntelliJ IDEA.
Because at the end of the day both IDE save current settings to a local XML file, a smart tool can read one file and convert it to another schema automatically to the extent that it is possible. This is precisely what the aforementioned plug-in does: it reads the settings of a given Eclipse project and imports those settings into the IntelliJ IDEA local file storing settings.
The aforementioned plug-in brings Eclipse settings into IntelliJ IDEA. In case of a team where some members use IntelliJ IDEA and some others use Eclipse, the easiest is bringing Eclipse settings into IntelliJ through the plug-in.
Any other approach would anyway require that all relevant settings are manually entered and kept synced in both IDEs. It is then up to each team to decide about which code style settings are relevant to keep synced.
<table width="100%"> <tr> <td width="33%" align="left"><a href="http://confluence.jetbrains.com/display/IntelliJIDEA/Configure+Keymap">Previous</a></td> <td width="33%" align="center"><a href="http://confluence.jetbrains.com/display/IntelliJIDEA/Working+in+Eclipse+Compatibility+Mode">Top</a></td> <td width="33%" align="right"><a href="http://confluence.jetbrains.com/display/IntelliJIDEA/FAQ+on+Migrating+to+IntelliJ+IDEA">Next</a></td></table> |