Lines 9010-9015
Link Here
|
9010 |
"QQAnnotation[TYPE_REF]{pkgannotations.QQAnnotation, pkgannotations, Lpkgannotations.QQAnnotation;, null, null, " + (R_DEFAULT + R_INTERESTING + R_CASE + R_ANNOTATION + R_NON_RESTRICTED) + "}", |
9010 |
"QQAnnotation[TYPE_REF]{pkgannotations.QQAnnotation, pkgannotations, Lpkgannotations.QQAnnotation;, null, null, " + (R_DEFAULT + R_INTERESTING + R_CASE + R_ANNOTATION + R_NON_RESTRICTED) + "}", |
9011 |
requestor.getResults()); |
9011 |
requestor.getResults()); |
9012 |
} |
9012 |
} |
|
|
9013 |
//https://bugs.eclipse.org/bugs/show_bug.cgi?id=123225 |
9014 |
public void test0291() throws JavaModelException { |
9015 |
this.workingCopies = new ICompilationUnit[5]; |
9016 |
this.workingCopies[0] = getWorkingCopy( |
9017 |
"/Completion/src3/test/Test.java", |
9018 |
"package test;\n" + |
9019 |
"public class Test {\n" + |
9020 |
" public void foo(){\n" + |
9021 |
" new Test2<Test4>().foo\n" + |
9022 |
" }\n" + |
9023 |
"}"); |
9024 |
|
9025 |
this.workingCopies[1] = getWorkingCopy( |
9026 |
"/Completion/src3/test/Test1.java", |
9027 |
"package test;\n" + |
9028 |
"public class Test1<TTest1> {\n" + |
9029 |
" public void foo(TTest1 t){}\n" + |
9030 |
"}"); |
9031 |
|
9032 |
this.workingCopies[2] = getWorkingCopy( |
9033 |
"/Completion/src3/test/Test2.java", |
9034 |
"package test;\n" + |
9035 |
"public class Test2<TTest2 extends Test3> extends Test1<TTest2> {\n" + |
9036 |
" public void foo(Test3 t){}\n" + |
9037 |
"}"); |
9038 |
|
9039 |
this.workingCopies[3] = getWorkingCopy( |
9040 |
"/Completion/src3/test/Test3.java", |
9041 |
"package test;\n" + |
9042 |
"public class Test3 {\n" + |
9043 |
"}"); |
9044 |
|
9045 |
this.workingCopies[4] = getWorkingCopy( |
9046 |
"/Completion/src3/test/Test4.java", |
9047 |
"package test;\n" + |
9048 |
"public class Test4 extends Test3 {\n" + |
9049 |
"}"); |
9050 |
|
9051 |
CompletionTestsRequestor2 requestor = new CompletionTestsRequestor2(true); |
9052 |
String str = this.workingCopies[0].getSource(); |
9053 |
String completeBehind = ".foo"; |
9054 |
int cursorLocation = str.lastIndexOf(completeBehind) + completeBehind.length(); |
9055 |
this.workingCopies[0].codeComplete(cursorLocation, requestor, this.wcOwner); |
9056 |
|
9057 |
assertResults( |
9058 |
"foo[METHOD_REF]{foo(), Ltest.Test2<Ltest.Test4;>;, (Ltest.Test3;)V, foo, (t), " + (R_DEFAULT + R_INTERESTING + R_CASE + R_EXACT_NAME + R_NON_STATIC + R_NON_RESTRICTED) + "}", |
9059 |
requestor.getResults()); |
9060 |
} |
9061 |
//https://bugs.eclipse.org/bugs/show_bug.cgi?id=123225 |
9062 |
public void tes0292() throws JavaModelException { |
9063 |
this.workingCopies = new ICompilationUnit[6]; |
9064 |
this.workingCopies[0] = getWorkingCopy( |
9065 |
"/Completion/src3/test/Test.java", |
9066 |
"package test;\n" + |
9067 |
"public class Test {\n" + |
9068 |
" public void foo(){\n" + |
9069 |
" new Test5().foo\n" + |
9070 |
" }\n" + |
9071 |
"}"); |
9072 |
|
9073 |
this.workingCopies[1] = getWorkingCopy( |
9074 |
"/Completion/src3/test/Test1.java", |
9075 |
"package test;\n" + |
9076 |
"public class Test1<TTest1> {\n" + |
9077 |
" public void foo(TTest1 t){}\n" + |
9078 |
"}"); |
9079 |
|
9080 |
this.workingCopies[2] = getWorkingCopy( |
9081 |
"/Completion/src3/test/Test2.java", |
9082 |
"package test;\n" + |
9083 |
"public class Test2<TTest2 extends Test3> extends Test1<TTest2> {\n" + |
9084 |
" public void foo(Test3 t){}\n" + |
9085 |
"}"); |
9086 |
|
9087 |
this.workingCopies[3] = getWorkingCopy( |
9088 |
"/Completion/src3/test/Test3.java", |
9089 |
"package test;\n" + |
9090 |
"public class Test3 {\n" + |
9091 |
"}"); |
9092 |
|
9093 |
this.workingCopies[4] = getWorkingCopy( |
9094 |
"/Completion/src3/test/Test4.java", |
9095 |
"package test;\n" + |
9096 |
"public class Test4 extends Test3 {\n" + |
9097 |
"}"); |
9098 |
|
9099 |
this.workingCopies[5] = getWorkingCopy( |
9100 |
"/Completion/src3/test/Test5.java", |
9101 |
"package test;\n" + |
9102 |
"public class Test5 extends Test2<Test4> {\n" + |
9103 |
" public void foo(Test4 t){}\n" + |
9104 |
"}"); |
9105 |
|
9106 |
CompletionTestsRequestor2 requestor = new CompletionTestsRequestor2(true); |
9107 |
String str = this.workingCopies[0].getSource(); |
9108 |
String completeBehind = ".foo"; |
9109 |
int cursorLocation = str.lastIndexOf(completeBehind) + completeBehind.length(); |
9110 |
this.workingCopies[0].codeComplete(cursorLocation, requestor, this.wcOwner); |
9111 |
|
9112 |
assertResults( |
9113 |
"foo[METHOD_REF]{foo(), Ltest.Test2<Ltest.Test4;>;, (Ltest.Test3;)V, foo, (t), " + (R_DEFAULT + R_INTERESTING + R_CASE + R_EXACT_NAME + R_NON_STATIC + R_NON_RESTRICTED) + "}\n" + |
9114 |
"foo[METHOD_REF]{foo(), Ltest.Test5;, (Ltest.Test4;)V, foo, (t), " + (R_DEFAULT + R_INTERESTING + R_CASE + R_EXACT_NAME + R_NON_STATIC + R_NON_RESTRICTED) + "}", |
9115 |
requestor.getResults()); |
9116 |
} |
9117 |
//https://bugs.eclipse.org/bugs/show_bug.cgi?id=123225 |
9118 |
public void test0293() throws JavaModelException { |
9119 |
this.workingCopies = new ICompilationUnit[5]; |
9120 |
this.workingCopies[0] = getWorkingCopy( |
9121 |
"/Completion/src3/test/Test.java", |
9122 |
"package test;\n" + |
9123 |
"public class Test extends Test2<Test4> {\n" + |
9124 |
" public void foo(Test4 t){}\n" + |
9125 |
" public void bar(){\n" + |
9126 |
" foo\n" + |
9127 |
" }\n" + |
9128 |
"}"); |
9129 |
|
9130 |
this.workingCopies[1] = getWorkingCopy( |
9131 |
"/Completion/src3/test/Test1.java", |
9132 |
"package test;\n" + |
9133 |
"public class Test1<TTest1> {\n" + |
9134 |
" public void foo(TTest1 t){}\n" + |
9135 |
"}"); |
9136 |
|
9137 |
this.workingCopies[2] = getWorkingCopy( |
9138 |
"/Completion/src3/test/Test2.java", |
9139 |
"package test;\n" + |
9140 |
"public class Test2<TTest2 extends Test3> extends Test1<TTest2> {\n" + |
9141 |
" public void foo(Test3 t){}\n" + |
9142 |
"}"); |
9143 |
|
9144 |
this.workingCopies[3] = getWorkingCopy( |
9145 |
"/Completion/src3/test/Test3.java", |
9146 |
"package test;\n" + |
9147 |
"public class Test3 {\n" + |
9148 |
"}"); |
9149 |
|
9150 |
this.workingCopies[4] = getWorkingCopy( |
9151 |
"/Completion/src3/test/Test4.java", |
9152 |
"package test;\n" + |
9153 |
"public class Test4 extends Test3 {\n" + |
9154 |
"}"); |
9155 |
|
9156 |
CompletionTestsRequestor2 requestor = new CompletionTestsRequestor2(true); |
9157 |
String str = this.workingCopies[0].getSource(); |
9158 |
String completeBehind = "foo"; |
9159 |
int cursorLocation = str.lastIndexOf(completeBehind) + completeBehind.length(); |
9160 |
this.workingCopies[0].codeComplete(cursorLocation, requestor, this.wcOwner); |
9161 |
|
9162 |
assertResults( |
9163 |
"foo[METHOD_REF]{foo(), Ltest.Test2<Ltest.Test4;>;, (Ltest.Test3;)V, foo, (t), " + (R_DEFAULT + R_INTERESTING + R_CASE + R_EXACT_NAME + R_UNQUALIFIED + R_NON_RESTRICTED) + "}\n" + |
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()); |
9166 |
} |
9013 |
//https://bugs.eclipse.org/bugs/show_bug.cgi?id=153130 |
9167 |
//https://bugs.eclipse.org/bugs/show_bug.cgi?id=153130 |
9014 |
public void testEC001() throws JavaModelException { |
9168 |
public void testEC001() throws JavaModelException { |
9015 |
this.workingCopies = new ICompilationUnit[1]; |
9169 |
this.workingCopies = new ICompilationUnit[1]; |