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 |
} |
20769 |
} |
20829 |
} |