Lines 13462-13467
Link Here
|
13462 |
cu.codeComplete(cursorLocation, requestor); |
13462 |
cu.codeComplete(cursorLocation, requestor); |
13463 |
|
13463 |
|
13464 |
assertEquals( |
13464 |
assertEquals( |
|
|
13465 |
"element:bar completion:bar relevance:"+(R_DEFAULT + R_RESOLVED + R_INTERESTING + R_CASE + R_EXACT_NAME + R_NON_STATIC+ R_NON_RESTRICTED) +"\n"+ |
13465 |
"element:barPlus completion:barPlus() relevance:"+(R_DEFAULT + R_RESOLVED + R_INTERESTING + R_CASE + R_NON_STATIC+ R_NON_RESTRICTED), |
13466 |
"element:barPlus completion:barPlus() relevance:"+(R_DEFAULT + R_RESOLVED + R_INTERESTING + R_CASE + R_NON_STATIC+ R_NON_RESTRICTED), |
13466 |
requestor.getResults()); |
13467 |
requestor.getResults()); |
13467 |
} |
13468 |
} |
Lines 13475-13480
Link Here
|
13475 |
cu.codeComplete(cursorLocation, requestor); |
13476 |
cu.codeComplete(cursorLocation, requestor); |
13476 |
|
13477 |
|
13477 |
assertEquals( |
13478 |
assertEquals( |
|
|
13479 |
"element:bar completion:bar() relevance:"+(R_DEFAULT + R_RESOLVED + R_INTERESTING + R_CASE + R_EXACT_NAME + R_NON_STATIC+ R_NON_RESTRICTED) +"\n"+ |
13478 |
"element:barPlus completion:barPlus() relevance:"+(R_DEFAULT + R_RESOLVED + R_INTERESTING + R_CASE + R_NON_STATIC+ R_NON_RESTRICTED), |
13480 |
"element:barPlus completion:barPlus() relevance:"+(R_DEFAULT + R_RESOLVED + R_INTERESTING + R_CASE + R_NON_STATIC+ R_NON_RESTRICTED), |
13479 |
requestor.getResults()); |
13481 |
requestor.getResults()); |
13480 |
} |
13482 |
} |
Lines 13488-13496
Link Here
|
13488 |
cu.codeComplete(cursorLocation, requestor); |
13490 |
cu.codeComplete(cursorLocation, requestor); |
13489 |
|
13491 |
|
13490 |
assertEquals( |
13492 |
assertEquals( |
|
|
13493 |
"element:bar completion:bar() relevance:"+(R_DEFAULT + R_RESOLVED + R_INTERESTING + R_CASE + R_EXACT_NAME + R_NON_STATIC+ R_NON_RESTRICTED) +"\n"+ |
13491 |
"element:barPlus completion:barPlus() relevance:"+(R_DEFAULT + R_RESOLVED + R_INTERESTING + R_CASE + R_NON_STATIC+ R_NON_RESTRICTED), |
13494 |
"element:barPlus completion:barPlus() relevance:"+(R_DEFAULT + R_RESOLVED + R_INTERESTING + R_CASE + R_NON_STATIC+ R_NON_RESTRICTED), |
13492 |
requestor.getResults()); |
13495 |
requestor.getResults()); |
13493 |
} |
13496 |
} |
|
|
13497 |
public void testCompletionUnresolvedSuperclass() throws JavaModelException { |
13498 |
this.workingCopies = new ICompilationUnit[1]; |
13499 |
this.workingCopies[0] = getWorkingCopy( |
13500 |
"/Completion/src/test/Test.java", |
13501 |
"package test;"+ |
13502 |
"public class Test {\n" + |
13503 |
" public void foo(pack.Bin4 b) {\n" + |
13504 |
" b.bar\n" + |
13505 |
" }\n" + |
13506 |
"}\n"); |
13507 |
|
13508 |
CompletionTestsRequestor2 requestor = new CompletionTestsRequestor2(true); |
13509 |
String str = this.workingCopies[0].getSource(); |
13510 |
String completeBehind = "bar"; |
13511 |
int cursorLocation = str.lastIndexOf(completeBehind) + completeBehind.length(); |
13512 |
this.workingCopies[0].codeComplete(cursorLocation, requestor, this.wcOwner); |
13513 |
|
13514 |
assertResults( |
13515 |
"barPlus[METHOD_REF]{barPlus(), Lpack.Bin4;, ()V, barPlus, null, " + (R_DEFAULT + R_RESOLVED + R_INTERESTING + R_CASE + R_NON_STATIC + R_NON_RESTRICTED) + "}", |
13516 |
requestor.getResults()); |
13517 |
} |
13518 |
public void testCompletionUnresolvedSuperinteface() throws JavaModelException { |
13519 |
this.workingCopies = new ICompilationUnit[1]; |
13520 |
this.workingCopies[0] = getWorkingCopy( |
13521 |
"/Completion/src/test/Test.java", |
13522 |
"package test;"+ |
13523 |
"public class Test {\n" + |
13524 |
" public void foo(pack.Bin5 b) {\n" + |
13525 |
" b.bar\n" + |
13526 |
" }\n" + |
13527 |
"}\n"); |
13528 |
|
13529 |
CompletionTestsRequestor2 requestor = new CompletionTestsRequestor2(true); |
13530 |
String str = this.workingCopies[0].getSource(); |
13531 |
String completeBehind = "bar"; |
13532 |
int cursorLocation = str.lastIndexOf(completeBehind) + completeBehind.length(); |
13533 |
this.workingCopies[0].codeComplete(cursorLocation, requestor, this.wcOwner); |
13534 |
|
13535 |
assertResults( |
13536 |
"barPlus[METHOD_REF]{barPlus(), Lpack.Bin5;, ()V, barPlus, null, " + (R_DEFAULT + R_RESOLVED + R_INTERESTING + R_CASE + R_NON_STATIC + R_NON_RESTRICTED) + "}", |
13537 |
requestor.getResults()); |
13538 |
} |
13494 |
public void testCompletionVariableInitializerInInitializer1() throws JavaModelException { |
13539 |
public void testCompletionVariableInitializerInInitializer1() throws JavaModelException { |
13495 |
CompletionTestsRequestor requestor = new CompletionTestsRequestor(); |
13540 |
CompletionTestsRequestor requestor = new CompletionTestsRequestor(); |
13496 |
ICompilationUnit cu= getCompilationUnit("Completion", "src", "", "CompletionVariableInitializerInInitializer1.java"); |
13541 |
ICompilationUnit cu= getCompilationUnit("Completion", "src", "", "CompletionVariableInitializerInInitializer1.java"); |