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

Collapse All | Expand All

(-)codeassist/org/eclipse/jdt/internal/codeassist/CompletionEngine.java (-2 / +2 lines)
Lines 3903-3909 Link Here
3903
					continue next;
3903
					continue next;
3904
3904
3905
				if (CharOperation.equals(method.selector, otherMethod.selector, true)
3905
				if (CharOperation.equals(method.selector, otherMethod.selector, true)
3906
					&& method.areParametersEqual(otherMethod)) {
3906
					&& lookupEnvironment.methodVerifier().doesMethodOverride(otherMethod, method)) {
3907
3907
3908
					if (method.declaringClass.isSuperclassOf(otherMethod.declaringClass))
3908
					if (method.declaringClass.isSuperclassOf(otherMethod.declaringClass))
3909
						continue next;
3909
						continue next;
Lines 6853-6856 Link Here
6853
		}
6853
		}
6854
		return name;
6854
		return name;
6855
	}
6855
	}
6856
}
6856
}
(-)src/org/eclipse/jdt/core/tests/model/CompletionTests_1_5.java (+37 lines)
Lines 8659-8662 Link Here
8659
			"ZZZNeedsImportEnum[TYPE_REF]{ZZZNeedsImportEnum, pack, Lpack.ZZZNeedsImportEnum;, null, null, " + (R_DEFAULT + R_INTERESTING + R_CASE + R_EXACT_EXPECTED_TYPE + R_UNQUALIFIED + R_NON_RESTRICTED) + "}",
8659
			"ZZZNeedsImportEnum[TYPE_REF]{ZZZNeedsImportEnum, pack, Lpack.ZZZNeedsImportEnum;, null, null, " + (R_DEFAULT + R_INTERESTING + R_CASE + R_EXACT_EXPECTED_TYPE + R_UNQUALIFIED + R_NON_RESTRICTED) + "}",
8660
			requestor.getResults());
8660
			requestor.getResults());
8661
}
8661
}
8662
// https://bugs.eclipse.org/bugs/show_bug.cgi?id=95829
8663
public void test0286() throws JavaModelException {
8664
	this.workingCopies = new ICompilationUnit[3];
8665
	this.workingCopies[0] = getWorkingCopy(
8666
		"/Completion/src/test/Test.java",
8667
		"package test;\n"+
8668
		"public class Test {\n"+
8669
		"  void bar(Test2 t) {\n"+
8670
		"    t.fo\n"+
8671
		"  }\n"+
8672
		"}\n");
8673
	
8674
	this.workingCopies[1] = getWorkingCopy(
8675
		"/Completion/src/test/Test1.java",
8676
		"package test;\n"+
8677
		"public class Test1 {\n"+
8678
		"  <T> T[] foo(T[] t);\n"+
8679
		"}\n");
8680
	
8681
	this.workingCopies[2] = getWorkingCopy(
8682
		"/Completion/src/test/Test2.java",
8683
		"package test;\n"+
8684
		"public interface Test2 extends Test1 {\n"+
8685
		"  <T> T[] foo(T[] t);\n"+
8686
		"}\n");
8687
8688
	CompletionTestsRequestor2 requestor = new CompletionTestsRequestor2(true);
8689
	
8690
	String str = this.workingCopies[0].getSource();
8691
	String completeBehind = "t.fo";
8692
	int cursorLocation = str.lastIndexOf(completeBehind) + completeBehind.length();
8693
	this.workingCopies[0].codeComplete(cursorLocation, requestor, this.wcOwner);
8694
8695
	assertResults(
8696
			"foo[METHOD_REF]{foo(), Ltest.Test2;, <T:Ljava.lang.Object;>([TT;)[TT;, foo, (t), " + (R_DEFAULT + R_INTERESTING + R_CASE + R_NON_STATIC + R_NON_RESTRICTED) + "}",
8697
			requestor.getResults());
8698
}
8662
}
8699
}

Return to bug 95829