Latest version of the JDT Java formatter for Eclipse Mars
The new java formatter is one of the new features introduced with the Mars version of Eclipse IDE.
Like with any new piece of software, the version released with the Mars release contains some bugs.
Lots of them have already been fixed (on the master branch of the JDT project).
Since Mars, it is possible to select the Formatter implementation you like to use.
The goal of this project is to build and distribute the latest version of the Java formatter provided by the JDT (master branch) in order to use it now in your Mars IDE.
Open the Formatter preference page (Java Code Style) and select Latest formatter in the Formatter implementation combo box.
The repository is built with maven and tycho. The script produces a p2 update site that can be used to install the plugin in your Eclipse IDE. Just run:
mvn clean install
The result can be found here:
/com.bsiag.eclipse.jdt.java.formatter-repository/target/repository-*.zip
You can use the default ant task in this build.xml to do it.
-
Checkout the eclipse.jdt.core repository.
-
Set the path to this repository in the
jdt.git.repoproperty. -
Run the
defaultant task.
The task moves the source file to another package: com.bsiag.eclipse.jdt.java.formatter
For this project use the issue tracker on GitHub.
For the formatter itself, check the bugs filed in the JDT project (they often use formatter in the bug title):

