1

Is there a way to change the line width for the java formatter for specific sections of code?

Something like @formatter:on/off, e.g. @formatter:width=200 ?

For reference: How to turn off the Eclipse code formatter for certain sections of Java code?.

Usually I have a need for this for constants with long initializers. Currently I turn the formatter off and do it manually, but mainly to only just use 1 line per constant. The rest of the automatic formatting would be ok.

Reto Höhener
  • 5,419
  • 4
  • 39
  • 79

0 Answers0