Project: JDT
Bug 238828 [clean up] Add 'this' qualifier removes necessary NON-NLS tag
Reported: 2008-06-27 13:26:09 | Status: resolved fixed

Using I20080624-0800. Consider the following test case: public class X { private String javaProjectName; private String buildNumber; /** * Returns a string representation of the receiver. */ public String toString() { return "State for " + javaProjectName //$NON-NLS-1$ + " (#" + buildNumber //$NON-NLS-1$ + ")"; //$NON-NLS-1$ } } I perform a code clean-up to add 'this' qualifier and here's the output I get: public class X { private String javaProjectName; private String buildNumber; /** * Returns a string representation of the receiver. */ public String toString() { return "State for " + this.javaProjectName + " (#" + this.buildNumber + ")"; //$NON-NLS-1$ } } Note that the two NON-NLS tags located behind the modified fields have been wrongly removed...

Files changed in fix:
org.eclipse.jdt.ui.tests/ui/org/eclipse/jdt/ui/tests/quickfix/CleanUpTest.java org.eclipse.jdt.ui/core extension/org/eclipse/jdt/internal/corext/fix/CodeStyleFix.java