[ACCEPTED]-Checkstyle and Eclipse; Java string continuation-checkstyle

Accepted answer
Score: 14

Probably the operator wrap check is responsible for that 19 "+ should be on a new line" message.
It 18 is found in the "Whitespace" section.

if 17 there is any way to get Eclipse to put the 16 "+" symbol on the new line when 15 it splits a string for you. Is there an 14 easy way ?

The only way I know is to format the 13 code which has just been produced:
when 12 you hit "return" in the middle of a 11 String, it does out the '+' at the end of the first 10 line.
But you format the code, it does put 9 back the '+' at the beginning of the second.

Since 8 you can only format the section in which you are 7 (like the current method you are editing), that 6 tip does not mean you will format the all 5 class anytime you want to put the '+' at 4 its right place. Only the current block 3 of code.
(it the the command "Format 2 Element", and it has by default no 1 key shortcut, so you can assign one)

More Related questions