Which editor are you using? I use idea and it handles code style properly with little extra manual effort.