eclipseeclipse-formatter

Eclipse formatter split long String


Is there a way to tell Eclipse formatter that when a String is too long, it should split it with + to fit the maximum line width automatically?

For instance, if my max line width is 80, I'd like this:

String s = "This is a very very very very very very very very very very very very very very very very very very very long String";

to become something like this:

String s = "This is a very very very very very very very very very very very"
+ " very very very very very very very very long String";

Solution

  • No. This would mean changing your source code, not just white space.