(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";
In 4.3 you can control this setting with the Wrap before operator checkbox for Binary expressions.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With