Community
Participate
Working Groups
I noticed that in certain circumstances (not always) the NON-NLS comment is not kept on the same line. Here is the sample on which it happens for me: if (JavaModelManager.CP_RESOLVE_VERBOSE) { System.out.println("CPContainer SET - setting container: [" //$NON-NLS-1$ + containerPath + "] for projects: {" //$NON-NLS-1$ + (org.eclipse.jdt.internal.compiler.util.Util.toString(affectedProjects, new org.eclipse.jdt.internal.compiler.util.Util.Displayable() { public String displayString(Object o) { return ((IJavaProject) o).getElementName(); } })) + "} with values: " //$NON-NLS-1$ + (org.eclipse.jdt.internal.compiler.util.Util.toString(respectiveContainers, new org.eclipse.jdt.internal.compiler.util.Util.Displayable() { public String displayString(Object o) { return ((IClasspathContainer) o).getDescription(); } }))); } then after formatting, I got: if (JavaModelManager.CP_RESOLVE_VERBOSE) { System.out.println("CPContainer SET - setting container: [" //$NON-NLS-1$ + containerPath + "] for projects: {" //$NON-NLS-1$ + (org.eclipse.jdt.internal.compiler.util.Util.toString(affectedProjects, new org.eclipse.jdt.internal.compiler.util.Util.Displayable() { public String displayString(Object o) { return ((IJavaProject) o).getElementName(); } })) + "} with values: " //$NON-NLS-1$ + (org.eclipse.jdt.internal.compiler.util.Util.toString(respectiveContainers, new org.eclipse.jdt.internal.compiler.util.Util.Displayable() { public String displayString(Object o) { return ((IClasspathContainer) o).getDescription(); } }))); } It's a little bit tricky to see with these line breaks put by bugzilla, but I've already talked about this with Olivier and sent him precise reference...
When the code is badly indented bu bugzilla, please attach your test case as a plain text file.
Created attachment 6403 [details] Bug sample a little bit more readable...
Fixed and released in HEAD. Regression test added.
Verified for 3.0M6
*** Bug 56335 has been marked as a duplicate of this bug. ***
see comments dup bug 56335
*** This bug has been marked as a duplicate of 50989 ***