### 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.298 diff -u -r1.298 ASTConverter15Test.java --- src/org/eclipse/jdt/core/tests/dom/ASTConverter15Test.java 2 Nov 2010 16:14:02 -0000 1.298 +++ src/org/eclipse/jdt/core/tests/dom/ASTConverter15Test.java 29 Nov 2010 07:27:17 -0000 @@ -49,7 +49,7 @@ static { // TESTS_NUMBERS = new int[] { 345, 346 }; // TESTS_RANGE = new int[] { 325, -1 }; -// TESTS_NAMES = new String[] {"test0204"}; + TESTS_NAMES = new String[] {"testForJay"}; } public static Test suite() { return buildModelTestSuite(ASTConverter15Test.class); @@ -11155,5 +11155,41 @@ String constantValue = (String) value.resolveConstantExpressionValue(); assertEquals("Wrong constant value", "a", constantValue); } + + public void testForJay() throws CoreException, IOException { + try { + IJavaProject project = createJavaProject("P1", new String[] {""}, new String[] {"CONVERTER_JCL15_LIB"}, "", "1.5"); + addLibrary(project, "lib.jar", "src.zip", new String[] { + "/P1/p/A.java", + "package p;\n" + + "public class A {\n" + + " public class B {\n" + + " public class C {\n" + + " }\n" + + " }\n" + + "}" + }, "1.5"); + this.workingCopy = getWorkingCopy("/P1/p1/Y.java", true/*resolve*/); + ASTNode node = buildAST( + "package p1;\n" + + "import p.A.B;\n" + + "import p.A.B.C;\n" + + "public class Y { \n" + + " public void test() {\n" + + " A a = new A();\n" + + " B b = a.new B();\n" + + " C /*start*/c/*end*/ = b.new C();\n" + + " }\n" + + "}", + this.workingCopy, + false); + SimpleName name = (SimpleName) node; + IBinding binding = name.resolveBinding(); + System.out.println(((org.eclipse.jdt.core.dom.IVariableBinding)binding).getType().getKey()); + + } finally { + deleteProject("P1"); + } + } } \ No newline at end of file