How to turn off the Eclipse code formatter for certain sections of Java code?

Eclipse 3.6 allows you to turn off formatting by placing a special comment, like // @formatter:off … // @formatter:on The on/off features have to be turned “on” in Eclipse preferences: Java > Code Style > Formatter. Click on Edit, Off/On Tags, enable Enable Off/On tags. It’s also possible to change the magic strings in the … Read more