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<Object> 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 interface Test1<U> {\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<U> extends Test1<U> {\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<Ljava.lang.Object;>;, <T:Ljava.lang.Object;>([TT;)[TT;, foo, (t), " + (R_DEFAULT + R_INTERESTING + R_CASE + R_NON_STATIC + R_NON_RESTRICTED) + "}", |
8697 |
requestor.getResults()); |
8698 |
} |
8699 |
// https://bugs.eclipse.org/bugs/show_bug.cgi?id=95829 |
8700 |
public void test0287() throws JavaModelException { |
8701 |
this.workingCopies = new ICompilationUnit[3]; |
8702 |
this.workingCopies[0] = getWorkingCopy( |
8703 |
"/Completion/src/test/Test.java", |
8704 |
"package test;\n"+ |
8705 |
"public class Test implements Test2<Object>{\n"+ |
8706 |
" fo\n"+ |
8707 |
"}\n"); |
8708 |
|
8709 |
this.workingCopies[1] = getWorkingCopy( |
8710 |
"/Completion/src/test/Test1.java", |
8711 |
"package test;\n"+ |
8712 |
"public interface Test1<U> {\n"+ |
8713 |
" <T> T[] foo(T[] t);\n"+ |
8714 |
"}\n"); |
8715 |
|
8716 |
this.workingCopies[2] = getWorkingCopy( |
8717 |
"/Completion/src/test/Test2.java", |
8718 |
"package test;\n"+ |
8719 |
"public interface Test2<U> extends Test1<U> {\n"+ |
8720 |
" <T> T[] foo(T[] t);\n"+ |
8721 |
"}\n"); |
8722 |
|
8723 |
CompletionTestsRequestor2 requestor = new CompletionTestsRequestor2(true); |
8724 |
|
8725 |
String str = this.workingCopies[0].getSource(); |
8726 |
String completeBehind = "fo"; |
8727 |
int cursorLocation = str.lastIndexOf(completeBehind) + completeBehind.length(); |
8728 |
this.workingCopies[0].codeComplete(cursorLocation, requestor, this.wcOwner); |
8729 |
|
8730 |
assertResults( |
8731 |
"fo[POTENTIAL_METHOD_DECLARATION]{fo, Ltest.Test;, ()V, fo, null, " + (R_DEFAULT + R_INTERESTING + R_NON_RESTRICTED) + "}\n" + |
8732 |
"foo[METHOD_DECLARATION]{public <T> T[] foo(T[] t), Ltest.Test2<Ljava.lang.Object;>;, <T:Ljava.lang.Object;>([TT;)[TT;, foo, (t), " + (R_DEFAULT + R_INTERESTING + R_CASE + R_METHOD_OVERIDE + R_ABSTRACT_METHOD + R_NON_RESTRICTED) + "}", |
8733 |
requestor.getResults()); |
8734 |
} |
8662 |
} |
8735 |
} |