I'm working in an a team with mostly Eclipse users, and I recently switched to Intellij on the project. All's well for the most part, I love the many easy to use productivity features, but I find dealing with Code reformatting more painful than I would like.
I'd like to easily (i.e. without thinking about it) only format Java code when I commit (or when I save for that matter). I don't want to format any other file types (xml, html, etc) other than Java code, because we can't get Eclipse and Intellij to play nice when it comes to reformatting non-Java files exactly the same way. Reformatting files the same no matter who checks in is critical for file difference checking for code review and viewing history. So we have elected to not auto-reformat non-Java files, but rather just format the areas we are working on with informal standards.
In Eclipse, one can achieve this with the "Save Action" concept, which in their case, can allow you to reformat just Java files on Save. I don't see the equivalent feature in IDEA.
The closest thing I have found so far in IDEA is the ability to reformat during a check-in, but that doesn't appear to allow one to selectively say which types are reformatted. I haven't found any "auto-reformat on save" options either.
So, now my workaround commit process is:
In the changes view, select only the Java files, then enable the "organize imports" and "reformat code" check then hit commit. Then I select the rest of the files (the non-java files) , deselect "organize imports" (which would alter jsp files), and "reformat code" and then commit those files. Non-only is this a multi step process where there could just be one, but it's easy to accidentally commit with the settings on or off and then suddenly be the bad code citizen who reformatted some non-java code, or didn't format some Java code.
Perhaps if I could completely disable all other types of code formatting other than Java, I could commit, but then I would lose the ability to code format "selected text" of jsp's etc to manually format just code that I am changing.