Community
Participate
Working Groups
20051214-0010 1. enable to warn abou unecessary NLS tags 2. In the following code, all //$NON-NLS-1$ are marked with warnings, but as soon you fix the problem ('int modifiers= ;' to 'int modifiers= 1;') they go away again. package p; public class Bar { private String constructSimpleTypeStub() { int modifiers= ; String type= ""; //$NON-NLS-1$ switch (modifiers) { case 1: type= "class "; //$NON-NLS-1$ break; case 2: type= "interface "; //$NON-NLS-1$ break; case 3: type= "enum "; //$NON-NLS-1$ break; case 4: type= "@interface "; //$NON-NLS-1$ break; } return buf.toString(); } }
I can disable to validation of nls tags in case of syntax errors.
But ideally we should filter out the nls tags related to the current methods and continue to report the other ones.
David, you might want to look at this case as part of the robust AST work.
*** This bug has been marked as a duplicate of 42253 ***
Verified for 3.2 M5 using build I20060215-0010.