6

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";
carcaret
  • 3,238
  • 2
  • 19
  • 37
  • have a look at this http://stackoverflow.com/a/5398814/2551236 – Vihar Sep 14 '15 at 09:40
  • @Vihar Yeah, I know that (actually my line width is 100), but you are just avoiding the problem. What if I have a 102 length line, or 183 in the case of that post? – carcaret Sep 14 '15 at 10:09

1 Answers1

1

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

nitind
  • 19,089
  • 4
  • 34
  • 43