Lines 566-569
Link Here
|
566 |
" MissingType[TYPE_REF]{missing2.MissingType, missing2, Lmissing2.MissingType;, null, null, ["+start2+", "+end2+"], " + (relevance2) + "}", |
566 |
" MissingType[TYPE_REF]{missing2.MissingType, missing2, Lmissing2.MissingType;, null, null, ["+start2+", "+end2+"], " + (relevance2) + "}", |
567 |
requestor.getResults()); |
567 |
requestor.getResults()); |
568 |
} |
568 |
} |
|
|
569 |
//https://bugs.eclipse.org/bugs/show_bug.cgi?id=223479 |
570 |
public void test0013() throws JavaModelException { |
571 |
this.workingCopies = new ICompilationUnit[3]; |
572 |
this.workingCopies[0] = getWorkingCopy( |
573 |
"/Completion/src/test/Test.java", |
574 |
"package test;"+ |
575 |
"public class Test {\n" + |
576 |
" MissingType<Object>.Mem\n" + |
577 |
"}\n"); |
578 |
|
579 |
this.workingCopies[1] = getWorkingCopy( |
580 |
"/Completion/src/missing/MissingType.java", |
581 |
"package missing;"+ |
582 |
"public class MissingType<T> {\n" + |
583 |
" public class Member {}\n" + |
584 |
"}\n"); |
585 |
|
586 |
CompletionTestsRequestor2 requestor = new CompletionTestsRequestor2(true, false, true, false, true); |
587 |
requestor.allowAllRequiredProposals(); |
588 |
String str = this.workingCopies[0].getSource(); |
589 |
String completeBehind = "MissingType<Object>.Mem"; |
590 |
int cursorLocation = str.lastIndexOf(completeBehind) + completeBehind.length(); |
591 |
this.workingCopies[0].codeComplete(cursorLocation, requestor, this.wcOwner); |
592 |
|
593 |
int relevance1 = R_DEFAULT + R_RESOLVED + R_INTERESTING + R_CASE + R_NON_RESTRICTED; |
594 |
int start1 = str.lastIndexOf("Mem") + "".length(); |
595 |
int end1 = start1 + "Mem".length(); |
596 |
int start2 = str.indexOf("MissingType"); |
597 |
int end2 = start2 + "MissingType".length(); |
598 |
assertResults( |
599 |
"MissingType.Member[TYPE_REF]{Member, missing, Lmissing.MissingType$Member;, null, null, ["+start1+", "+end1+"], " + (relevance1) + "}\n" + |
600 |
" MissingType<T>[TYPE_REF]{missing.MissingType, missing, Lmissing.MissingType<TT;>;, null, null, ["+start2+", "+end2+"], " + (relevance1) + "}", |
601 |
requestor.getResults()); |
602 |
} |
603 |
//https://bugs.eclipse.org/bugs/show_bug.cgi?id=223479 |
604 |
public void test0014() throws JavaModelException { |
605 |
this.workingCopies = new ICompilationUnit[3]; |
606 |
this.workingCopies[0] = getWorkingCopy( |
607 |
"/Completion/src/test/Test.java", |
608 |
"package test;"+ |
609 |
"public class Test {\n" + |
610 |
" {\n" + |
611 |
" MissingType<Object>.Mem\n" + |
612 |
" }\n" + |
613 |
"}\n"); |
614 |
|
615 |
this.workingCopies[1] = getWorkingCopy( |
616 |
"/Completion/src/missing/MissingType.java", |
617 |
"package missing;"+ |
618 |
"public class MissingType<T> {\n" + |
619 |
" public class Member {}\n" + |
620 |
"}\n"); |
621 |
|
622 |
CompletionTestsRequestor2 requestor = new CompletionTestsRequestor2(true, false, true, false, true); |
623 |
requestor.allowAllRequiredProposals(); |
624 |
String str = this.workingCopies[0].getSource(); |
625 |
String completeBehind = "MissingType<Object>.Mem"; |
626 |
int cursorLocation = str.lastIndexOf(completeBehind) + completeBehind.length(); |
627 |
this.workingCopies[0].codeComplete(cursorLocation, requestor, this.wcOwner); |
628 |
|
629 |
int relevance1 = R_DEFAULT + R_RESOLVED + R_INTERESTING + R_CASE + R_NON_RESTRICTED; |
630 |
int start1 = str.lastIndexOf("Mem") + "".length(); |
631 |
int end1 = start1 + "Mem".length(); |
632 |
int start2 = str.indexOf("MissingType"); |
633 |
int end2 = start2 + "MissingType".length(); |
634 |
assertResults( |
635 |
"MissingType.Member[TYPE_REF]{Member, missing, Lmissing.MissingType$Member;, null, null, ["+start1+", "+end1+"], " + (relevance1) + "}\n" + |
636 |
" MissingType<T>[TYPE_REF]{missing.MissingType, missing, Lmissing.MissingType<TT;>;, null, null, ["+start2+", "+end2+"], " + (relevance1) + "}", |
637 |
requestor.getResults()); |
638 |
} |
569 |
} |
639 |
} |