Project: JDT
Bug 34205 Wrap string produces incorrect code
Reported: 2003-03-08 14:07:27 | Status: verified fixed

Balance string is turned off, wrap string on. User is entering a list of string constants, e.g., public static final String[] KEYWORDS = new String[] { "a", "b", //... }; To make data entry go faster, user copies to clipboard the "continuation" of each line, e.g., the characters: ", " Now, user types, "c and pastes the continuation, expecting to see: "c", " Instead, the generated code is: "c"," + " " I can't think of a satisfactory explanation for this result; it seems to be a plain old bug. But the correct behavior would be to recognize that the leading " in the pasted text completes a string on the same line and the trailing " starts a new string on a new line, so no string is being continued and there is no need for a continuation.

Files changed in fix:
org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/text/java/JavaStringAutoIndentStrategy.java