Lines 11685-11690
Link Here
|
11685 |
} |
11685 |
} |
11686 |
} |
11686 |
} |
11687 |
} |
11687 |
} |
|
|
11688 |
//https://bugs.eclipse.org/bugs/show_bug.cgi?id=164311 |
11689 |
public void testBug164311() throws JavaModelException { |
11690 |
this.workingCopies = new ICompilationUnit[1]; |
11691 |
this.workingCopies[0] = getWorkingCopy( |
11692 |
"/Completion/src/test/Test.java", |
11693 |
"package test;"+ |
11694 |
"public class Test {\n" + |
11695 |
" public int zzzzzz;\n" + |
11696 |
" public void method1() {\n" + |
11697 |
" label : if (0> (10));\n" + |
11698 |
" zzz\n" + |
11699 |
" }\n" + |
11700 |
"}\n"); |
11701 |
|
11702 |
CompletionTestsRequestor2 requestor = new CompletionTestsRequestor2(true); |
11703 |
String str = this.workingCopies[0].getSource(); |
11704 |
String completeBehind = "zzz"; |
11705 |
int cursorLocation = str.lastIndexOf(completeBehind) + completeBehind.length(); |
11706 |
this.workingCopies[0].codeComplete(cursorLocation, requestor, this.wcOwner); |
11707 |
|
11708 |
assertResults( |
11709 |
"zzzzzz[FIELD_REF]{zzzzzz, Ltest.Test;, I, zzzzzz, null, " + (R_DEFAULT + R_INTERESTING + R_CASE + R_UNQUALIFIED + R_NON_RESTRICTED) + "}", |
11710 |
requestor.getResults()); |
11711 |
} |
11712 |
//https://bugs.eclipse.org/bugs/show_bug.cgi?id=164311 |
11713 |
//https://bugs.eclipse.org/bugs/show_bug.cgi?id=167750 |
11714 |
public void testBug164311_2() throws JavaModelException { |
11715 |
this.workingCopies = new ICompilationUnit[1]; |
11716 |
this.workingCopies[0] = getWorkingCopy( |
11717 |
"/Completion/src/test/Test.java", |
11718 |
"package test;\n"+ |
11719 |
"public class X {\n"+ |
11720 |
" public void zork() { \n"+ |
11721 |
" } \n"+ |
11722 |
" public void foo() { \n"+ |
11723 |
" this.foo(new Object(){\n"+ |
11724 |
" public void bar() {\n"+ |
11725 |
" if (zzz>(Integer)vvv.foo(i)) {\n"+ |
11726 |
" return;\n"+ |
11727 |
" }\n"+ |
11728 |
" if (true) {\n"+ |
11729 |
" return;\n"+ |
11730 |
" }\n"+ |
11731 |
" zor\n"+ |
11732 |
" } \n"+ |
11733 |
" });\n"+ |
11734 |
" }\n"+ |
11735 |
"}\n"); |
11736 |
|
11737 |
CompletionTestsRequestor2 requestor = new CompletionTestsRequestor2(true); |
11738 |
String str = this.workingCopies[0].getSource(); |
11739 |
String completeBehind = "zor"; |
11740 |
int cursorLocation = str.lastIndexOf(completeBehind) + completeBehind.length(); |
11741 |
this.workingCopies[0].codeComplete(cursorLocation, requestor, this.wcOwner); |
11742 |
|
11743 |
assertResults( |
11744 |
"zork[METHOD_REF]{zork(), Ltest.X;, ()V, zork, null, " + (R_DEFAULT + R_INTERESTING + R_CASE + R_UNQUALIFIED + R_NON_RESTRICTED) + "}", |
11745 |
requestor.getResults()); |
11746 |
} |
11688 |
public void testCompletionImportedType1() throws JavaModelException { |
11747 |
public void testCompletionImportedType1() throws JavaModelException { |
11689 |
this.workingCopies = new ICompilationUnit[2]; |
11748 |
this.workingCopies = new ICompilationUnit[2]; |
11690 |
this.workingCopies[0] = getWorkingCopy( |
11749 |
this.workingCopies[0] = getWorkingCopy( |