In my formatting of java code in my profile I have (in fact, this is the default eclipse), all the options on the tab “brackets” are set to “one line”. However, when I have a code like this:
interface TestI { }
and I call the formatter (key binding, context menu, whatever), all I get is
interface TestI { }
it does not move the opening curly braces to the same line, the same applies to methods, control operators, etc., when I manually change it to
interface TestI { }
then formats it:
interface TestI { }
Thus, he generally respects the format that I did manually, but only formats the spaces between curly braces and other elements.
Other formatting options in my text file work as directed. I use the latest version of Eclipse Indigo 3.7.1, I had the same thing with 3.7, and my friend tried it with the release of 3.5, so it seems to me that this is special, but again, why are these “brackets” in general, if I cannot reformat the code using this rule ...
Hope I have something missing and you make me fall stupid and the problem goes away because I have a class to clean up and I don't want to do it manually. :)
UPDATE: when I set the rule not on the “same line”, but on the “next line”, the formatting works as expected, it forces the rule no matter how I wrote the code, as soon as I get it back to “in that the same line, the formatter does not force this rule.