One of our developers decided he\'d dictate to other developers how people should format their source code.
Myself, I\'m a firm believer that Allman style indentation is
My advice: just learn to tolerate ugliness. Unless your "compare with history in SCM" function is really good it's all too easy to get spurious differences when formatting.
Well, it seems like the age-old debate is back. Unfortunately, Eclipse JDT UI does not support applying different code formatters yet.
There's bug no 45423, which is intended to resolve this. As long as that bug remains unfixed, the best workaround would be applying a formatter in a commit hook as each project is associated with it's own formatter; you cannot even choose a different formatter to apply on the file save action (Preferences -> Java -> Editor -> Save Actions). Honestly, I don't think shortcut keys would even work.
Also, it might be worth investigating the use of the Questoid Code Formatter, which appears to be the closest (or only) plugin to support your need. I haven't attempted using it; I've only read the description from Eclipse Marketplace.
With all due respect to Mike, if you can't beat them, join them. Indeed, learn to tolerate ugliness, as djna has advised. I give this advice after having spent an entire career quietly fighting this battle.
I believe that Allman-style coding is better in several meaningful, significant ways, starting with code alignment and visibly clarifying blocks of code. Allman-style people tend to be those that favor/tolerate more use of vertical whitespace to help clarify which things go together and when a new step or phase has begun.
From my own anecdotal research, the main advantage to K&R most often cited, other than homage to earlier precedent, is that K&R is a style favored by those that like to see more code on one screen. Yes, it is true, that's the main reason. Code density. I thought this issue would have died its final death once we got past the age of 80 x 25 character console screens in the early 90's, but alas, but it seems not to have mattered. So for those that like code density so they can see more code on one screen at a time, we suffer with millions of lines of K&R style code. * Sigh *
Bottom line: You can't win a religious war. It's not worth the effort. When in Rome, do as the Romans do and just learn to live with what is. This is an issue that strikes us psychologically, because it is kind of about Power and Control. But we all understand that some things we simply don't have legitimate power or control over, so let those things be and learn to adapt. That is truly the right way to approach your software development career.