Lines 18405-18408
Link Here
|
18405 |
"voidClass[TYPE_REF]{voidClass, test, Ltest.voidClass;, null, null, " + (R_DEFAULT + R_RESOLVED + R_INTERESTING + R_CASE + R_UNQUALIFIED + R_NON_RESTRICTED) + "}", |
18405 |
"voidClass[TYPE_REF]{voidClass, test, Ltest.voidClass;, null, null, " + (R_DEFAULT + R_RESOLVED + R_INTERESTING + R_CASE + R_UNQUALIFIED + R_NON_RESTRICTED) + "}", |
18406 |
requestor.getResults()); |
18406 |
requestor.getResults()); |
18407 |
} |
18407 |
} |
|
|
18408 |
//https://bugs.eclipse.org/bugs/show_bug.cgi?id=221215 |
18409 |
public void testInvalidField1() throws JavaModelException { |
18410 |
this.workingCopies = new ICompilationUnit[1]; |
18411 |
this.workingCopies[0] = getWorkingCopy( |
18412 |
"/Completion/src/test/Test.java", |
18413 |
"package test;"+ |
18414 |
"public class Event {\n" + |
18415 |
" public int x;\n" + |
18416 |
"\n" + |
18417 |
" public void handle(Event e) {\n" + |
18418 |
" e.x.e.foo();\n" + |
18419 |
" }\n" + |
18420 |
"}"); |
18421 |
CompletionTestsRequestor2 requestor = new CompletionTestsRequestor2(true); |
18422 |
String str = this.workingCopies[0].getSource(); |
18423 |
String completeBehind = "e.x.e."; |
18424 |
int cursorLocation = str.lastIndexOf(completeBehind) + completeBehind.length(); |
18425 |
this.workingCopies[0].codeComplete(cursorLocation, requestor, this.wcOwner); |
18426 |
|
18427 |
assertResults( |
18428 |
"", |
18429 |
requestor.getResults()); |
18430 |
} |
18431 |
//https://bugs.eclipse.org/bugs/show_bug.cgi?id=221215 - variation |
18432 |
public void testInvalidField2() throws JavaModelException { |
18433 |
this.workingCopies = new ICompilationUnit[1]; |
18434 |
this.workingCopies[0] = getWorkingCopy( |
18435 |
"/Completion/src/test/Test.java", |
18436 |
"package test;"+ |
18437 |
"public class Event {\n" + |
18438 |
" public int x;\n" + |
18439 |
"\n" + |
18440 |
" public void handle(Event e) {\n" + |
18441 |
" this.x.e.foo();\n" + |
18442 |
" }\n" + |
18443 |
"}"); |
18444 |
CompletionTestsRequestor2 requestor = new CompletionTestsRequestor2(true); |
18445 |
String str = this.workingCopies[0].getSource(); |
18446 |
String completeBehind = "this.x.e."; |
18447 |
int cursorLocation = str.lastIndexOf(completeBehind) + completeBehind.length(); |
18448 |
this.workingCopies[0].codeComplete(cursorLocation, requestor, this.wcOwner); |
18449 |
|
18450 |
assertResults( |
18451 |
"", |
18452 |
requestor.getResults()); |
18453 |
} |
18408 |
} |
18454 |
} |