How to make Eclipse break String literal with + operator in next line?

Viewed 6577

(Edited) NOTE: this question is NOT about how Eclipse's code formatter wrap long String literals. It is the behavior of MANUALLY breaking/wrapping String literal


The default behavior when I break a String literal by hitting enter inside the literal, is Eclipse will append " + at the place I hit enter, and start the rest of my line in next line, with " prefixed.

                            // v ENTER HERE
String longString = "abcdefghij|klmno";

String longString = "abcdefghij" +
        "klmno";

However, normal coding style practice suggests line wrap before operator. Is there any way that I can tell Eclipse to break my String like this?

String longString = "abcdefhij"
        + "klmno";
2 Answers
Related