score:1

work flow:

  1. in windows > preferences > java > editors save actions deselect formatting on save.
  2. check out code.
  3. clean up your code(right click on project go to source > clean up. note this works on project level but not on working set, so you have to do it on each and every project) with your formatter(b) profile enabled.
  4. in windows > preferences > java > editors save actions select formatting on save and start working.
  5. same as step 1.
  6. same as 3 but with formatter profile a.
  7. commit the code.

these steps can be automated with ant/maven script(?) or by developing your own eclipse plug-in.

on sync comparator will not ignore style change. imho there is no escape. clean up before sync is only the go.

in git scm there are some commit and checkout hooks but i haven't explored on this.


Related Query

More Query from same tag