There's also at least one external plug-in that you can inject into Eclipse. It's named jalopy. It is an extremely flexible java formatter with all sorts of options. Back when the built-in Eclipse code formatter was rather crude and stupid, I used it extensively.
Jalopy is available for multiple environments. I've used it from IntelliJ and from the command line as well as inside Eclipse.
An IDE is no substitute for an Intelligent Developer.