### Eclipse Workspace Patch 1.0 #P org.eclipse.jdt.core.tests.model Index: src/org/eclipse/jdt/core/tests/dom/ASTConverter15Test.java =================================================================== RCS file: /cvsroot/eclipse/org.eclipse.jdt.core.tests.model/src/org/eclipse/jdt/core/tests/dom/ASTConverter15Test.java,v retrieving revision 1.286 diff -u -r1.286 ASTConverter15Test.java --- src/org/eclipse/jdt/core/tests/dom/ASTConverter15Test.java 26 May 2009 16:05:07 -0000 1.286 +++ src/org/eclipse/jdt/core/tests/dom/ASTConverter15Test.java 30 Jul 2009 17:20:00 -0000 @@ -8113,7 +8113,7 @@ false); assertEquals("Not a compilation unit", ASTNode.COMPILATION_UNIT, node.getNodeType()); CompilationUnit unit = (CompilationUnit) node; - String expectedError = "x cannot be resolved"; + String expectedError = "x cannot be resolved to a variable"; assertProblemsSize(unit, 1, expectedError); node = getASTNode(unit, 0, 1, 0); assertEquals("Not a expression statement", ASTNode.EXPRESSION_STATEMENT, node.getNodeType()); @@ -8851,7 +8851,7 @@ assertEquals("Not a compilation unit", ASTNode.COMPILATION_UNIT, node.getNodeType()); CompilationUnit unit = (CompilationUnit) node; String expectedErrors = "Constructor call must be the first statement in a constructor\n" + - "zork cannot be resolved\n" + + "zork cannot be resolved to a variable\n" + "Constructor call must be the first statement in a constructor\n" + "Zork cannot be resolved to a type\n" + "Zork cannot be resolved to a type\n" + @@ -8926,8 +8926,8 @@ assertEquals("Not a compilation unit", ASTNode.COMPILATION_UNIT, node.getNodeType()); CompilationUnit unit = (CompilationUnit) node; String expectedErrors = - "x cannot be resolved\n" + - "x cannot be resolved"; + "x cannot be resolved to a variable\n" + + "x cannot be resolved to a variable"; assertProblemsSize(unit, 2, expectedErrors); node = getASTNode(unit, 0, 1, 0); assertEquals("Not a expression statement", ASTNode.EXPRESSION_STATEMENT, node.getNodeType()); @@ -8973,8 +8973,8 @@ assertEquals("Not a compilation unit", ASTNode.COMPILATION_UNIT, node.getNodeType()); CompilationUnit unit = (CompilationUnit) node; String expectedErrors = - "x cannot be resolved\n" + - "x cannot be resolved"; + "x cannot be resolved to a variable\n" + + "x cannot be resolved to a variable"; assertProblemsSize(unit, 2, expectedErrors); node = getASTNode(unit, 0, 1, 0); assertEquals("Not a expression statement", ASTNode.EXPRESSION_STATEMENT, node.getNodeType()); @@ -9021,8 +9021,8 @@ assertEquals("Not a compilation unit", ASTNode.COMPILATION_UNIT, node.getNodeType()); CompilationUnit unit = (CompilationUnit) node; String expectedErrors = - "x cannot be resolved\n" + - "x cannot be resolved"; + "x cannot be resolved to a variable\n" + + "x cannot be resolved to a variable"; assertProblemsSize(unit, 2, expectedErrors); node = getASTNode(unit, 0, 1, 0); assertEquals("Not a expression statement", ASTNode.EXPRESSION_STATEMENT, node.getNodeType()); @@ -9070,8 +9070,8 @@ assertEquals("Not a compilation unit", ASTNode.COMPILATION_UNIT, node.getNodeType()); CompilationUnit unit = (CompilationUnit) node; String expectedErrors = - "x cannot be resolved\n" + - "x cannot be resolved"; + "x cannot be resolved to a variable\n" + + "x cannot be resolved to a variable"; assertProblemsSize(unit, 2, expectedErrors); node = getASTNode(unit, 0, 1, 0); assertEquals("Not a expression statement", ASTNode.EXPRESSION_STATEMENT, node.getNodeType()); @@ -9121,8 +9121,8 @@ assertEquals("Not a compilation unit", ASTNode.COMPILATION_UNIT, node.getNodeType()); CompilationUnit unit = (CompilationUnit) node; String expectedErrors = - "x cannot be resolved\n" + - "x cannot be resolved"; + "x cannot be resolved to a variable\n" + + "x cannot be resolved to a variable"; assertProblemsSize(unit, 2, expectedErrors); node = getASTNode(unit, 1, 0, 0); assertEquals("Not a super constructor invocation", ASTNode.SUPER_CONSTRUCTOR_INVOCATION, node.getNodeType()); @@ -9158,7 +9158,7 @@ false); assertEquals("Not a compilation unit", ASTNode.COMPILATION_UNIT, node.getNodeType()); CompilationUnit unit = (CompilationUnit) node; - String expectedError = "x cannot be resolved"; + String expectedError = "x cannot be resolved to a variable"; assertProblemsSize(unit, 1, expectedError); node = getASTNode(unit, 0, 1, 0); assertEquals("Not a expression statement", ASTNode.EXPRESSION_STATEMENT, node.getNodeType()); Index: src/org/eclipse/jdt/core/tests/dom/ASTConverterTestAST3_2.java =================================================================== RCS file: /cvsroot/eclipse/org.eclipse.jdt.core.tests.model/src/org/eclipse/jdt/core/tests/dom/ASTConverterTestAST3_2.java,v retrieving revision 1.165 diff -u -r1.165 ASTConverterTestAST3_2.java --- src/org/eclipse/jdt/core/tests/dom/ASTConverterTestAST3_2.java 25 Jun 2009 09:27:05 -0000 1.165 +++ src/org/eclipse/jdt/core/tests/dom/ASTConverterTestAST3_2.java 30 Jul 2009 17:20:01 -0000 @@ -7013,12 +7013,12 @@ assertEquals("Not a compilation unit", ASTNode.COMPILATION_UNIT, node.getNodeType()); CompilationUnit unit = (CompilationUnit) node; String expectedOutput = - "first cannot be resolved\n" + - "second cannot be resolved\n" + - "first cannot be resolved\n" + - "second cannot be resolved\n" + - "first cannot be resolved\n" + - "second cannot be resolved"; + "first cannot be resolved to a variable\n" + + "second cannot be resolved to a variable\n" + + "first cannot be resolved to a variable\n" + + "second cannot be resolved to a variable\n" + + "first cannot be resolved to a variable\n" + + "second cannot be resolved to a variable"; assertProblemsSize(unit, 6, expectedOutput); unit.accept(new ASTVisitor() { public boolean visit(ConstructorInvocation constructorInvocation) { @@ -7732,7 +7732,7 @@ assertProblemsSize( unit, 2, - "Object.equ cannot be resolved\n" + + "Object.equ cannot be resolved to a variable\n" + "Syntax error, insert \"AssignmentOperator Expression\" to complete Expression"); node = getASTNode(unit, 0, 0); assertEquals("Not a field declaration statement", ASTNode.INITIALIZER, node.getNodeType()); #P org.eclipse.jdt.core.tests.compiler Index: src/org/eclipse/jdt/core/tests/eval/NegativeCodeSnippetTest.java =================================================================== RCS file: /cvsroot/eclipse/org.eclipse.jdt.core.tests.compiler/src/org/eclipse/jdt/core/tests/eval/NegativeCodeSnippetTest.java,v retrieving revision 1.22 diff -u -r1.22 NegativeCodeSnippetTest.java --- src/org/eclipse/jdt/core/tests/eval/NegativeCodeSnippetTest.java 28 Apr 2009 17:17:55 -0000 1.22 +++ src/org/eclipse/jdt/core/tests/eval/NegativeCodeSnippetTest.java 30 Jul 2009 17:20:04 -0000 @@ -308,7 +308,7 @@ // evaluate same code snippet evaluateWithExpectedProblem( codeSnippet, - newProblem(IProblem.UndefinedName, Error, 0, 0, 1)); // i cannot be resolved + newProblem(IProblem.UnresolvedVariable, Error, 0, 0, 1)); // i cannot be resolved to a variable } finally { // Clean up if (var != null) { Index: src/org/eclipse/jdt/core/tests/eval/NegativeVariableTest.java =================================================================== RCS file: /cvsroot/eclipse/org.eclipse.jdt.core.tests.compiler/src/org/eclipse/jdt/core/tests/eval/NegativeVariableTest.java,v retrieving revision 1.12 diff -u -r1.12 NegativeVariableTest.java --- src/org/eclipse/jdt/core/tests/eval/NegativeVariableTest.java 28 Apr 2009 17:17:54 -0000 1.12 +++ src/org/eclipse/jdt/core/tests/eval/NegativeVariableTest.java 30 Jul 2009 17:20:04 -0000 @@ -45,7 +45,7 @@ "(j + 2)"})); evaluateWithExpectedProblem( var, - newProblem(IProblem.UndefinedName, Error, 11, 11, 2)); // j cannot be resolved + newProblem(IProblem.UnresolvedVariable, Error, 11, 11, 2)); // j cannot be resolved to a variable } finally { if (var != null) { this.context.deleteVariable(var); Index: src/org/eclipse/jdt/core/tests/eval/DebugEvaluationTest.java =================================================================== RCS file: /cvsroot/eclipse/org.eclipse.jdt.core.tests.compiler/src/org/eclipse/jdt/core/tests/eval/DebugEvaluationTest.java,v retrieving revision 1.41 diff -u -r1.41 DebugEvaluationTest.java --- src/org/eclipse/jdt/core/tests/eval/DebugEvaluationTest.java 26 Sep 2008 08:33:57 -0000 1.41 +++ src/org/eclipse/jdt/core/tests/eval/DebugEvaluationTest.java 30 Jul 2009 17:20:04 -0000 @@ -2695,7 +2695,7 @@ } } assertEquals("Unexpected errors", - "zork cannot be resolved|", + "zork cannot be resolved to a variable|", buffer == null ? "none" : buffer.toString()); } finally { removeTempClass("ANegative003"); Index: src/org/eclipse/jdt/core/tests/compiler/regression/AutoBoxingTest.java =================================================================== RCS file: /cvsroot/eclipse/org.eclipse.jdt.core.tests.compiler/src/org/eclipse/jdt/core/tests/compiler/regression/AutoBoxingTest.java,v retrieving revision 1.123 diff -u -r1.123 AutoBoxingTest.java --- src/org/eclipse/jdt/core/tests/compiler/regression/AutoBoxingTest.java 28 Apr 2009 17:17:33 -0000 1.123 +++ src/org/eclipse/jdt/core/tests/compiler/regression/AutoBoxingTest.java 30 Jul 2009 17:20:02 -0000 @@ -2772,7 +2772,7 @@ "3. ERROR in X.java (at line 8)\n" + " System.out.println(zork);\n" + " ^^^^\n" + - "zork cannot be resolved\n" + + "zork cannot be resolved to a variable\n" + "----------\n" ); } Index: src/org/eclipse/jdt/core/tests/compiler/regression/CompilerInvocationTests.java =================================================================== RCS file: /cvsroot/eclipse/org.eclipse.jdt.core.tests.compiler/src/org/eclipse/jdt/core/tests/compiler/regression/CompilerInvocationTests.java,v retrieving revision 1.25 diff -u -r1.25 CompilerInvocationTests.java --- src/org/eclipse/jdt/core/tests/compiler/regression/CompilerInvocationTests.java 24 Nov 2008 13:14:04 -0000 1.25 +++ src/org/eclipse/jdt/core/tests/compiler/regression/CompilerInvocationTests.java 30 Jul 2009 17:20:02 -0000 @@ -370,6 +370,7 @@ expectedProblemAttributes.put("FinalFieldAssignment", new ProblemAttributes(CategorizedProblem.CAT_MEMBER)); expectedProblemAttributes.put("UninitializedBlankFinalField", new ProblemAttributes(CategorizedProblem.CAT_MEMBER)); expectedProblemAttributes.put("DuplicateBlankFinalFieldInitialization", new ProblemAttributes(CategorizedProblem.CAT_MEMBER)); + expectedProblemAttributes.put("UnresolvedVariable", new ProblemAttributes(CategorizedProblem.CAT_MEMBER)); expectedProblemAttributes.put("LocalVariableHidingLocalVariable", new ProblemAttributes(CategorizedProblem.CAT_NAME_SHADOWING_CONFLICT)); expectedProblemAttributes.put("LocalVariableHidingField", new ProblemAttributes(CategorizedProblem.CAT_NAME_SHADOWING_CONFLICT)); expectedProblemAttributes.put("FieldHidingLocalVariable", new ProblemAttributes(CategorizedProblem.CAT_NAME_SHADOWING_CONFLICT)); @@ -998,6 +999,7 @@ expectedProblemAttributes.put("FinalFieldAssignment", SKIP); expectedProblemAttributes.put("UninitializedBlankFinalField", SKIP); expectedProblemAttributes.put("DuplicateBlankFinalFieldInitialization", SKIP); + expectedProblemAttributes.put("UnresolvedVariable", SKIP); expectedProblemAttributes.put("LocalVariableHidingLocalVariable", new ProblemAttributes(JavaCore.COMPILER_PB_LOCAL_VARIABLE_HIDING)); expectedProblemAttributes.put("LocalVariableHidingField", new ProblemAttributes(JavaCore.COMPILER_PB_LOCAL_VARIABLE_HIDING)); expectedProblemAttributes.put("FieldHidingLocalVariable", new ProblemAttributes(JavaCore.COMPILER_PB_FIELD_HIDING)); Index: src/org/eclipse/jdt/core/tests/compiler/regression/Compliance_1_4.java =================================================================== RCS file: /cvsroot/eclipse/org.eclipse.jdt.core.tests.compiler/src/org/eclipse/jdt/core/tests/compiler/regression/Compliance_1_4.java,v retrieving revision 1.104 diff -u -r1.104 Compliance_1_4.java --- src/org/eclipse/jdt/core/tests/compiler/regression/Compliance_1_4.java 25 Nov 2008 19:53:54 -0000 1.104 +++ src/org/eclipse/jdt/core/tests/compiler/regression/Compliance_1_4.java 30 Jul 2009 17:20:02 -0000 @@ -2790,7 +2790,7 @@ "2. ERROR in X.java (at line 5)\n" + " System.out.print(full+\" \"+p.S.success);\n" + " ^^^^\n" + - "full cannot be resolved\n" + + "full cannot be resolved to a variable\n" + "----------\n" ); } @@ -2825,7 +2825,7 @@ "3. ERROR in X.java (at line 5)\n" + " System.out.print(full+\" \"+S.success);\n" + " ^^^^\n" + - "full cannot be resolved\n" + + "full cannot be resolved to a variable\n" + "----------\n" ); } Index: src/org/eclipse/jdt/core/tests/compiler/regression/Compliance_1_5.java =================================================================== RCS file: /cvsroot/eclipse/org.eclipse.jdt.core.tests.compiler/src/org/eclipse/jdt/core/tests/compiler/regression/Compliance_1_5.java,v retrieving revision 1.80 diff -u -r1.80 Compliance_1_5.java --- src/org/eclipse/jdt/core/tests/compiler/regression/Compliance_1_5.java 25 Nov 2008 19:53:54 -0000 1.80 +++ src/org/eclipse/jdt/core/tests/compiler/regression/Compliance_1_5.java 30 Jul 2009 17:20:02 -0000 @@ -2894,7 +2894,7 @@ "2. ERROR in X.java (at line 5)\n" + " System.out.print(full+\" \"+p.S.success);\n" + " ^^^^\n" + - "full cannot be resolved\n" + + "full cannot be resolved to a variable\n" + "----------\n" ); } @@ -2924,7 +2924,7 @@ "2. ERROR in X.java (at line 5)\n" + " System.out.print(full+\" \"+S.success);\n" + " ^^^^\n" + - "full cannot be resolved\n" + + "full cannot be resolved to a variable\n" + "----------\n" ); } Index: src/org/eclipse/jdt/core/tests/compiler/regression/ArrayTest.java =================================================================== RCS file: /cvsroot/eclipse/org.eclipse.jdt.core.tests.compiler/src/org/eclipse/jdt/core/tests/compiler/regression/ArrayTest.java,v retrieving revision 1.26 diff -u -r1.26 ArrayTest.java --- src/org/eclipse/jdt/core/tests/compiler/regression/ArrayTest.java 17 Sep 2008 09:07:13 -0000 1.26 +++ src/org/eclipse/jdt/core/tests/compiler/regression/ArrayTest.java 30 Jul 2009 17:20:01 -0000 @@ -371,27 +371,27 @@ "1. ERROR in X.java (at line 3)\n" + " System.out.println(argument + argument);\n" + " ^^^^^^^^\n" + - "argument cannot be resolved\n" + + "argument cannot be resolved to a variable\n" + "----------\n" + "2. ERROR in X.java (at line 3)\n" + " System.out.println(argument + argument);\n" + " ^^^^^^^^\n" + - "argument cannot be resolved\n" + + "argument cannot be resolved to a variable\n" + "----------\n" + "3. ERROR in X.java (at line 4)\n" + " return new String[] { argument + argument, argument/*no problem*/ };\n" + " ^^^^^^^^\n" + - "argument cannot be resolved\n" + + "argument cannot be resolved to a variable\n" + "----------\n" + "4. ERROR in X.java (at line 4)\n" + " return new String[] { argument + argument, argument/*no problem*/ };\n" + " ^^^^^^^^\n" + - "argument cannot be resolved\n" + + "argument cannot be resolved to a variable\n" + "----------\n" + "5. ERROR in X.java (at line 4)\n" + " return new String[] { argument + argument, argument/*no problem*/ };\n" + " ^^^^^^^^\n" + - "argument cannot be resolved\n" + + "argument cannot be resolved to a variable\n" + "----------\n"); } //https://bugs.eclipse.org/bugs/show_bug.cgi?id=247307 Index: src/org/eclipse/jdt/core/tests/compiler/regression/AssertionTest.java =================================================================== RCS file: /cvsroot/eclipse/org.eclipse.jdt.core.tests.compiler/src/org/eclipse/jdt/core/tests/compiler/regression/AssertionTest.java,v retrieving revision 1.22 diff -u -r1.22 AssertionTest.java --- src/org/eclipse/jdt/core/tests/compiler/regression/AssertionTest.java 28 Apr 2009 17:17:36 -0000 1.22 +++ src/org/eclipse/jdt/core/tests/compiler/regression/AssertionTest.java 30 Jul 2009 17:20:01 -0000 @@ -142,7 +142,7 @@ "1. ERROR in A4.java (at line 4)\n" + " assert false : unbound; \n" + " ^^^^^^^\n" + - "unbound cannot be resolved\n" + + "unbound cannot be resolved to a variable\n" + "----------\n"); } public void test007() { Index: src/org/eclipse/jdt/core/tests/compiler/regression/AssignmentTest.java =================================================================== RCS file: /cvsroot/eclipse/org.eclipse.jdt.core.tests.compiler/src/org/eclipse/jdt/core/tests/compiler/regression/AssignmentTest.java,v retrieving revision 1.56 diff -u -r1.56 AssignmentTest.java --- src/org/eclipse/jdt/core/tests/compiler/regression/AssignmentTest.java 22 Jul 2009 17:56:53 -0000 1.56 +++ src/org/eclipse/jdt/core/tests/compiler/regression/AssignmentTest.java 30 Jul 2009 17:20:01 -0000 @@ -98,17 +98,17 @@ "1. ERROR in X.java (at line 6)\n" + " zork = zork; \n" + " ^^^^\n" + - "zork cannot be resolved\n" + + "zork cannot be resolved to a variable\n" + "----------\n" + "2. ERROR in X.java (at line 6)\n" + " zork = zork; \n" + " ^^^^\n" + - "zork cannot be resolved\n" + + "zork cannot be resolved to a variable\n" + "----------\n" + "3. ERROR in X.java (at line 7)\n" + " arg = zork; \n" + " ^^^^\n" + - "zork cannot be resolved\n" + + "zork cannot be resolved to a variable\n" + "----------\n" + "4. ERROR in X.java (at line 9)\n" + " arg = arg; // noop \n" + Index: src/org/eclipse/jdt/core/tests/compiler/regression/StaticImportTest.java =================================================================== RCS file: /cvsroot/eclipse/org.eclipse.jdt.core.tests.compiler/src/org/eclipse/jdt/core/tests/compiler/regression/StaticImportTest.java,v retrieving revision 1.73 diff -u -r1.73 StaticImportTest.java --- src/org/eclipse/jdt/core/tests/compiler/regression/StaticImportTest.java 25 Nov 2008 12:27:18 -0000 1.73 +++ src/org/eclipse/jdt/core/tests/compiler/regression/StaticImportTest.java 30 Jul 2009 17:20:04 -0000 @@ -193,12 +193,12 @@ "4. ERROR in p\\X.java (at line 7)\n" + " int y = Yint;\n" + " ^^^^\n" + - "Yint cannot be resolved\n" + + "Yint cannot be resolved to a variable\n" + "----------\n" + "5. ERROR in p\\X.java (at line 8)\n" + " int z = Zint;\n" + " ^^^^\n" + - "Zint cannot be resolved\n" + + "Zint cannot be resolved to a variable\n" + "----------\n" + "6. ERROR in p\\X.java (at line 9)\n" + " void m1(YMember m) {}\n" + @@ -265,7 +265,7 @@ "5. ERROR in p\\X.java (at line 8)\n" + " int z = Zint;\n" + " ^^^^\n" + - "Zint cannot be resolved\n" + + "Zint cannot be resolved to a variable\n" + "----------\n" + "6. ERROR in p\\X.java (at line 9)\n" + " void m1(YMember m) {}\n" + @@ -1106,7 +1106,7 @@ "1. ERROR in PointRadius.java (at line 7)\n" + " radius = sqrt(pondArea / Math.PI);\n" + " ^^^^^^^^\n" + - "pondArea cannot be resolved\n" + + "pondArea cannot be resolved to a variable\n" + "----------\n"); } @@ -1369,7 +1369,7 @@ "3. ERROR in X.java (at line 7)\n" + " static int n = CONSTANT_B;\n" + " ^^^^^^^^^^\n" + - "CONSTANT_B cannot be resolved\n" + + "CONSTANT_B cannot be resolved to a variable\n" + "----------\n"); } //https://bugs.eclipse.org/bugs/show_bug.cgi?id=126564 - variation @@ -2513,7 +2513,7 @@ "2. ERROR in test\\Outer.java (at line 4)\n" + " int i = VALUE;\n" + " ^^^^^\n" + - "VALUE cannot be resolved\n" + + "VALUE cannot be resolved to a variable\n" + "----------\n"); } //https://bugs.eclipse.org/bugs/show_bug.cgi?id=256375 - variation Index: src/org/eclipse/jdt/core/tests/compiler/regression/BatchCompilerTest.java =================================================================== RCS file: /cvsroot/eclipse/org.eclipse.jdt.core.tests.compiler/src/org/eclipse/jdt/core/tests/compiler/regression/BatchCompilerTest.java,v retrieving revision 1.189 diff -u -r1.189 BatchCompilerTest.java --- src/org/eclipse/jdt/core/tests/compiler/regression/BatchCompilerTest.java 30 Jun 2009 14:19:59 -0000 1.189 +++ src/org/eclipse/jdt/core/tests/compiler/regression/BatchCompilerTest.java 30 Jul 2009 17:20:02 -0000 @@ -9185,7 +9185,7 @@ "1. ERROR in ---OUTPUT_DIR_PLACEHOLDER---/Y.java (at line 3)\n" + " System.out.println(X.CONST);\n" + " ^^^^^^^\n" + - "X.CONST cannot be resolved\n" + + "X.CONST cannot be resolved to a variable\n" + "----------\n" + "1 problem (1 error)", false /* shouldFlushOutputDirectory */, @@ -9431,7 +9431,7 @@ "1. ERROR in ---OUTPUT_DIR_PLACEHOLDER---/Y.java (at line 3)\n" + " System.out.println(X.CONST);\n" + " ^^^^^^^\n" + - "X.CONST cannot be resolved\n" + + "X.CONST cannot be resolved to a variable\n" + "----------\n" + "1 problem (1 error)", false /* shouldFlushOutputDirectory */, @@ -9730,7 +9730,7 @@ "1. ERROR in ---OUTPUT_DIR_PLACEHOLDER---/src/p/X.java (at line 5)\n" + " int j = R.R3;\n" + " ^^^^\n" + - "R.R3 cannot be resolved\n" + + "R.R3 cannot be resolved to a variable\n" + "----------\n" + "1 problem (1 error)", true); @@ -9760,7 +9760,7 @@ "1. ERROR in ---OUTPUT_DIR_PLACEHOLDER---/src/p/X.java (at line 5)\n" + " int j = R.R3;\n" + " ^^^^\n" + - "R.R3 cannot be resolved\n" + + "R.R3 cannot be resolved to a variable\n" + "----------\n" + "1 problem (1 error)", true); Index: src/org/eclipse/jdt/core/tests/compiler/regression/SwitchTest.java =================================================================== RCS file: /cvsroot/eclipse/org.eclipse.jdt.core.tests.compiler/src/org/eclipse/jdt/core/tests/compiler/regression/SwitchTest.java,v retrieving revision 1.22 diff -u -r1.22 SwitchTest.java --- src/org/eclipse/jdt/core/tests/compiler/regression/SwitchTest.java 9 Sep 2008 16:39:25 -0000 1.22 +++ src/org/eclipse/jdt/core/tests/compiler/regression/SwitchTest.java 30 Jul 2009 17:20:04 -0000 @@ -250,7 +250,7 @@ "3. ERROR in X.java (at line 11)\n" + " switch(x){\n" + " ^\n" + - "x cannot be resolved\n" + + "x cannot be resolved to a variable\n" + "----------\n" + "4. ERROR in X.java (at line 13)\n" + " Zork z;\n" + Index: src/org/eclipse/jdt/core/tests/compiler/regression/GenericTypeTest.java =================================================================== RCS file: /cvsroot/eclipse/org.eclipse.jdt.core.tests.compiler/src/org/eclipse/jdt/core/tests/compiler/regression/GenericTypeTest.java,v retrieving revision 1.797 diff -u -r1.797 GenericTypeTest.java --- src/org/eclipse/jdt/core/tests/compiler/regression/GenericTypeTest.java 16 Jun 2009 17:40:49 -0000 1.797 +++ src/org/eclipse/jdt/core/tests/compiler/regression/GenericTypeTest.java 30 Jul 2009 17:20:04 -0000 @@ -7392,7 +7392,7 @@ "1. ERROR in X.java (at line 6)\n" + " return zork;\n" + " ^^^^\n" + - "zork cannot be resolved\n" + + "zork cannot be resolved to a variable\n" + "----------\n" + "2. WARNING in X.java (at line 10)\n" + " X rx = new X();\n" + @@ -32863,7 +32863,7 @@ "5. ERROR in X.java (at line 6)\n" + " return zork;\n" + " ^^^^\n" + - "zork cannot be resolved\n" + + "zork cannot be resolved to a variable\n" + "----------\n", JavacTestOptions.EclipseJustification.EclipseBug148061); } @@ -33050,7 +33050,7 @@ "11. ERROR in X.java (at line 14)\n" + " return zork;\n" + " ^^^^\n" + - "zork cannot be resolved\n" + + "zork cannot be resolved to a variable\n" + "----------\n", JavacTestOptions.EclipseJustification.EclipseBug148061); } @@ -37856,7 +37856,7 @@ "2. ERROR in X.java (at line 4)\n" + " this(zork);\n" + " ^^^^\n" + - "zork cannot be resolved\n" + + "zork cannot be resolved to a variable\n" + "----------\n" + "3. ERROR in X.java (at line 5)\n" + " Zork.this.this();\n" + Index: src/org/eclipse/jdt/core/tests/compiler/regression/EnumTest.java =================================================================== RCS file: /cvsroot/eclipse/org.eclipse.jdt.core.tests.compiler/src/org/eclipse/jdt/core/tests/compiler/regression/EnumTest.java,v retrieving revision 1.145 diff -u -r1.145 EnumTest.java --- src/org/eclipse/jdt/core/tests/compiler/regression/EnumTest.java 24 Jun 2009 15:08:03 -0000 1.145 +++ src/org/eclipse/jdt/core/tests/compiler/regression/EnumTest.java 30 Jul 2009 17:20:02 -0000 @@ -822,17 +822,17 @@ "2. ERROR in X.java (at line 8)\n" + " case BLEU :\n" + " ^^^^\n" + - "BLEU cannot be resolved\n" + + "BLEU cannot be resolved to a variable\n" + "----------\n" + "3. ERROR in X.java (at line 10)\n" + " case BLANC :\n" + " ^^^^^\n" + - "BLANC cannot be resolved\n" + + "BLANC cannot be resolved to a variable\n" + "----------\n" + "4. ERROR in X.java (at line 12)\n" + " case ROUGE :\n" + " ^^^^^\n" + - "ROUGE cannot be resolved\n" + + "ROUGE cannot be resolved to a variable\n" + "----------\n"); } // check enum name visibility @@ -894,7 +894,7 @@ "2. ERROR in X.java (at line 18)\n" + " C++;\n" + " ^\n" + - "C cannot be resolved\n" + + "C cannot be resolved to a variable\n" + "----------\n"); } // check enum name visibility @@ -1692,7 +1692,7 @@ "3. ERROR in X.java (at line 16)\n" + " System.out.println(a); // cannot find a\n" + " ^\n" + - "a cannot be resolved\n" + + "a cannot be resolved to a variable\n" + "----------\n" ); } Index: src/org/eclipse/jdt/core/tests/compiler/regression/Compliance_1_3.java =================================================================== RCS file: /cvsroot/eclipse/org.eclipse.jdt.core.tests.compiler/src/org/eclipse/jdt/core/tests/compiler/regression/Compliance_1_3.java,v retrieving revision 1.103 diff -u -r1.103 Compliance_1_3.java --- src/org/eclipse/jdt/core/tests/compiler/regression/Compliance_1_3.java 25 Nov 2008 19:53:54 -0000 1.103 +++ src/org/eclipse/jdt/core/tests/compiler/regression/Compliance_1_3.java 30 Jul 2009 17:20:02 -0000 @@ -2771,7 +2771,7 @@ "2. ERROR in X.java (at line 5)\n" + " System.out.print(full+\" \"+p.S.success);\n" + " ^^^^\n" + - "full cannot be resolved\n" + + "full cannot be resolved to a variable\n" + "----------\n" ); } @@ -2801,7 +2801,7 @@ "2. ERROR in X.java (at line 5)\n" + " System.out.print(full+\" \"+S.success);\n" + " ^^^^\n" + - "full cannot be resolved\n" + + "full cannot be resolved to a variable\n" + "----------\n" ); } Index: src/org/eclipse/jdt/core/tests/compiler/regression/AnnotationTest.java =================================================================== RCS file: /cvsroot/eclipse/org.eclipse.jdt.core.tests.compiler/src/org/eclipse/jdt/core/tests/compiler/regression/AnnotationTest.java,v retrieving revision 1.198 diff -u -r1.198 AnnotationTest.java --- src/org/eclipse/jdt/core/tests/compiler/regression/AnnotationTest.java 6 May 2009 13:01:13 -0000 1.198 +++ src/org/eclipse/jdt/core/tests/compiler/regression/AnnotationTest.java 30 Jul 2009 17:20:01 -0000 @@ -2961,7 +2961,7 @@ "1. ERROR in X.java (at line 3)\r\n" + " @Target(Element)\r\n" + " ^^^^^^^\n" + - "Element cannot be resolved\n" + + "Element cannot be resolved to a variable\n" + "----------\n"); } @@ -3419,7 +3419,7 @@ "1. ERROR in X.java (at line 4)\n" + " @Annot(foo1=zzz)\n" + " ^^^\n" + - "zzz cannot be resolved\n" + + "zzz cannot be resolved to a variable\n" + "----------\n"); } public void test113() { @@ -3508,7 +3508,7 @@ "4. ERROR in X.java (at line 5)\n" + " @Annot(foo = M.class, bar = baz()+s)\n" + " ^\n" + - "s cannot be resolved\n" + + "s cannot be resolved to a variable\n" + "----------\n" + "5. ERROR in X.java (at line 11)\n" + " @Annot(foo = T.class, bar = s)\n" + @@ -6656,7 +6656,7 @@ "1. ERROR in X.java (at line 2)\n" + " @Ann(m=Object)\n" + " ^^^^^^\n" + - "Object cannot be resolved\n" + + "Object cannot be resolved to a variable\n" + "----------\n" + "2. ERROR in X.java (at line 4)\n" + " private NonExisting bar;\n" + @@ -7501,7 +7501,7 @@ "1. ERROR in X.java (at line 6)\n" + " @Annot(value={x}, classe={Zork.class,zork})\n" + " ^\n" + - "x cannot be resolved\n" + + "x cannot be resolved to a variable\n" + "----------\n" + "2. ERROR in X.java (at line 6)\n" + " @Annot(value={x}, classe={Zork.class,zork})\n" + @@ -7516,7 +7516,7 @@ "4. ERROR in X.java (at line 6)\n" + " @Annot(value={x}, classe={Zork.class,zork})\n" + " ^^^^\n" + - "zork cannot be resolved\n" + + "zork cannot be resolved to a variable\n" + "----------\n" + "5. ERROR in X.java (at line 6)\n" + " @Annot(value={x}, classe={Zork.class,zork})\n" + @@ -7714,7 +7714,7 @@ "2. ERROR in X.java (at line 5)\n" + " return Zork;\n" + " ^^^^\n" + - "Zork cannot be resolved\n" + + "Zork cannot be resolved to a variable\n" + "----------\n"); } @@ -7734,7 +7734,7 @@ "1. ERROR in X.java (at line 4)\n" + " return Zork;\n" + " ^^^^\n" + - "Zork cannot be resolved\n" + + "Zork cannot be resolved to a variable\n" + "----------\n"); } Index: src/org/eclipse/jdt/core/tests/compiler/parser/ComplianceDiagnoseTest.java =================================================================== RCS file: /cvsroot/eclipse/org.eclipse.jdt.core.tests.compiler/src/org/eclipse/jdt/core/tests/compiler/parser/ComplianceDiagnoseTest.java,v retrieving revision 1.40 diff -u -r1.40 ComplianceDiagnoseTest.java --- src/org/eclipse/jdt/core/tests/compiler/parser/ComplianceDiagnoseTest.java 27 Jun 2008 16:04:46 -0000 1.40 +++ src/org/eclipse/jdt/core/tests/compiler/parser/ComplianceDiagnoseTest.java 30 Jul 2009 17:20:01 -0000 @@ -169,7 +169,7 @@ "2. ERROR in X.java (at line 3)\n" + " for(String o: c) {\n" + " ^\n" + - "c cannot be resolved\n" + + "c cannot be resolved to a variable\n" + "----------\n"; String expected14ProblemLog = expected13ProblemLog; @@ -179,7 +179,7 @@ "1. ERROR in X.java (at line 3)\n" + " for(String o: c) {\n" + " ^\n" + - "c cannot be resolved\n" + + "c cannot be resolved to a variable\n" + "----------\n"; runComplianceParserTest( #P org.eclipse.jdt.core Index: compiler/org/eclipse/jdt/core/compiler/IProblem.java =================================================================== RCS file: /cvsroot/eclipse/org.eclipse.jdt.core/compiler/org/eclipse/jdt/core/compiler/IProblem.java,v retrieving revision 1.212 diff -u -r1.212 IProblem.java --- compiler/org/eclipse/jdt/core/compiler/IProblem.java 24 Nov 2008 16:10:49 -0000 1.212 +++ compiler/org/eclipse/jdt/core/compiler/IProblem.java 30 Jul 2009 17:20:05 -0000 @@ -356,6 +356,8 @@ int FinalFieldAssignment = FieldRelated + 80; int UninitializedBlankFinalField = FieldRelated + 81; int DuplicateBlankFinalFieldInitialization = FieldRelated + 82; + /** @since 3.6 */ + int UnresolvedVariable = FieldRelated + 83; // variable hiding /** @since 3.0 */ Index: compiler/org/eclipse/jdt/internal/compiler/problem/messages.properties =================================================================== RCS file: /cvsroot/eclipse/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/problem/messages.properties,v retrieving revision 1.246 diff -u -r1.246 messages.properties --- compiler/org/eclipse/jdt/internal/compiler/problem/messages.properties 10 Dec 2008 17:41:52 -0000 1.246 +++ compiler/org/eclipse/jdt/internal/compiler/problem/messages.properties 30 Jul 2009 17:20:05 -0000 @@ -71,6 +71,7 @@ 80 = The final field {0}.{1} cannot be assigned 81 = The blank final field {0} may not have been initialized 82 = The final field {0} may already have been assigned +83 = {0} cannot be resolved to a variable 90 = The local variable {0} is hiding another local variable defined in an enclosing type scope 91 = The local variable {0} is hiding a field from type {1} Index: compiler/org/eclipse/jdt/internal/compiler/problem/ProblemReporter.java =================================================================== RCS file: /cvsroot/eclipse/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/problem/ProblemReporter.java,v retrieving revision 1.392 diff -u -r1.392 ProblemReporter.java --- compiler/org/eclipse/jdt/internal/compiler/problem/ProblemReporter.java 29 Jul 2009 16:41:31 -0000 1.392 +++ compiler/org/eclipse/jdt/internal/compiler/problem/ProblemReporter.java 30 Jul 2009 17:20:05 -0000 @@ -6811,8 +6811,11 @@ SingleNameReference ref = (SingleNameReference) nameRef; if (isRecoveredName(ref.token)) return; } + int problemId = (nameRef.bits & Binding.VARIABLE) != 0 && (nameRef.bits & Binding.TYPE) == 0 + ? IProblem.UnresolvedVariable + : IProblem.UndefinedName; this.handle( - IProblem.UndefinedName, + problemId, arguments, arguments, nameRef.sourceStart, Index: model/org/eclipse/jdt/core/CorrectionEngine.java =================================================================== RCS file: /cvsroot/eclipse/org.eclipse.jdt.core/model/org/eclipse/jdt/core/CorrectionEngine.java,v retrieving revision 1.56 diff -u -r1.56 CorrectionEngine.java --- model/org/eclipse/jdt/core/CorrectionEngine.java 17 Sep 2008 12:00:01 -0000 1.56 +++ model/org/eclipse/jdt/core/CorrectionEngine.java 30 Jul 2009 17:20:05 -0000 @@ -219,6 +219,7 @@ argument = arguments[0]; break; case IProblem.UndefinedName : + case IProblem.UnresolvedVariable : this.filter = FIELD | LOCAL; argument = arguments[0]; break; #P org.eclipse.jdt.core.tests.builder Index: src/org/eclipse/jdt/core/tests/builder/DependencyTests.java =================================================================== RCS file: /cvsroot/eclipse/org.eclipse.jdt.core.tests.builder/src/org/eclipse/jdt/core/tests/builder/DependencyTests.java,v retrieving revision 1.30 diff -u -r1.30 DependencyTests.java --- src/org/eclipse/jdt/core/tests/builder/DependencyTests.java 28 Apr 2009 17:00:26 -0000 1.30 +++ src/org/eclipse/jdt/core/tests/builder/DependencyTests.java 30 Jul 2009 17:20:05 -0000 @@ -389,7 +389,7 @@ incrementalBuild(projectPath); expectingOnlyProblemsFor(new IPath[] {cPath, xPath}); - expectingSpecificProblemFor(cPath, new Problem("C", "i cannot be resolved", cPath, 50, 51, CategorizedProblem.CAT_MEMBER, IMarker.SEVERITY_ERROR)); //$NON-NLS-1$ //$NON-NLS-2$ + expectingSpecificProblemFor(cPath, new Problem("C", "i cannot be resolved to a variable", cPath, 50, 51, CategorizedProblem.CAT_MEMBER, IMarker.SEVERITY_ERROR)); //$NON-NLS-1$ //$NON-NLS-2$ expectingSpecificProblemFor(xPath, new Problem("X", "c.i cannot be resolved or is not a field", xPath, 55, 58, CategorizedProblem.CAT_MEMBER, IMarker.SEVERITY_ERROR)); //$NON-NLS-1$ //$NON-NLS-2$ env.addClass(root, "p1", "A", //$NON-NLS-1$ //$NON-NLS-2$