Browse files

Adding readme on how to configure formatting using the Eclipse Code F…

…ormatter plugin
  • Loading branch information...
1 parent 2f73ee7 commit 3263347ee5db1eb0855f092e3259201320b43aaa @hferentschik hferentschik committed with bstansberry Jul 3, 2012
Showing with 22 additions and 0 deletions.
  1. +22 −0 ide-configs/idea/
@@ -0,0 +1,22 @@
+# Intellij Idea formatter configuration
+There is currently no [Idea]( specific code style file available which matches
+the Eclipse version which defines the reference format.
+The easiest way to still match the Eclipse format is to use the [Eclipse Code Formatter](
+plugin which allows you to execute the Eclipse formatter from within Idea. You will have to pick the right version of
+the plugin depending on the version of Idea you are using. For example at the time of writing the matching version
+for Idea 11.1 is Eclipse Code Formatter 2.2.3.
+Once installed you can configure the plugin to use the Eclipse formatting style under _eclipse/as7formatter.xml_.
+With plugin and configuration in place you can format java code using the default Idea _Reformat Code_ menu option or key binding.
+You also get an icon in the menu bar which allows you to toggle between Idea native and Eclipse formatting.
+It might be that you are running into the issue that the formatter [adds a single space in empty line comments]
+( This will fail the built time
+[checkstyle audit](
+The problem is caused by a [bug]( in the Eclipse formatter. The easiest
+workaround for now is to edit _as7formatter.xml_ and disable the comment formatting (getting the javadoc format right should
+be quite easy):
+ <setting id="org.eclipse.jdt.core.formatter.comment.format_javadoc_comments" value="false"/>

0 comments on commit 3263347

Please sign in to comment.