View | Details | Raw Unified | Return to bug 161557 | Differences between
and this patch

Collapse All | Expand All

(-)src/org/eclipse/jdt/core/tests/model/CompletionTests_1_5.java (+32 lines)
Lines 8784-8787 Link Here
8784
			"test0.test1[PACKAGE_REF]{test0.test1., test0.test1, null, null, null, " + (R_DEFAULT + R_INTERESTING + R_CASE + R_NON_RESTRICTED) + "}",
8784
			"test0.test1[PACKAGE_REF]{test0.test1., test0.test1, null, null, null, " + (R_DEFAULT + R_INTERESTING + R_CASE + R_NON_RESTRICTED) + "}",
8785
			requestor.getResults());
8785
			requestor.getResults());
8786
}
8786
}
8787
//https://bugs.eclipse.org/bugs/show_bug.cgi?id=161557
8788
public void test0294() throws JavaModelException {
8789
	this.workingCopies = new ICompilationUnit[3];
8790
	this.workingCopies[0] = getWorkingCopy(
8791
			"/Completion/src3/test/Test.java",
8792
			"package test;\n" +
8793
			"public class Test {\n" +
8794
			"  Test1<Test2> var[];\n" +
8795
			"}");
8796
	
8797
	this.workingCopies[1] = getWorkingCopy(
8798
			"/Completion/src3/test/Test1.java",
8799
			"package test;\n" +
8800
			"public class Test1<TTest1> {\n" +
8801
			"}");
8802
	
8803
	this.workingCopies[1] = getWorkingCopy(
8804
			"/Completion/src3/test/Test2.java",
8805
			"package test;\n" +
8806
			"public class Test2 {\n" +
8807
			"}");
8808
	
8809
	CompletionTestsRequestor2 requestor = new CompletionTestsRequestor2(true);
8810
	String str = this.workingCopies[0].getSource();
8811
	String completeBehind = "Test2";
8812
	int cursorLocation = str.lastIndexOf(completeBehind) + completeBehind.length();
8813
	this.workingCopies[0].codeComplete(cursorLocation, requestor, this.wcOwner);
8814
8815
	assertResults(
8816
			"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) + "}",
8817
			requestor.getResults());
8818
}
8787
}
8819
}
(-)codeassist/org/eclipse/jdt/internal/codeassist/complete/CompletionParser.java (+10 lines)
Lines 3365-3370 Link Here
3365
	}
3365
	}
3366
	return super.createStringLiteral(token, start, end, lineNumber);
3366
	return super.createStringLiteral(token, start, end, lineNumber);
3367
}
3367
}
3368
protected TypeReference copyDims(TypeReference typeRef, int dim) {
3369
	if (this.assistNode == typeRef) {
3370
		return typeRef;
3371
	}
3372
	TypeReference result = super.copyDims(typeRef, dim);
3373
	if (this.assistNodeParent == typeRef) {
3374
		this.assistNodeParent = result;
3375
	}
3376
	return result;
3377
}
3368
public CompilationUnitDeclaration dietParse(ICompilationUnit sourceUnit, CompilationResult compilationResult, int cursorLoc) {
3378
public CompilationUnitDeclaration dietParse(ICompilationUnit sourceUnit, CompilationResult compilationResult, int cursorLoc) {
3369
3379
3370
	this.cursorLocation = cursorLoc;
3380
	this.cursorLocation = cursorLoc;

Return to bug 161557