views:

137

answers:

3

So assuming that in our work environment we've decided that the One True Faith forbids this:

if (something) 
    doSomething();

And instead we want:

if (something) {
    doSomething();
}

Is there a tool that will do that automagically? Awesomest would be to have eclipse just do it, but since we're really just recovering from one ex-employee that thought he was too pretty for coding conventions, a less-friendly tool that would do it right just once would suffice.

+1  A: 
Andrew Coleson
+1  A: 

Ah, it's actually not a formatter, but a "Clean Up": Preferences -> Java -> Code Style -> Clean Up

And then to execute. Source -> Clean Up As opposed to Source -> Format

Brian Deacon
A: 

I believe that GreatCode can do this for you (along with a ton of other options)

Luciano