Lines 12369-12372
Link Here
|
12369 |
COMPLETION_PROJECT.setOptions(options); |
12369 |
COMPLETION_PROJECT.setOptions(options); |
12370 |
} |
12370 |
} |
12371 |
} |
12371 |
} |
|
|
12372 |
|
12373 |
// https://bugs.eclipse.org/bugs/show_bug.cgi?id=97085 |
12374 |
public void testPackageStaticImport1() throws JavaModelException { |
12375 |
this.workingCopies = new ICompilationUnit[2]; |
12376 |
this.workingCopies[0] = getWorkingCopy( |
12377 |
"/Completion/src/test/Test.java", |
12378 |
"package test;"+ |
12379 |
"import test0.tes"+ |
12380 |
"public class Test {\n"+ |
12381 |
"}"); |
12382 |
|
12383 |
this.workingCopies[1] = getWorkingCopy( |
12384 |
"/Completion/src/test0/test1/X.java", |
12385 |
"package test0/test1;"+ |
12386 |
"public class X {\n"+ |
12387 |
"}"); |
12388 |
|
12389 |
CompletionTestsRequestor2 requestor = new CompletionTestsRequestor2(true); |
12390 |
String str = this.workingCopies[0].getSource(); |
12391 |
String completeBehind = "test0.tes"; |
12392 |
int cursorLocation = str.lastIndexOf(completeBehind) + completeBehind.length(); |
12393 |
this.workingCopies[0].codeComplete(cursorLocation, requestor, this.wcOwner); |
12394 |
|
12395 |
assertResults( |
12396 |
"test0.test1[PACKAGE_REF]{test0.test1.*;, test0.test1, null, null, null, " + (R_DEFAULT + R_INTERESTING + R_CASE + R_NON_RESTRICTED) + "}", |
12397 |
requestor.getResults()); |
12398 |
} |
12399 |
// https://bugs.eclipse.org/bugs/show_bug.cgi?id=97085 |
12400 |
public void testPackageStaticImport2() throws JavaModelException { |
12401 |
this.workingCopies = new ICompilationUnit[2]; |
12402 |
this.workingCopies[0] = getWorkingCopy( |
12403 |
"/Completion/src/test/Test.java", |
12404 |
"package test;"+ |
12405 |
"import static test0.tes"+ |
12406 |
"public class Test {\n"+ |
12407 |
"}"); |
12408 |
|
12409 |
this.workingCopies[1] = getWorkingCopy( |
12410 |
"/Completion/src/test0/test1/X.java", |
12411 |
"package test0/test1;"+ |
12412 |
"public class X {\n"+ |
12413 |
"}"); |
12414 |
|
12415 |
CompletionTestsRequestor2 requestor = new CompletionTestsRequestor2(true); |
12416 |
String str = this.workingCopies[0].getSource(); |
12417 |
String completeBehind = "test0.tes"; |
12418 |
int cursorLocation = str.lastIndexOf(completeBehind) + completeBehind.length(); |
12419 |
this.workingCopies[0].codeComplete(cursorLocation, requestor, this.wcOwner); |
12420 |
|
12421 |
assertResults( |
12422 |
"test0.test1[PACKAGE_REF]{test0.test1., test0.test1, null, null, null, " + (R_DEFAULT + R_INTERESTING + R_CASE + R_NON_RESTRICTED) + "}", |
12423 |
requestor.getResults()); |
12424 |
} |
12372 |
} |
12425 |
} |