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 9164-9169 Link Here
9164
			"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) + "}",
9164
			"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) + "}",
9165
			requestor.getResults());
9165
			requestor.getResults());
9166
}
9166
}
9167
//https://bugs.eclipse.org/bugs/show_bug.cgi?id=161557
9168
public void test0294() throws JavaModelException {
9169
	this.workingCopies = new ICompilationUnit[3];
9170
	this.workingCopies[0] = getWorkingCopy(
9171
			"/Completion/src3/test/Test.java",
9172
			"package test;\n" +
9173
			"public class Test {\n" +
9174
			"  Test1<Test2> var[];\n" +
9175
			"}");
9176
	
9177
	this.workingCopies[1] = getWorkingCopy(
9178
			"/Completion/src3/test/Test1.java",
9179
			"package test;\n" +
9180
			"public class Test1<TTest1> {\n" +
9181
			"}");
9182
	
9183
	this.workingCopies[1] = getWorkingCopy(
9184
			"/Completion/src3/test/Test2.java",
9185
			"package test;\n" +
9186
			"public class Test2 {\n" +
9187
			"}");
9188
	
9189
	CompletionTestsRequestor2 requestor = new CompletionTestsRequestor2(true);
9190
	String str = this.workingCopies[0].getSource();
9191
	String completeBehind = "Test2";
9192
	int cursorLocation = str.lastIndexOf(completeBehind) + completeBehind.length();
9193
	this.workingCopies[0].codeComplete(cursorLocation, requestor, this.wcOwner);
9194
9195
	assertResults(
9196
			"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) + "}",
9197
			requestor.getResults());
9198
}
9167
//https://bugs.eclipse.org/bugs/show_bug.cgi?id=153130
9199
//https://bugs.eclipse.org/bugs/show_bug.cgi?id=153130
9168
public void testEC001() throws JavaModelException {
9200
public void testEC001() throws JavaModelException {
9169
	this.workingCopies = new ICompilationUnit[1];
9201
	this.workingCopies = new ICompilationUnit[1];
(-)codeassist/org/eclipse/jdt/internal/codeassist/complete/CompletionParser.java (+10 lines)
Lines 3395-3400 Link Here
3395
	}
3395
	}
3396
	return super.createStringLiteral(token, start, end, lineNumber);
3396
	return super.createStringLiteral(token, start, end, lineNumber);
3397
}
3397
}
3398
protected TypeReference copyDims(TypeReference typeRef, int dim) {
3399
	if (this.assistNode == typeRef) {
3400
		return typeRef;
3401
	}
3402
	TypeReference result = super.copyDims(typeRef, dim);
3403
	if (this.assistNodeParent == typeRef) {
3404
		this.assistNodeParent = result;
3405
	}
3406
	return result;
3407
}
3398
public CompilationUnitDeclaration dietParse(ICompilationUnit sourceUnit, CompilationResult compilationResult, int cursorLoc) {
3408
public CompilationUnitDeclaration dietParse(ICompilationUnit sourceUnit, CompilationResult compilationResult, int cursorLoc) {
3399
3409
3400
	this.cursorLocation = cursorLoc;
3410
	this.cursorLocation = cursorLoc;

Return to bug 161557