Lines 20766-20769
Link Here
|
20766 |
"returnZero[METHOD_REF_WITH_CASTED_RECEIVER]{((CompletionAfterInstanceOf)a).returnZero(), Ltest.CompletionAfterInstanceOf;, ()I, Ltest.CompletionAfterInstanceOf;, returnZero, null, replace["+start2+", "+end2+"], token["+start1+", "+end1+"], receiver["+start3+", "+end3+"], " + (relevance1) + "}", |
20766 |
"returnZero[METHOD_REF_WITH_CASTED_RECEIVER]{((CompletionAfterInstanceOf)a).returnZero(), Ltest.CompletionAfterInstanceOf;, ()I, Ltest.CompletionAfterInstanceOf;, returnZero, null, replace["+start2+", "+end2+"], token["+start1+", "+end1+"], receiver["+start3+", "+end3+"], " + (relevance1) + "}", |
20767 |
requestor.getResults()); |
20767 |
requestor.getResults()); |
20768 |
} |
20768 |
} |
|
|
20769 |
|
20770 |
// https://bugs.eclipse.org/bugs/show_bug.cgi?id=202634 |
20771 |
public void testBug202634a() throws JavaModelException { |
20772 |
this.workingCopies = new ICompilationUnit[1]; |
20773 |
this.workingCopies[0] = getWorkingCopy( |
20774 |
"/Completion/src/test/Test.java", |
20775 |
"package test;\n" + |
20776 |
"public class Test {\n" + |
20777 |
" public static void bar(){" + |
20778 |
" System.out.println(\"bar\");\n" + |
20779 |
" }\n" + |
20780 |
" void foo() {\n" + |
20781 |
" sup\n" + |
20782 |
" }\n" + |
20783 |
"}\n"); |
20784 |
|
20785 |
CompletionTestsRequestor2 requestor = new CompletionTestsRequestor2(true, false, true, true, true, true); |
20786 |
requestor.allowAllRequiredProposals(); |
20787 |
String str = this.workingCopies[0].getSource(); |
20788 |
String completeBehind = "sup"; |
20789 |
int cursorLocation = str.lastIndexOf(completeBehind) + completeBehind.length(); |
20790 |
this.workingCopies[0].codeComplete(cursorLocation, requestor, this.wcOwner); |
20791 |
|
20792 |
int start1 = str.lastIndexOf("sup"); |
20793 |
int end1 = start1 + "sup".length(); |
20794 |
|
20795 |
assertResults( |
20796 |
"super[KEYWORD]{super, null, null, super, null, replace[" + start1 + ", " + end1 +"], token[" + start1 + ", " + end1 + "], " + (R_DEFAULT + R_RESOLVED + R_INTERESTING + R_CASE+ R_NON_RESTRICTED) + "}", |
20797 |
requestor.getResults()); |
20798 |
} |
20799 |
|
20800 |
// https://bugs.eclipse.org/bugs/show_bug.cgi?id=202634 |
20801 |
public void testBug202634b() throws JavaModelException { |
20802 |
this.workingCopies = new ICompilationUnit[1]; |
20803 |
this.workingCopies[0] = getWorkingCopy( |
20804 |
"/Completion/src/test/Test.java", |
20805 |
"package test;\n" + |
20806 |
"public class Test {\n" + |
20807 |
" void foo() {\n" + |
20808 |
" sup\n" + |
20809 |
" }\n" + |
20810 |
" public static void bar(){" + |
20811 |
" System.out.println(\"bar\");\n" + |
20812 |
" }\n" + |
20813 |
"}\n"); |
20814 |
|
20815 |
CompletionTestsRequestor2 requestor = new CompletionTestsRequestor2(true, false, true, true, true, true); |
20816 |
requestor.allowAllRequiredProposals(); |
20817 |
String str = this.workingCopies[0].getSource(); |
20818 |
String completeBehind = "sup"; |
20819 |
int cursorLocation = str.lastIndexOf(completeBehind) + completeBehind.length(); |
20820 |
this.workingCopies[0].codeComplete(cursorLocation, requestor, this.wcOwner); |
20821 |
|
20822 |
int start1 = str.lastIndexOf("sup"); |
20823 |
int end1 = start1 + "sup".length(); |
20824 |
|
20825 |
assertResults( |
20826 |
"super[KEYWORD]{super, null, null, super, null, replace[" + start1 + ", " + end1 +"], token[" + start1 + ", " + end1 + "], " + (R_DEFAULT + R_RESOLVED + R_INTERESTING + R_CASE+ R_NON_RESTRICTED) + "}", |
20827 |
requestor.getResults()); |
20828 |
} |
20829 |
|
20830 |
// https://bugs.eclipse.org/bugs/show_bug.cgi?id=202634 |
20831 |
public void testBug202634c() throws JavaModelException { |
20832 |
this.workingCopies = new ICompilationUnit[1]; |
20833 |
this.workingCopies[0] = getWorkingCopy( |
20834 |
"/Completion/src/test/Test.java", |
20835 |
"package test;\n" + |
20836 |
"public class Test {\n" + |
20837 |
" public static void bar(){" + |
20838 |
" System.out.println(\"bar\");\n" + |
20839 |
" }\n" + |
20840 |
" {" + |
20841 |
" sup" + |
20842 |
" }" + |
20843 |
"}\n"); |
20844 |
|
20845 |
CompletionTestsRequestor2 requestor = new CompletionTestsRequestor2(true, false, true, true, true, true); |
20846 |
requestor.allowAllRequiredProposals(); |
20847 |
String str = this.workingCopies[0].getSource(); |
20848 |
String completeBehind = "sup"; |
20849 |
int cursorLocation = str.lastIndexOf(completeBehind) + completeBehind.length(); |
20850 |
this.workingCopies[0].codeComplete(cursorLocation, requestor, this.wcOwner); |
20851 |
|
20852 |
int start1 = str.lastIndexOf("sup"); |
20853 |
int end1 = start1 + "sup".length(); |
20854 |
|
20855 |
assertResults( |
20856 |
"super[KEYWORD]{super, null, null, super, null, replace[" + start1 + ", " + end1 +"], token[" + start1 + ", " + end1 + "], " + (R_DEFAULT + R_RESOLVED + R_INTERESTING + R_CASE+ R_NON_RESTRICTED) + "}", |
20857 |
requestor.getResults()); |
20858 |
} |
20859 |
|
20860 |
// https://bugs.eclipse.org/bugs/show_bug.cgi?id=202634 |
20861 |
public void testBug202634d() throws JavaModelException { |
20862 |
this.workingCopies = new ICompilationUnit[1]; |
20863 |
this.workingCopies[0] = getWorkingCopy( |
20864 |
"/Completion/src/test/Test.java", |
20865 |
"package test;\n" + |
20866 |
"public class Test {\n" + |
20867 |
" public static void bar(){" + |
20868 |
" System.out.println(\"bar\");\n" + |
20869 |
" }\n" + |
20870 |
" Test() {" + |
20871 |
" sup" + |
20872 |
" }" + |
20873 |
"}\n"); |
20874 |
|
20875 |
CompletionTestsRequestor2 requestor = new CompletionTestsRequestor2(true, false, true, true, true, true); |
20876 |
requestor.allowAllRequiredProposals(); |
20877 |
String str = this.workingCopies[0].getSource(); |
20878 |
String completeBehind = "sup"; |
20879 |
int cursorLocation = str.lastIndexOf(completeBehind) + completeBehind.length(); |
20880 |
this.workingCopies[0].codeComplete(cursorLocation, requestor, this.wcOwner); |
20881 |
|
20882 |
int start1 = str.lastIndexOf("sup"); |
20883 |
int end1 = start1 + "sup".length(); |
20884 |
|
20885 |
assertResults( |
20886 |
"super[KEYWORD]{super, null, null, super, null, replace[" + start1 + ", " + end1 +"], token[" + start1 + ", " + end1 + "], " + (R_DEFAULT + R_RESOLVED + R_INTERESTING + R_CASE+ R_NON_RESTRICTED) + "}\n" + |
20887 |
"super[METHOD_REF<CONSTRUCTOR>]{super(), Ljava.lang.Object;, ()V, super, null, replace[" + start1 + ", " + end1 + "], token[" + start1 + ", " + end1 + "], " + (R_DEFAULT + R_RESOLVED + R_INTERESTING + R_CASE+ R_NON_RESTRICTED) + "}", |
20888 |
requestor.getResults()); |
20889 |
} |
20890 |
|
20891 |
// https://bugs.eclipse.org/bugs/show_bug.cgi?id=202634 |
20892 |
public void testBug202634e() throws JavaModelException { |
20893 |
this.workingCopies = new ICompilationUnit[1]; |
20894 |
this.workingCopies[0] = getWorkingCopy( |
20895 |
"/Completion/src/test/Test.java", |
20896 |
"package test;\n" + |
20897 |
"public class Test {\n" + |
20898 |
" public static void bar(){" + |
20899 |
" System.out.println(\"bar\");\n" + |
20900 |
" }\n" + |
20901 |
" {" + |
20902 |
" thi" + |
20903 |
" }" + |
20904 |
"}\n"); |
20905 |
|
20906 |
CompletionTestsRequestor2 requestor = new CompletionTestsRequestor2(true, false, true, true, true, true); |
20907 |
requestor.allowAllRequiredProposals(); |
20908 |
String str = this.workingCopies[0].getSource(); |
20909 |
String completeBehind = "thi"; |
20910 |
int cursorLocation = str.lastIndexOf(completeBehind) + completeBehind.length(); |
20911 |
this.workingCopies[0].codeComplete(cursorLocation, requestor, this.wcOwner); |
20912 |
|
20913 |
int start1 = str.lastIndexOf("thi"); |
20914 |
int end1 = start1 + "thi".length(); |
20915 |
|
20916 |
assertResults( |
20917 |
"this[KEYWORD]{this, null, null, this, null, replace[" + start1 + ", " + end1 +"], token[" + start1 + ", " + end1 + "], " + (R_DEFAULT + R_RESOLVED + R_INTERESTING + R_CASE+ R_NON_RESTRICTED) + "}", |
20918 |
requestor.getResults()); |
20919 |
} |
20920 |
|
20921 |
// https://bugs.eclipse.org/bugs/show_bug.cgi?id=202634 |
20922 |
public void testBug202634f() throws JavaModelException { |
20923 |
this.workingCopies = new ICompilationUnit[1]; |
20924 |
this.workingCopies[0] = getWorkingCopy( |
20925 |
"/Completion/src/test/Test.java", |
20926 |
"package test;\n" + |
20927 |
"public class Test {\n" + |
20928 |
" public static void bar(){" + |
20929 |
" System.out.println(\"bar\");\n" + |
20930 |
" }\n" + |
20931 |
" Test() {" + |
20932 |
" thi" + |
20933 |
" }" + |
20934 |
"}\n"); |
20935 |
|
20936 |
CompletionTestsRequestor2 requestor = new CompletionTestsRequestor2(true, false, true, true, true, true); |
20937 |
requestor.allowAllRequiredProposals(); |
20938 |
String str = this.workingCopies[0].getSource(); |
20939 |
String completeBehind = "thi"; |
20940 |
int cursorLocation = str.lastIndexOf(completeBehind) + completeBehind.length(); |
20941 |
this.workingCopies[0].codeComplete(cursorLocation, requestor, this.wcOwner); |
20942 |
|
20943 |
int start1 = str.lastIndexOf("thi"); |
20944 |
int end1 = start1 + "thi".length(); |
20945 |
|
20946 |
assertResults( |
20947 |
"this[KEYWORD]{this, null, null, this, null, replace[" + start1 + ", " + end1 +"], token[" + start1 + ", " + end1 + "], " + (R_DEFAULT + R_RESOLVED + R_INTERESTING + R_CASE+ R_NON_RESTRICTED) + "}", |
20948 |
requestor.getResults()); |
20949 |
} |
20769 |
} |
20950 |
} |