Community
Participate
Working Groups
We discovered today that when the Eclipse Java Code Style Formatter is configured as follows: Braces -> ALL set to "Same line" Line Wrapping -> CHECKED "Never join already wrapped lines" Then the formatter will leave braces on new lines. Example: if (a == b) { doStuff(); } Running the above configured formatter would expect the below output based on the braces configuration: if (a == b) { doStuff(); } But instead, the formatter does nothing. This is very unfortunate because we have inherited a large code base with braces on new lines, and we'd like to adopt our own code style of braces on the same line. However, we usually have all line wrapping disabled so that we can manually define correct line wrapping based on context. This bug prevents us from auto-formatting the braces without ruining the wrapped lines.
Good news: this is fixed in Eclipse 4.5. So you can wait for the release next week or try out the latest release candidate. BTW, this duplicates bug 354626.
*** This bug has been marked as a duplicate of bug 354626 ***