### Eclipse Workspace Patch 1.0 #P org.eclipse.jdt.core.tests.model Index: src/org/eclipse/jdt/core/tests/model/CompletionTests_1_5.java =================================================================== RCS file: /cvsroot/eclipse/org.eclipse.jdt.core.tests.model/src/org/eclipse/jdt/core/tests/model/CompletionTests_1_5.java,v retrieving revision 1.74 diff -u -r1.74 CompletionTests_1_5.java --- src/org/eclipse/jdt/core/tests/model/CompletionTests_1_5.java 25 Sep 2006 08:22:38 -0000 1.74 +++ src/org/eclipse/jdt/core/tests/model/CompletionTests_1_5.java 19 Oct 2006 16:15:23 -0000 @@ -9164,6 +9164,38 @@ "foo[METHOD_REF]{foo(), Ltest.Test;, (Ltest.Test4;)V, foo, (t), " + (R_DEFAULT + R_INTERESTING + R_CASE + R_EXACT_NAME + R_UNQUALIFIED + R_NON_RESTRICTED) + "}", requestor.getResults()); } +//https://bugs.eclipse.org/bugs/show_bug.cgi?id=161557 +public void test0294() throws JavaModelException { + this.workingCopies = new ICompilationUnit[3]; + this.workingCopies[0] = getWorkingCopy( + "/Completion/src3/test/Test.java", + "package test;\n" + + "public class Test {\n" + + " Test1 var[];\n" + + "}"); + + this.workingCopies[1] = getWorkingCopy( + "/Completion/src3/test/Test1.java", + "package test;\n" + + "public class Test1 {\n" + + "}"); + + this.workingCopies[1] = getWorkingCopy( + "/Completion/src3/test/Test2.java", + "package test;\n" + + "public class Test2 {\n" + + "}"); + + CompletionTestsRequestor2 requestor = new CompletionTestsRequestor2(true); + String str = this.workingCopies[0].getSource(); + String completeBehind = "Test2"; + int cursorLocation = str.lastIndexOf(completeBehind) + completeBehind.length(); + this.workingCopies[0].codeComplete(cursorLocation, requestor, this.wcOwner); + + assertResults( + "Test2[TYPE_REF]{Test2, test, Ltest.Test2;, null, null, " + (R_DEFAULT + R_INTERESTING + R_CASE + R_EXACT_NAME + R_EXPECTED_TYPE + R_UNQUALIFIED + R_NON_RESTRICTED) + "}", + requestor.getResults()); +} //https://bugs.eclipse.org/bugs/show_bug.cgi?id=153130 public void testEC001() throws JavaModelException { this.workingCopies = new ICompilationUnit[1]; #P org.eclipse.jdt.core Index: codeassist/org/eclipse/jdt/internal/codeassist/complete/CompletionParser.java =================================================================== RCS file: /cvsroot/eclipse/org.eclipse.jdt.core/codeassist/org/eclipse/jdt/internal/codeassist/complete/CompletionParser.java,v retrieving revision 1.161 diff -u -r1.161 CompletionParser.java --- codeassist/org/eclipse/jdt/internal/codeassist/complete/CompletionParser.java 19 Oct 2006 14:24:18 -0000 1.161 +++ codeassist/org/eclipse/jdt/internal/codeassist/complete/CompletionParser.java 19 Oct 2006 16:15:28 -0000 @@ -3395,6 +3395,16 @@ } return super.createStringLiteral(token, start, end, lineNumber); } +protected TypeReference copyDims(TypeReference typeRef, int dim) { + if (this.assistNode == typeRef) { + return typeRef; + } + TypeReference result = super.copyDims(typeRef, dim); + if (this.assistNodeParent == typeRef) { + this.assistNodeParent = result; + } + return result; +} public CompilationUnitDeclaration dietParse(ICompilationUnit sourceUnit, CompilationResult compilationResult, int cursorLoc) { this.cursorLocation = cursorLoc;