How to create an Intellij and Eclipse compatible code style and code formatting configuration (for java code)?

user141634 picture user141634 · Apr 9, 2010 · Viewed 15.1k times · Source

Few weeks ago I tried Intellij and I found it really awesome. Now, at my project there are two programmers (including me) using Intellij and few other programmers who are going to keep using Eclipse. Since this project is already very large and it's going to grow a lot, we need to use compatible Code Style and Code Formatting between Intellij and Eclipse. We do not want to have problems when one user edits some file and reformats it before saving. With Eclipse "alone" we used to have some exported configuration, and before anybody starts to work, the first step is just to import this configuration. We already tried to use External Code Formatter, but it didn't work on Intellij 9.

So, I have a bunch of questions here:

  1. Is there any way to import eclipse formatting configuration on Intellij 9?
  2. Anybody could share their experience managing this kind of situation? Do you guys have any other suggestion to manage this situation?

Answer

Aliaksandr Autayeu picture Aliaksandr Autayeu · Nov 19, 2011

There is an updated plugin for IDEA, called Eclipse Code Formatter: http://plugins.intellij.net/plugin/?idea&id=6546