Lines 12015-12020
Link Here
|
12015 |
"foo2[METHOD_REF]{foo2(), Ltest.Test;, ()V, foo2, null, public deprecated, " + (R_DEFAULT + R_RESOLVED + R_INTERESTING + R_CASE + R_UNQUALIFIED + R_NON_RESTRICTED) + "}", |
12015 |
"foo2[METHOD_REF]{foo2(), Ltest.Test;, ()V, foo2, null, public deprecated, " + (R_DEFAULT + R_RESOLVED + R_INTERESTING + R_CASE + R_UNQUALIFIED + R_NON_RESTRICTED) + "}", |
12016 |
requestor.getResults()); |
12016 |
requestor.getResults()); |
12017 |
} |
12017 |
} |
|
|
12018 |
//https://bugs.eclipse.org/bugs/show_bug.cgi?id=114116 |
12019 |
public void test0376() throws JavaModelException { |
12020 |
this.workingCopies = new ICompilationUnit[2]; |
12021 |
|
12022 |
this.workingCopies[0] = getWorkingCopy( |
12023 |
"/Completion/src/test/Test.java", |
12024 |
"package test;\n"+ |
12025 |
"public class Test {\n"+ |
12026 |
" MyCollection<String> \n"+ |
12027 |
"}"); |
12028 |
|
12029 |
this.workingCopies[1] = getWorkingCopy( |
12030 |
"/Completion/src/test/MyCollection.java", |
12031 |
"package test;\n"+ |
12032 |
"public abstract class MyCollection<T> implements java.util.Collection<T> {\n"+ |
12033 |
"}"); |
12034 |
|
12035 |
CompletionTestsRequestor2 requestor = new CompletionTestsRequestor2(true); |
12036 |
String str = this.workingCopies[0].getSource(); |
12037 |
String completeBehind = "MyCollection<String> "; |
12038 |
int cursorLocation = str.lastIndexOf(completeBehind) + completeBehind.length(); |
12039 |
this.workingCopies[0].codeComplete(cursorLocation, requestor, this.wcOwner); |
12040 |
|
12041 |
assertResults( |
12042 |
"collection[VARIABLE_DECLARATION]{collection, null, Ltest.MyCollection<Ljava.lang.String;>;, collection, null, " + (R_DEFAULT + R_INTERESTING + R_CASE + R_NON_RESTRICTED) + "}\n" + |
12043 |
"myCollection[VARIABLE_DECLARATION]{myCollection, null, Ltest.MyCollection<Ljava.lang.String;>;, myCollection, null, " + (R_DEFAULT + R_INTERESTING + R_CASE + R_NON_RESTRICTED) + "}\n" + |
12044 |
"strings[VARIABLE_DECLARATION]{strings, null, Ltest.MyCollection<Ljava.lang.String;>;, strings, null, " + (R_DEFAULT + R_INTERESTING + R_CASE + R_NON_RESTRICTED) + "}", |
12045 |
requestor.getResults()); |
12046 |
} |
12047 |
//https://bugs.eclipse.org/bugs/show_bug.cgi?id=114116 |
12048 |
public void test0377() throws JavaModelException { |
12049 |
this.workingCopies = new ICompilationUnit[2]; |
12050 |
|
12051 |
this.workingCopies[0] = getWorkingCopy( |
12052 |
"/Completion/src/test/Test.java", |
12053 |
"package test;\n"+ |
12054 |
"public class Test {\n"+ |
12055 |
" MyCollection \n"+ |
12056 |
"}"); |
12057 |
|
12058 |
this.workingCopies[1] = getWorkingCopy( |
12059 |
"/Completion/src/test/MyCollection.java", |
12060 |
"package test;\n"+ |
12061 |
"public abstract class MyCollection<T> implements java.util.Collection<T> {\n"+ |
12062 |
"}"); |
12063 |
|
12064 |
CompletionTestsRequestor2 requestor = new CompletionTestsRequestor2(true); |
12065 |
String str = this.workingCopies[0].getSource(); |
12066 |
String completeBehind = "MyCollection "; |
12067 |
int cursorLocation = str.lastIndexOf(completeBehind) + completeBehind.length(); |
12068 |
this.workingCopies[0].codeComplete(cursorLocation, requestor, this.wcOwner); |
12069 |
|
12070 |
assertResults( |
12071 |
"collection[VARIABLE_DECLARATION]{collection, null, Ltest.MyCollection;, collection, null, " + (R_DEFAULT + R_INTERESTING + R_CASE + R_NON_RESTRICTED) + "}\n" + |
12072 |
"myCollection[VARIABLE_DECLARATION]{myCollection, null, Ltest.MyCollection;, myCollection, null, " + (R_DEFAULT + R_INTERESTING + R_CASE + R_NON_RESTRICTED) + "}", |
12073 |
requestor.getResults()); |
12074 |
} |
12075 |
//https://bugs.eclipse.org/bugs/show_bug.cgi?id=114116 |
12076 |
public void test0378() throws JavaModelException { |
12077 |
this.workingCopies = new ICompilationUnit[2]; |
12078 |
|
12079 |
this.workingCopies[0] = getWorkingCopy( |
12080 |
"/Completion/src/test/Test.java", |
12081 |
"package test;\n"+ |
12082 |
"public class Test {\n"+ |
12083 |
" MyCollection<String, String> \n"+ |
12084 |
"}"); |
12085 |
|
12086 |
this.workingCopies[1] = getWorkingCopy( |
12087 |
"/Completion/src/test/MyCollection.java", |
12088 |
"package test;\n"+ |
12089 |
"public abstract class MyCollection<T, U> implements java.util.Collection<T> {\n"+ |
12090 |
"}"); |
12091 |
|
12092 |
CompletionTestsRequestor2 requestor = new CompletionTestsRequestor2(true); |
12093 |
String str = this.workingCopies[0].getSource(); |
12094 |
String completeBehind = "MyCollection<String, String> "; |
12095 |
int cursorLocation = str.lastIndexOf(completeBehind) + completeBehind.length(); |
12096 |
this.workingCopies[0].codeComplete(cursorLocation, requestor, this.wcOwner); |
12097 |
|
12098 |
assertResults( |
12099 |
"collection[VARIABLE_DECLARATION]{collection, null, Ltest.MyCollection<Ljava.lang.String;Ljava.lang.String;>;, collection, null, " + (R_DEFAULT + R_INTERESTING + R_CASE + R_NON_RESTRICTED) + "}\n" + |
12100 |
"myCollection[VARIABLE_DECLARATION]{myCollection, null, Ltest.MyCollection<Ljava.lang.String;Ljava.lang.String;>;, myCollection, null, " + (R_DEFAULT + R_INTERESTING + R_CASE + R_NON_RESTRICTED) + "}", |
12101 |
requestor.getResults()); |
12102 |
} |
12018 |
//https://bugs.eclipse.org/bugs/show_bug.cgi?id=153130 |
12103 |
//https://bugs.eclipse.org/bugs/show_bug.cgi?id=153130 |
12019 |
public void testEC001() throws JavaModelException { |
12104 |
public void testEC001() throws JavaModelException { |
12020 |
this.workingCopies = new ICompilationUnit[1]; |
12105 |
this.workingCopies = new ICompilationUnit[1]; |