Lines 2111-2117
Link Here
|
2111 |
this.workingCopies[0].codeComplete(cursorLocation, requestor, this.wcOwner); |
2111 |
this.workingCopies[0].codeComplete(cursorLocation, requestor, this.wcOwner); |
2112 |
|
2112 |
|
2113 |
assertResults( |
2113 |
assertResults( |
2114 |
"QQAnnotation[TYPE_REF]{pkgannotations.QQAnnotation, pkgannotations, Lpkgannotations.QQAnnotation;, null, null, " + (R_DEFAULT + R_RESOLVED + R_INTERESTING + R_CASE + R_ANNOTATION + R_NON_RESTRICTED) + "}", |
2114 |
"QQAnnotation[TYPE_REF]{pkgannotations.QQAnnotation, pkgannotations, Lpkgannotations.QQAnnotation;, null, null, " + (R_DEFAULT + R_RESOLVED + R_INTERESTING + R_CASE + R_ANNOTATION + R_TARGET + R_NON_RESTRICTED) + "}", |
2115 |
requestor.getResults()); |
2115 |
requestor.getResults()); |
2116 |
} |
2116 |
} |
2117 |
public void test0076() throws JavaModelException { |
2117 |
public void test0076() throws JavaModelException { |
Lines 2135-2141
Link Here
|
2135 |
this.workingCopies[0].codeComplete(cursorLocation, requestor, this.wcOwner); |
2135 |
this.workingCopies[0].codeComplete(cursorLocation, requestor, this.wcOwner); |
2136 |
|
2136 |
|
2137 |
assertResults( |
2137 |
assertResults( |
2138 |
"QQAnnotation[TYPE_REF]{pkgannotations.QQAnnotation, pkgannotations, Lpkgannotations.QQAnnotation;, null, null, " + (R_DEFAULT + R_RESOLVED + R_INTERESTING + R_CASE + R_ANNOTATION + R_NON_RESTRICTED) + "}", |
2138 |
"QQAnnotation[TYPE_REF]{pkgannotations.QQAnnotation, pkgannotations, Lpkgannotations.QQAnnotation;, null, null, " + (R_DEFAULT + R_RESOLVED + R_INTERESTING + R_CASE + R_ANNOTATION + R_TARGET + R_NON_RESTRICTED) + "}", |
2139 |
requestor.getResults()); |
2139 |
requestor.getResults()); |
2140 |
} |
2140 |
} |
2141 |
public void test0077() throws JavaModelException { |
2141 |
public void test0077() throws JavaModelException { |
Lines 2186-2192
Link Here
|
2186 |
this.workingCopies[0].codeComplete(cursorLocation, requestor, this.wcOwner); |
2186 |
this.workingCopies[0].codeComplete(cursorLocation, requestor, this.wcOwner); |
2187 |
|
2187 |
|
2188 |
assertResults( |
2188 |
assertResults( |
2189 |
"QQAnnotation[TYPE_REF]{pkgannotations.QQAnnotation, pkgannotations, Lpkgannotations.QQAnnotation;, null, null, " + (R_DEFAULT + R_RESOLVED + R_INTERESTING + R_CASE + R_ANNOTATION + R_NON_RESTRICTED) + "}", |
2189 |
"QQAnnotation[TYPE_REF]{pkgannotations.QQAnnotation, pkgannotations, Lpkgannotations.QQAnnotation;, null, null, " + (R_DEFAULT + R_RESOLVED + R_INTERESTING + R_CASE + R_ANNOTATION + R_TARGET + R_NON_RESTRICTED) + "}", |
2190 |
requestor.getResults()); |
2190 |
requestor.getResults()); |
2191 |
} |
2191 |
} |
2192 |
public void test0079() throws JavaModelException { |
2192 |
public void test0079() throws JavaModelException { |
Lines 2211-2217
Link Here
|
2211 |
this.workingCopies[0].codeComplete(cursorLocation, requestor, this.wcOwner); |
2211 |
this.workingCopies[0].codeComplete(cursorLocation, requestor, this.wcOwner); |
2212 |
|
2212 |
|
2213 |
assertResults( |
2213 |
assertResults( |
2214 |
"QQAnnotation[TYPE_REF]{pkgannotations.QQAnnotation, pkgannotations, Lpkgannotations.QQAnnotation;, null, null, " + (R_DEFAULT + R_RESOLVED + R_INTERESTING + R_CASE + R_ANNOTATION + R_NON_RESTRICTED) + "}", |
2214 |
"QQAnnotation[TYPE_REF]{pkgannotations.QQAnnotation, pkgannotations, Lpkgannotations.QQAnnotation;, null, null, " + (R_DEFAULT + R_RESOLVED + R_INTERESTING + R_CASE + R_ANNOTATION + R_TARGET + R_NON_RESTRICTED) + "}", |
2215 |
requestor.getResults()); |
2215 |
requestor.getResults()); |
2216 |
} |
2216 |
} |
2217 |
public void test0080() throws JavaModelException { |
2217 |
public void test0080() throws JavaModelException { |
Lines 2236-2242
Link Here
|
2236 |
this.workingCopies[0].codeComplete(cursorLocation, requestor, this.wcOwner); |
2236 |
this.workingCopies[0].codeComplete(cursorLocation, requestor, this.wcOwner); |
2237 |
|
2237 |
|
2238 |
assertResults( |
2238 |
assertResults( |
2239 |
"QQAnnotation[TYPE_REF]{pkgannotations.QQAnnotation, pkgannotations, Lpkgannotations.QQAnnotation;, null, null, " + (R_DEFAULT + R_RESOLVED + R_INTERESTING + R_CASE + R_ANNOTATION + R_NON_RESTRICTED) + "}", |
2239 |
"QQAnnotation[TYPE_REF]{pkgannotations.QQAnnotation, pkgannotations, Lpkgannotations.QQAnnotation;, null, null, " + (R_DEFAULT + R_RESOLVED + R_INTERESTING + R_CASE + R_ANNOTATION + R_TARGET + R_NON_RESTRICTED) + "}", |
2240 |
requestor.getResults()); |
2240 |
requestor.getResults()); |
2241 |
} |
2241 |
} |
2242 |
public void test0081() throws JavaModelException { |
2242 |
public void test0081() throws JavaModelException { |
Lines 2261-2267
Link Here
|
2261 |
this.workingCopies[0].codeComplete(cursorLocation, requestor, this.wcOwner); |
2261 |
this.workingCopies[0].codeComplete(cursorLocation, requestor, this.wcOwner); |
2262 |
|
2262 |
|
2263 |
assertResults( |
2263 |
assertResults( |
2264 |
"QQAnnotation[TYPE_REF]{pkgannotations.QQAnnotation, pkgannotations, Lpkgannotations.QQAnnotation;, null, null, " + (R_DEFAULT + R_RESOLVED + R_INTERESTING + R_CASE + R_ANNOTATION + R_NON_RESTRICTED) + "}", |
2264 |
"QQAnnotation[TYPE_REF]{pkgannotations.QQAnnotation, pkgannotations, Lpkgannotations.QQAnnotation;, null, null, " + (R_DEFAULT + R_RESOLVED + R_INTERESTING + R_CASE + R_ANNOTATION + R_TARGET + R_NON_RESTRICTED) + "}", |
2265 |
requestor.getResults()); |
2265 |
requestor.getResults()); |
2266 |
} |
2266 |
} |
2267 |
public void test0082() throws JavaModelException { |
2267 |
public void test0082() throws JavaModelException { |
Lines 2287-2293
Link Here
|
2287 |
this.workingCopies[0].codeComplete(cursorLocation, requestor, this.wcOwner); |
2287 |
this.workingCopies[0].codeComplete(cursorLocation, requestor, this.wcOwner); |
2288 |
|
2288 |
|
2289 |
assertResults( |
2289 |
assertResults( |
2290 |
"QQAnnotation[TYPE_REF]{pkgannotations.QQAnnotation, pkgannotations, Lpkgannotations.QQAnnotation;, null, null, " + (R_DEFAULT + R_RESOLVED + R_INTERESTING + R_CASE + R_ANNOTATION + R_NON_RESTRICTED) + "}", |
2290 |
"QQAnnotation[TYPE_REF]{pkgannotations.QQAnnotation, pkgannotations, Lpkgannotations.QQAnnotation;, null, null, " + (R_DEFAULT + R_RESOLVED + R_INTERESTING + R_CASE + R_ANNOTATION + R_TARGET + R_NON_RESTRICTED) + "}", |
2291 |
requestor.getResults()); |
2291 |
requestor.getResults()); |
2292 |
} |
2292 |
} |
2293 |
public void test0083() throws JavaModelException { |
2293 |
public void test0083() throws JavaModelException { |
Lines 2367-2373
Link Here
|
2367 |
this.wc.codeComplete(cursorLocation, requestor); |
2367 |
this.wc.codeComplete(cursorLocation, requestor); |
2368 |
|
2368 |
|
2369 |
assertResults( |
2369 |
assertResults( |
2370 |
"TestAnnotation[TYPE_REF]{TestAnnotation, test0085, Ltest0085.TestAnnotation;, null, null, " + (R_DEFAULT + R_RESOLVED + R_INTERESTING + R_CASE + R_ANNOTATION + R_NON_RESTRICTED + R_UNQUALIFIED) + "}", |
2370 |
"TestAnnotation[TYPE_REF]{TestAnnotation, test0085, Ltest0085.TestAnnotation;, null, null, " + (R_DEFAULT + R_RESOLVED + R_INTERESTING + R_CASE + R_ANNOTATION + R_TARGET + R_NON_RESTRICTED + R_UNQUALIFIED) + "}", |
2371 |
requestor.getResults()); |
2371 |
requestor.getResults()); |
2372 |
} |
2372 |
} |
2373 |
//https://bugs.eclipse.org/bugs/show_bug.cgi?id=85290 |
2373 |
//https://bugs.eclipse.org/bugs/show_bug.cgi?id=85290 |
Lines 2388-2394
Link Here
|
2388 |
this.wc.codeComplete(cursorLocation, requestor); |
2388 |
this.wc.codeComplete(cursorLocation, requestor); |
2389 |
|
2389 |
|
2390 |
assertResults( |
2390 |
assertResults( |
2391 |
"TestAnnotation[TYPE_REF]{TestAnnotation, , LTestAnnotation;, null, null, " + (R_DEFAULT + R_RESOLVED + R_INTERESTING + R_CASE + R_ANNOTATION + R_NON_RESTRICTED + R_UNQUALIFIED) + "}", |
2391 |
"TestAnnotation[TYPE_REF]{TestAnnotation, , LTestAnnotation;, null, null, " + (R_DEFAULT + R_RESOLVED + R_INTERESTING + R_CASE + R_ANNOTATION + R_TARGET + R_NON_RESTRICTED + R_UNQUALIFIED) + "}", |
2392 |
requestor.getResults()); |
2392 |
requestor.getResults()); |
2393 |
} |
2393 |
} |
2394 |
//https://bugs.eclipse.org/bugs/show_bug.cgi?id=85402 |
2394 |
//https://bugs.eclipse.org/bugs/show_bug.cgi?id=85402 |
Lines 2415-2421
Link Here
|
2415 |
requestor.getResults()); |
2415 |
requestor.getResults()); |
2416 |
} else { |
2416 |
} else { |
2417 |
assertResults( |
2417 |
assertResults( |
2418 |
"TestAnnotation[TYPE_REF]{TestAnnotation, test0087, Ltest0087.TestAnnotation;, null, null, " + (R_DEFAULT + R_RESOLVED + R_INTERESTING + R_CASE + R_ANNOTATION + R_NON_RESTRICTED + R_UNQUALIFIED) + "}", |
2418 |
"TestAnnotation[TYPE_REF]{TestAnnotation, test0087, Ltest0087.TestAnnotation;, null, null, " + (R_DEFAULT + R_RESOLVED + R_INTERESTING + R_CASE + R_ANNOTATION + R_TARGET + R_NON_RESTRICTED + R_UNQUALIFIED) + "}", |
2419 |
requestor.getResults()); |
2419 |
requestor.getResults()); |
2420 |
} |
2420 |
} |
2421 |
} |
2421 |
} |
Lines 6634-6640
Link Here
|
6634 |
result.context); |
6634 |
result.context); |
6635 |
|
6635 |
|
6636 |
assertResults( |
6636 |
assertResults( |
6637 |
"ZZType.ZZAnnotation[TYPE_REF]{p.ZZType.ZZAnnotation, p, Lp.ZZType$ZZAnnotation;, null, null, " + (R_DEFAULT + R_RESOLVED + R_INTERESTING + R_CASE + R_ANNOTATION + R_NON_RESTRICTED) + "}", |
6637 |
"ZZType.ZZAnnotation[TYPE_REF]{p.ZZType.ZZAnnotation, p, Lp.ZZType$ZZAnnotation;, null, null, " + (R_DEFAULT + R_RESOLVED + R_INTERESTING + R_CASE + R_ANNOTATION + R_TARGET + R_NON_RESTRICTED) + "}", |
6638 |
result.proposals); |
6638 |
result.proposals); |
6639 |
} finally { |
6639 |
} finally { |
6640 |
if(aType != null) { |
6640 |
if(aType != null) { |
Lines 9007-9013
Link Here
|
9007 |
this.workingCopies[0].codeComplete(cursorLocation, requestor, this.wcOwner); |
9007 |
this.workingCopies[0].codeComplete(cursorLocation, requestor, this.wcOwner); |
9008 |
|
9008 |
|
9009 |
assertResults( |
9009 |
assertResults( |
9010 |
"QQAnnotation[TYPE_REF]{pkgannotations.QQAnnotation, pkgannotations, Lpkgannotations.QQAnnotation;, null, null, " + (R_DEFAULT + R_RESOLVED + R_INTERESTING + R_CASE + R_ANNOTATION + R_NON_RESTRICTED) + "}", |
9010 |
"QQAnnotation[TYPE_REF]{pkgannotations.QQAnnotation, pkgannotations, Lpkgannotations.QQAnnotation;, null, null, " + (R_DEFAULT + R_RESOLVED + R_INTERESTING + R_CASE + R_ANNOTATION + R_TARGET + R_NON_RESTRICTED) + "}", |
9011 |
requestor.getResults()); |
9011 |
requestor.getResults()); |
9012 |
} |
9012 |
} |
9013 |
//https://bugs.eclipse.org/bugs/show_bug.cgi?id=123225 |
9013 |
//https://bugs.eclipse.org/bugs/show_bug.cgi?id=123225 |
Lines 9437-9442
Link Here
|
9437 |
"Top<java.lang.Object>.IZZException[TYPE_REF]{test.Top.IZZException, test, Ltest.Top<Ljava.lang.Object;>.IZZException;, null, null, " + (R_DEFAULT + R_RESOLVED + R_INTERESTING + R_CASE + R_EXCEPTION + R_EXACT_EXPECTED_TYPE + R_NON_RESTRICTED) + "}", |
9437 |
"Top<java.lang.Object>.IZZException[TYPE_REF]{test.Top.IZZException, test, Ltest.Top<Ljava.lang.Object;>.IZZException;, null, null, " + (R_DEFAULT + R_RESOLVED + R_INTERESTING + R_CASE + R_EXCEPTION + R_EXACT_EXPECTED_TYPE + R_NON_RESTRICTED) + "}", |
9438 |
requestor.getResults()); |
9438 |
requestor.getResults()); |
9439 |
} |
9439 |
} |
|
|
9440 |
//https://bugs.eclipse.org/bugs/show_bug.cgi?id=158985 |
9441 |
public void test0301() throws JavaModelException { |
9442 |
this.workingCopies = new ICompilationUnit[3]; |
9443 |
this.workingCopies[0] = getWorkingCopy( |
9444 |
"/Completion/src3/test/Test.java", |
9445 |
"package test;\n" + |
9446 |
"public class Test {\n" + |
9447 |
" @ZZZ\n" + |
9448 |
" public void method() {\n" + |
9449 |
" }\n" + |
9450 |
"}"); |
9451 |
|
9452 |
this.workingCopies[1] = getWorkingCopy( |
9453 |
"/Completion/src3/p/ZZZ1.java", |
9454 |
"package p;\n" + |
9455 |
"public @interface ZZZ1 {\n" + |
9456 |
"}"); |
9457 |
|
9458 |
this.workingCopies[2] = getWorkingCopy( |
9459 |
"/Completion/src3/p/ZZZ2.java", |
9460 |
"package p;\n" + |
9461 |
"public @interface ZZZ2 {\n" + |
9462 |
"}"); |
9463 |
|
9464 |
CompletionTestsRequestor2 requestor = new CompletionTestsRequestor2(true); |
9465 |
String str = this.workingCopies[0].getSource(); |
9466 |
String completeBehind = "ZZZ"; |
9467 |
int cursorLocation = str.lastIndexOf(completeBehind) + completeBehind.length(); |
9468 |
this.workingCopies[0].codeComplete(cursorLocation, requestor, this.wcOwner); |
9469 |
|
9470 |
assertResults( |
9471 |
"ZZZ1[TYPE_REF]{p.ZZZ1, p, Lp.ZZZ1;, null, null, " + (R_DEFAULT + R_RESOLVED + R_INTERESTING + R_CASE + R_ANNOTATION + R_TARGET + R_NON_RESTRICTED) + "}\n" + |
9472 |
"ZZZ2[TYPE_REF]{p.ZZZ2, p, Lp.ZZZ2;, null, null, " + (R_DEFAULT + R_RESOLVED + R_INTERESTING + R_CASE + R_ANNOTATION + R_TARGET + R_NON_RESTRICTED) + "}", |
9473 |
requestor.getResults()); |
9474 |
} |
9475 |
//https://bugs.eclipse.org/bugs/show_bug.cgi?id=158985 |
9476 |
public void test0302() throws JavaModelException { |
9477 |
this.workingCopies = new ICompilationUnit[3]; |
9478 |
this.workingCopies[0] = getWorkingCopy( |
9479 |
"/Completion/src3/test/Test.java", |
9480 |
"package test;\n" + |
9481 |
"public class Test {\n" + |
9482 |
" @ZZZ\n" + |
9483 |
" public void method() {\n" + |
9484 |
" }\n" + |
9485 |
"}"); |
9486 |
|
9487 |
this.workingCopies[1] = getWorkingCopy( |
9488 |
"/Completion/src3/p/ZZZ1.java", |
9489 |
"package p;\n" + |
9490 |
"@java.lang.annotation.Target({java.lang.annotation.ElementType.TYPE})\n" + |
9491 |
"public @interface ZZZ1 {\n" + |
9492 |
"}"); |
9493 |
|
9494 |
this.workingCopies[2] = getWorkingCopy( |
9495 |
"/Completion/src3/p/ZZZ2.java", |
9496 |
"package p;\n" + |
9497 |
"public @interface ZZZ2 {\n" + |
9498 |
"}"); |
9499 |
|
9500 |
CompletionTestsRequestor2 requestor = new CompletionTestsRequestor2(true); |
9501 |
String str = this.workingCopies[0].getSource(); |
9502 |
String completeBehind = "ZZZ"; |
9503 |
int cursorLocation = str.lastIndexOf(completeBehind) + completeBehind.length(); |
9504 |
this.workingCopies[0].codeComplete(cursorLocation, requestor, this.wcOwner); |
9505 |
|
9506 |
assertResults( |
9507 |
"ZZZ1[TYPE_REF]{p.ZZZ1, p, Lp.ZZZ1;, null, null, " + (R_DEFAULT + R_RESOLVED + R_INTERESTING + R_CASE + R_ANNOTATION + R_NON_RESTRICTED) + "}\n" + |
9508 |
"ZZZ2[TYPE_REF]{p.ZZZ2, p, Lp.ZZZ2;, null, null, " + (R_DEFAULT + R_RESOLVED + R_INTERESTING + R_CASE + R_ANNOTATION + R_TARGET + R_NON_RESTRICTED) + "}", |
9509 |
requestor.getResults()); |
9510 |
} |
9511 |
//https://bugs.eclipse.org/bugs/show_bug.cgi?id=158985 |
9512 |
public void test0303() throws JavaModelException { |
9513 |
this.workingCopies = new ICompilationUnit[3]; |
9514 |
this.workingCopies[0] = getWorkingCopy( |
9515 |
"/Completion/src3/test/Test.java", |
9516 |
"package test;\n" + |
9517 |
"public class Test {\n" + |
9518 |
" @ZZZ\n" + |
9519 |
" public void method() {\n" + |
9520 |
" }\n" + |
9521 |
"}"); |
9522 |
|
9523 |
this.workingCopies[1] = getWorkingCopy( |
9524 |
"/Completion/src3/p/TOPZZZ1.java", |
9525 |
"package p;\n" + |
9526 |
"public class TOPZZZ1 {\n" + |
9527 |
" @java.lang.annotation.Target({java.lang.annotation.ElementType.TYPE})\n" + |
9528 |
" public @interface ZZZ1 {\n" + |
9529 |
" }\n" + |
9530 |
"}"); |
9531 |
|
9532 |
this.workingCopies[2] = getWorkingCopy( |
9533 |
"/Completion/src3/p/TOPZZZ2.java", |
9534 |
"package p;\n" + |
9535 |
"public class TOPZZZ2 {\n" + |
9536 |
" public @interface ZZZ2 {\n" + |
9537 |
" }\n" + |
9538 |
"}"); |
9539 |
|
9540 |
CompletionTestsRequestor2 requestor = new CompletionTestsRequestor2(true); |
9541 |
String str = this.workingCopies[0].getSource(); |
9542 |
String completeBehind = "ZZZ"; |
9543 |
int cursorLocation = str.lastIndexOf(completeBehind) + completeBehind.length(); |
9544 |
this.workingCopies[0].codeComplete(cursorLocation, requestor, this.wcOwner); |
9545 |
|
9546 |
assertResults( |
9547 |
"TOPZZZ1.ZZZ1[TYPE_REF]{p.TOPZZZ1.ZZZ1, p, Lp.TOPZZZ1$ZZZ1;, null, null, " + (R_DEFAULT + R_RESOLVED + R_INTERESTING + R_CASE + R_ANNOTATION + R_NON_RESTRICTED) + "}\n" + |
9548 |
"TOPZZZ2.ZZZ2[TYPE_REF]{p.TOPZZZ2.ZZZ2, p, Lp.TOPZZZ2$ZZZ2;, null, null, " + (R_DEFAULT + R_RESOLVED + R_INTERESTING + R_CASE + R_ANNOTATION + R_TARGET + R_NON_RESTRICTED) + "}", |
9549 |
requestor.getResults()); |
9550 |
} |
9551 |
//https://bugs.eclipse.org/bugs/show_bug.cgi?id=158985 |
9552 |
public void test0304() throws JavaModelException { |
9553 |
this.workingCopies = new ICompilationUnit[1]; |
9554 |
this.workingCopies[0] = getWorkingCopy( |
9555 |
"/Completion/src3/test/Test.java", |
9556 |
"package test;\n" + |
9557 |
"@java.lang.annotation.Target({java.lang.annotation.ElementType.TYPE})\n" + |
9558 |
"@interface ZZZ1 {\n" + |
9559 |
"}\n" + |
9560 |
"@interface ZZZ2 {\n" + |
9561 |
"}\n" + |
9562 |
"public class Test {\n" + |
9563 |
" @ZZZ\n" + |
9564 |
" public void method() {\n" + |
9565 |
" }\n" + |
9566 |
"}"); |
9567 |
|
9568 |
CompletionTestsRequestor2 requestor = new CompletionTestsRequestor2(true); |
9569 |
String str = this.workingCopies[0].getSource(); |
9570 |
String completeBehind = "ZZZ"; |
9571 |
int cursorLocation = str.lastIndexOf(completeBehind) + completeBehind.length(); |
9572 |
this.workingCopies[0].codeComplete(cursorLocation, requestor, this.wcOwner); |
9573 |
|
9574 |
assertResults( |
9575 |
"ZZZ1[TYPE_REF]{ZZZ1, test, Ltest.ZZZ1;, null, null, " + (R_DEFAULT + R_RESOLVED + R_INTERESTING + R_CASE + R_UNQUALIFIED + R_ANNOTATION + R_NON_RESTRICTED) + "}\n" + |
9576 |
"ZZZ2[TYPE_REF]{ZZZ2, test, Ltest.ZZZ2;, null, null, " + (R_DEFAULT + R_RESOLVED + R_INTERESTING + R_CASE + R_UNQUALIFIED + R_ANNOTATION + R_TARGET + R_NON_RESTRICTED) + "}", |
9577 |
requestor.getResults()); |
9578 |
} |
9579 |
//https://bugs.eclipse.org/bugs/show_bug.cgi?id=158985 |
9580 |
public void test0305() throws JavaModelException { |
9581 |
this.workingCopies = new ICompilationUnit[1]; |
9582 |
this.workingCopies[0] = getWorkingCopy( |
9583 |
"/Completion/src3/test/Test.java", |
9584 |
"package test;\n" + |
9585 |
"class TOPZZZ1 {\n" + |
9586 |
" @java.lang.annotation.Target({java.lang.annotation.ElementType.TYPE})\n" + |
9587 |
" public @interface ZZZ1 {\n" + |
9588 |
" }\n" + |
9589 |
"}\n" + |
9590 |
"class TOPZZZ2 {\n" + |
9591 |
" public @interface ZZZ2 {\n" + |
9592 |
" }\n" + |
9593 |
"}\n" + |
9594 |
"public class Test {\n" + |
9595 |
" @ZZZ\n" + |
9596 |
" public void method() {\n" + |
9597 |
" }\n" + |
9598 |
"}"); |
9599 |
|
9600 |
CompletionTestsRequestor2 requestor = new CompletionTestsRequestor2(true); |
9601 |
String str = this.workingCopies[0].getSource(); |
9602 |
String completeBehind = "ZZZ"; |
9603 |
int cursorLocation = str.lastIndexOf(completeBehind) + completeBehind.length(); |
9604 |
this.workingCopies[0].codeComplete(cursorLocation, requestor, this.wcOwner); |
9605 |
|
9606 |
assertResults( |
9607 |
"TOPZZZ1.ZZZ1[TYPE_REF]{test.TOPZZZ1.ZZZ1, test, Ltest.TOPZZZ1$ZZZ1;, null, null, " + (R_DEFAULT + R_RESOLVED + R_INTERESTING + R_CASE + R_ANNOTATION + R_NON_RESTRICTED) + "}\n" + |
9608 |
"TOPZZZ2.ZZZ2[TYPE_REF]{test.TOPZZZ2.ZZZ2, test, Ltest.TOPZZZ2$ZZZ2;, null, null, " + (R_DEFAULT + R_RESOLVED + R_INTERESTING + R_CASE + R_ANNOTATION + R_TARGET + R_NON_RESTRICTED) + "}", |
9609 |
requestor.getResults()); |
9610 |
} |
9611 |
//https://bugs.eclipse.org/bugs/show_bug.cgi?id=158985 |
9612 |
public void test0306() throws JavaModelException { |
9613 |
this.workingCopies = new ICompilationUnit[1]; |
9614 |
this.workingCopies[0] = getWorkingCopy( |
9615 |
"/Completion/src3/test/Test.java", |
9616 |
"package test;\n" + |
9617 |
"public class Test {\n" + |
9618 |
" public static class TOPZZZ1 {\n" + |
9619 |
" @java.lang.annotation.Target({java.lang.annotation.ElementType.TYPE})\n" + |
9620 |
" public @interface ZZZ1 {\n" + |
9621 |
" }\n" + |
9622 |
" }\n" + |
9623 |
" public static class TOPZZZ2 {\n" + |
9624 |
" public @interface ZZZ2 {\n" + |
9625 |
" }\n" + |
9626 |
" }\n" + |
9627 |
" public class TOPZZZ3 {\n" + |
9628 |
" public @interface ZZZ3 {\n" + |
9629 |
" }\n" + |
9630 |
" }\n" + |
9631 |
" @ZZZ\n" + |
9632 |
" public void method() {\n" + |
9633 |
" }\n" + |
9634 |
"}"); |
9635 |
|
9636 |
CompletionTestsRequestor2 requestor = new CompletionTestsRequestor2(true); |
9637 |
String str = this.workingCopies[0].getSource(); |
9638 |
String completeBehind = "ZZZ"; |
9639 |
int cursorLocation = str.lastIndexOf(completeBehind) + completeBehind.length(); |
9640 |
this.workingCopies[0].codeComplete(cursorLocation, requestor, this.wcOwner); |
9641 |
|
9642 |
assertResults( |
9643 |
"Test.TOPZZZ1.ZZZ1[TYPE_REF]{test.Test.TOPZZZ1.ZZZ1, test, Ltest.Test$TOPZZZ1$ZZZ1;, null, null, " + (R_DEFAULT + R_RESOLVED + R_INTERESTING + R_CASE + R_ANNOTATION + R_NON_RESTRICTED) + "}\n" + |
9644 |
"Test.TOPZZZ2.ZZZ2[TYPE_REF]{test.Test.TOPZZZ2.ZZZ2, test, Ltest.Test$TOPZZZ2$ZZZ2;, null, null, " + (R_DEFAULT + R_RESOLVED + R_INTERESTING + R_CASE + R_ANNOTATION + R_TARGET + R_NON_RESTRICTED) + "}", |
9645 |
requestor.getResults()); |
9646 |
} |
9647 |
//https://bugs.eclipse.org/bugs/show_bug.cgi?id=158985 |
9648 |
public void test0307() throws JavaModelException { |
9649 |
this.workingCopies = new ICompilationUnit[1]; |
9650 |
this.workingCopies[0] = getWorkingCopy( |
9651 |
"/Completion/src3/test/Test.java", |
9652 |
"package test;\n" + |
9653 |
"public class Test {\n" + |
9654 |
" @java.lang.annotation.Target({java.lang.annotation.ElementType.TYPE})\n" + |
9655 |
" public @interface ZZZ1 {\n" + |
9656 |
" }\n" + |
9657 |
" public @interface ZZZ2 {\n" + |
9658 |
" }\n" + |
9659 |
" @ZZZ\n" + |
9660 |
" public void method() {\n" + |
9661 |
" }\n" + |
9662 |
"}"); |
9663 |
|
9664 |
CompletionTestsRequestor2 requestor = new CompletionTestsRequestor2(true); |
9665 |
String str = this.workingCopies[0].getSource(); |
9666 |
String completeBehind = "ZZZ"; |
9667 |
int cursorLocation = str.lastIndexOf(completeBehind) + completeBehind.length(); |
9668 |
this.workingCopies[0].codeComplete(cursorLocation, requestor, this.wcOwner); |
9669 |
|
9670 |
assertResults( |
9671 |
"Test.ZZZ1[TYPE_REF]{ZZZ1, test, Ltest.Test$ZZZ1;, null, null, " + (R_DEFAULT + R_RESOLVED + R_INTERESTING + R_CASE + R_UNQUALIFIED + R_ANNOTATION + R_NON_RESTRICTED) + "}\n" + |
9672 |
"Test.ZZZ2[TYPE_REF]{ZZZ2, test, Ltest.Test$ZZZ2;, null, null, " + (R_DEFAULT + R_RESOLVED + R_INTERESTING + R_CASE + R_UNQUALIFIED + R_ANNOTATION + R_TARGET + R_NON_RESTRICTED) + "}", |
9673 |
requestor.getResults()); |
9674 |
} |
9675 |
//https://bugs.eclipse.org/bugs/show_bug.cgi?id=158985 |
9676 |
public void test0308() throws JavaModelException { |
9677 |
this.workingCopies = new ICompilationUnit[4]; |
9678 |
this.workingCopies[0] = getWorkingCopy( |
9679 |
"/Completion/src3/test/Test.java", |
9680 |
"package test;\n" + |
9681 |
"public class Test {\n" + |
9682 |
" @ZZZ\n" + |
9683 |
" public void method() {\n" + |
9684 |
" }\n" + |
9685 |
"}"); |
9686 |
|
9687 |
this.workingCopies[1] = getWorkingCopy( |
9688 |
"/Completion/src3/p/ZZZ1.java", |
9689 |
"package p;\n" + |
9690 |
"@java.lang.annotation.Target({java.lang.annotation.ElementType.TYPE})\n" + |
9691 |
"public @interface ZZZ1 {\n" + |
9692 |
"}"); |
9693 |
|
9694 |
this.workingCopies[2] = getWorkingCopy( |
9695 |
"/Completion/src3/p/ZZZ2.java", |
9696 |
"package p;\n" + |
9697 |
"@java.lang.annotation.Target({java.lang.annotation.ElementType.METHOD})\n" + |
9698 |
"public @interface ZZZ2 {\n" + |
9699 |
"}"); |
9700 |
|
9701 |
this.workingCopies[3] = getWorkingCopy( |
9702 |
"/Completion/src3/p/ZZZ3.java", |
9703 |
"package p;\n" + |
9704 |
"public @interface ZZZ3 {\n" + |
9705 |
"}"); |
9706 |
|
9707 |
CompletionTestsRequestor2 requestor = new CompletionTestsRequestor2(true); |
9708 |
String str = this.workingCopies[0].getSource(); |
9709 |
String completeBehind = "ZZZ"; |
9710 |
int cursorLocation = str.lastIndexOf(completeBehind) + completeBehind.length(); |
9711 |
this.workingCopies[0].codeComplete(cursorLocation, requestor, this.wcOwner); |
9712 |
|
9713 |
assertResults( |
9714 |
"ZZZ1[TYPE_REF]{p.ZZZ1, p, Lp.ZZZ1;, null, null, " + (R_DEFAULT + R_RESOLVED + R_INTERESTING + R_CASE + R_ANNOTATION + R_NON_RESTRICTED) + "}\n" + |
9715 |
"ZZZ2[TYPE_REF]{p.ZZZ2, p, Lp.ZZZ2;, null, null, " + (R_DEFAULT + R_RESOLVED + R_INTERESTING + R_CASE + R_ANNOTATION + R_TARGET + R_NON_RESTRICTED) + "}\n" + |
9716 |
"ZZZ3[TYPE_REF]{p.ZZZ3, p, Lp.ZZZ3;, null, null, " + (R_DEFAULT + R_RESOLVED + R_INTERESTING + R_CASE + R_ANNOTATION + R_TARGET + R_NON_RESTRICTED) + "}", |
9717 |
requestor.getResults()); |
9718 |
} |
9719 |
//https://bugs.eclipse.org/bugs/show_bug.cgi?id=158985 |
9720 |
public void test0309() throws JavaModelException { |
9721 |
this.workingCopies = new ICompilationUnit[4]; |
9722 |
this.workingCopies[0] = getWorkingCopy( |
9723 |
"/Completion/src3/test/Test.java", |
9724 |
"package test;\n" + |
9725 |
"public class Test {\n" + |
9726 |
" @ZZZ\n" + |
9727 |
" public class TestInner {\n" + |
9728 |
" }\n" + |
9729 |
"}"); |
9730 |
|
9731 |
this.workingCopies[1] = getWorkingCopy( |
9732 |
"/Completion/src3/p/ZZZ1.java", |
9733 |
"package p;\n" + |
9734 |
"@java.lang.annotation.Target({java.lang.annotation.ElementType.FIELD})\n" + |
9735 |
"public @interface ZZZ1 {\n" + |
9736 |
"}"); |
9737 |
|
9738 |
this.workingCopies[2] = getWorkingCopy( |
9739 |
"/Completion/src3/p/ZZZ2.java", |
9740 |
"package p;\n" + |
9741 |
"@java.lang.annotation.Target({java.lang.annotation.ElementType.TYPE})\n" + |
9742 |
"public @interface ZZZ2 {\n" + |
9743 |
"}"); |
9744 |
|
9745 |
this.workingCopies[3] = getWorkingCopy( |
9746 |
"/Completion/src3/p/ZZZ3.java", |
9747 |
"package p;\n" + |
9748 |
"public @interface ZZZ3 {\n" + |
9749 |
"}"); |
9750 |
|
9751 |
CompletionTestsRequestor2 requestor = new CompletionTestsRequestor2(true); |
9752 |
String str = this.workingCopies[0].getSource(); |
9753 |
String completeBehind = "ZZZ"; |
9754 |
int cursorLocation = str.lastIndexOf(completeBehind) + completeBehind.length(); |
9755 |
this.workingCopies[0].codeComplete(cursorLocation, requestor, this.wcOwner); |
9756 |
|
9757 |
assertResults( |
9758 |
"ZZZ1[TYPE_REF]{p.ZZZ1, p, Lp.ZZZ1;, null, null, " + (R_DEFAULT + R_RESOLVED + R_INTERESTING + R_CASE + R_ANNOTATION + R_NON_RESTRICTED) + "}\n" + |
9759 |
"ZZZ2[TYPE_REF]{p.ZZZ2, p, Lp.ZZZ2;, null, null, " + (R_DEFAULT + R_RESOLVED + R_INTERESTING + R_CASE + R_ANNOTATION + R_TARGET + R_NON_RESTRICTED) + "}\n" + |
9760 |
"ZZZ3[TYPE_REF]{p.ZZZ3, p, Lp.ZZZ3;, null, null, " + (R_DEFAULT + R_RESOLVED + R_INTERESTING + R_CASE + R_ANNOTATION + R_TARGET + R_NON_RESTRICTED) + "}", |
9761 |
requestor.getResults()); |
9762 |
} |
9763 |
//https://bugs.eclipse.org/bugs/show_bug.cgi?id=158985 |
9764 |
public void test0310() throws JavaModelException { |
9765 |
this.workingCopies = new ICompilationUnit[4]; |
9766 |
this.workingCopies[0] = getWorkingCopy( |
9767 |
"/Completion/src3/test/Test.java", |
9768 |
"package test;\n" + |
9769 |
"public class Test {\n" + |
9770 |
" @ZZZ\n" + |
9771 |
" public int field;\n" + |
9772 |
"}"); |
9773 |
|
9774 |
this.workingCopies[1] = getWorkingCopy( |
9775 |
"/Completion/src3/p/ZZZ1.java", |
9776 |
"package p;\n" + |
9777 |
"@java.lang.annotation.Target({java.lang.annotation.ElementType.TYPE})\n" + |
9778 |
"public @interface ZZZ1 {\n" + |
9779 |
"}"); |
9780 |
|
9781 |
this.workingCopies[2] = getWorkingCopy( |
9782 |
"/Completion/src3/p/ZZZ2.java", |
9783 |
"package p;\n" + |
9784 |
"@java.lang.annotation.Target({java.lang.annotation.ElementType.FIELD})\n" + |
9785 |
"public @interface ZZZ2 {\n" + |
9786 |
"}"); |
9787 |
|
9788 |
this.workingCopies[3] = getWorkingCopy( |
9789 |
"/Completion/src3/p/ZZZ3.java", |
9790 |
"package p;\n" + |
9791 |
"public @interface ZZZ3 {\n" + |
9792 |
"}"); |
9793 |
|
9794 |
CompletionTestsRequestor2 requestor = new CompletionTestsRequestor2(true); |
9795 |
String str = this.workingCopies[0].getSource(); |
9796 |
String completeBehind = "ZZZ"; |
9797 |
int cursorLocation = str.lastIndexOf(completeBehind) + completeBehind.length(); |
9798 |
this.workingCopies[0].codeComplete(cursorLocation, requestor, this.wcOwner); |
9799 |
|
9800 |
assertResults( |
9801 |
"ZZZ1[TYPE_REF]{p.ZZZ1, p, Lp.ZZZ1;, null, null, " + (R_DEFAULT + R_RESOLVED + R_INTERESTING + R_CASE + R_ANNOTATION + R_NON_RESTRICTED) + "}\n" + |
9802 |
"ZZZ2[TYPE_REF]{p.ZZZ2, p, Lp.ZZZ2;, null, null, " + (R_DEFAULT + R_RESOLVED + R_INTERESTING + R_CASE + R_ANNOTATION + R_TARGET + R_NON_RESTRICTED) + "}\n" + |
9803 |
"ZZZ3[TYPE_REF]{p.ZZZ3, p, Lp.ZZZ3;, null, null, " + (R_DEFAULT + R_RESOLVED + R_INTERESTING + R_CASE + R_ANNOTATION + R_TARGET + R_NON_RESTRICTED) + "}", |
9804 |
requestor.getResults()); |
9805 |
} |
9806 |
//https://bugs.eclipse.org/bugs/show_bug.cgi?id=158985 |
9807 |
public void test0311() throws JavaModelException { |
9808 |
this.workingCopies = new ICompilationUnit[4]; |
9809 |
this.workingCopies[0] = getWorkingCopy( |
9810 |
"/Completion/src3/test/Test.java", |
9811 |
"package test;\n" + |
9812 |
"public class Test {\n" + |
9813 |
" public void foo(@ZZZ int param){}\n" + |
9814 |
"}"); |
9815 |
|
9816 |
this.workingCopies[1] = getWorkingCopy( |
9817 |
"/Completion/src3/p/ZZZ1.java", |
9818 |
"package p;\n" + |
9819 |
"@java.lang.annotation.Target({java.lang.annotation.ElementType.TYPE})\n" + |
9820 |
"public @interface ZZZ1 {\n" + |
9821 |
"}"); |
9822 |
|
9823 |
this.workingCopies[2] = getWorkingCopy( |
9824 |
"/Completion/src3/p/ZZZ2.java", |
9825 |
"package p;\n" + |
9826 |
"@java.lang.annotation.Target({java.lang.annotation.ElementType.PARAMETER})\n" + |
9827 |
"public @interface ZZZ2 {\n" + |
9828 |
"}"); |
9829 |
|
9830 |
this.workingCopies[3] = getWorkingCopy( |
9831 |
"/Completion/src3/p/ZZZ3.java", |
9832 |
"package p;\n" + |
9833 |
"public @interface ZZZ3 {\n" + |
9834 |
"}"); |
9835 |
|
9836 |
CompletionTestsRequestor2 requestor = new CompletionTestsRequestor2(true); |
9837 |
String str = this.workingCopies[0].getSource(); |
9838 |
String completeBehind = "ZZZ"; |
9839 |
int cursorLocation = str.lastIndexOf(completeBehind) + completeBehind.length(); |
9840 |
this.workingCopies[0].codeComplete(cursorLocation, requestor, this.wcOwner); |
9841 |
|
9842 |
assertResults( |
9843 |
"ZZZ1[TYPE_REF]{p.ZZZ1, p, Lp.ZZZ1;, null, null, " + (R_DEFAULT + R_RESOLVED + R_INTERESTING + R_CASE + R_ANNOTATION + R_NON_RESTRICTED) + "}\n" + |
9844 |
"ZZZ2[TYPE_REF]{p.ZZZ2, p, Lp.ZZZ2;, null, null, " + (R_DEFAULT + R_RESOLVED + R_INTERESTING + R_CASE + R_ANNOTATION + R_TARGET + R_NON_RESTRICTED) + "}\n" + |
9845 |
"ZZZ3[TYPE_REF]{p.ZZZ3, p, Lp.ZZZ3;, null, null, " + (R_DEFAULT + R_RESOLVED + R_INTERESTING + R_CASE + R_ANNOTATION + R_TARGET + R_NON_RESTRICTED) + "}", |
9846 |
requestor.getResults()); |
9847 |
} |
9848 |
//https://bugs.eclipse.org/bugs/show_bug.cgi?id=158985 |
9849 |
public void test0312() throws JavaModelException { |
9850 |
this.workingCopies = new ICompilationUnit[4]; |
9851 |
this.workingCopies[0] = getWorkingCopy( |
9852 |
"/Completion/src3/test/Test.java", |
9853 |
"package test;\n" + |
9854 |
"public class Test {\n" + |
9855 |
" @ZZZ\n" + |
9856 |
" public Test(){}\n" + |
9857 |
"}"); |
9858 |
|
9859 |
this.workingCopies[1] = getWorkingCopy( |
9860 |
"/Completion/src3/p/ZZZ1.java", |
9861 |
"package p;\n" + |
9862 |
"@java.lang.annotation.Target({java.lang.annotation.ElementType.TYPE})\n" + |
9863 |
"public @interface ZZZ1 {\n" + |
9864 |
"}"); |
9865 |
|
9866 |
this.workingCopies[2] = getWorkingCopy( |
9867 |
"/Completion/src3/p/ZZZ2.java", |
9868 |
"package p;\n" + |
9869 |
"@java.lang.annotation.Target({java.lang.annotation.ElementType.CONSTRUCTOR})\n" + |
9870 |
"public @interface ZZZ2 {\n" + |
9871 |
"}"); |
9872 |
|
9873 |
this.workingCopies[3] = getWorkingCopy( |
9874 |
"/Completion/src3/p/ZZZ3.java", |
9875 |
"package p;\n" + |
9876 |
"public @interface ZZZ3 {\n" + |
9877 |
"}"); |
9878 |
|
9879 |
CompletionTestsRequestor2 requestor = new CompletionTestsRequestor2(true); |
9880 |
String str = this.workingCopies[0].getSource(); |
9881 |
String completeBehind = "ZZZ"; |
9882 |
int cursorLocation = str.lastIndexOf(completeBehind) + completeBehind.length(); |
9883 |
this.workingCopies[0].codeComplete(cursorLocation, requestor, this.wcOwner); |
9884 |
|
9885 |
assertResults( |
9886 |
"ZZZ1[TYPE_REF]{p.ZZZ1, p, Lp.ZZZ1;, null, null, " + (R_DEFAULT + R_RESOLVED + R_INTERESTING + R_CASE + R_ANNOTATION + R_NON_RESTRICTED) + "}\n" + |
9887 |
"ZZZ2[TYPE_REF]{p.ZZZ2, p, Lp.ZZZ2;, null, null, " + (R_DEFAULT + R_RESOLVED + R_INTERESTING + R_CASE + R_ANNOTATION + R_TARGET + R_NON_RESTRICTED) + "}\n" + |
9888 |
"ZZZ3[TYPE_REF]{p.ZZZ3, p, Lp.ZZZ3;, null, null, " + (R_DEFAULT + R_RESOLVED + R_INTERESTING + R_CASE + R_ANNOTATION + R_TARGET + R_NON_RESTRICTED) + "}", |
9889 |
requestor.getResults()); |
9890 |
} |
9891 |
//https://bugs.eclipse.org/bugs/show_bug.cgi?id=158985 |
9892 |
// When the completion is inside a method body the annotation cannot be accuratly attached to the correct node by completino recovery. |
9893 |
// So relevance based on annotation target are ignored. |
9894 |
public void test0313() throws JavaModelException { |
9895 |
this.workingCopies = new ICompilationUnit[4]; |
9896 |
this.workingCopies[0] = getWorkingCopy( |
9897 |
"/Completion/src3/test/Test.java", |
9898 |
"package test;\n" + |
9899 |
"public class Test {\n" + |
9900 |
" {\n" + |
9901 |
" @ZZZ\n" + |
9902 |
" int var = 0;\n" + |
9903 |
" }\n" + |
9904 |
"}"); |
9905 |
|
9906 |
this.workingCopies[1] = getWorkingCopy( |
9907 |
"/Completion/src3/p/ZZZ1.java", |
9908 |
"package p;\n" + |
9909 |
"@java.lang.annotation.Target({java.lang.annotation.ElementType.TYPE})\n" + |
9910 |
"public @interface ZZZ1 {\n" + |
9911 |
"}"); |
9912 |
|
9913 |
this.workingCopies[2] = getWorkingCopy( |
9914 |
"/Completion/src3/p/ZZZ2.java", |
9915 |
"package p;\n" + |
9916 |
"@java.lang.annotation.Target({java.lang.annotation.ElementType.LOCAL_VARIABLE})\n" + |
9917 |
"public @interface ZZZ2 {\n" + |
9918 |
"}"); |
9919 |
|
9920 |
this.workingCopies[3] = getWorkingCopy( |
9921 |
"/Completion/src3/p/ZZZ3.java", |
9922 |
"package p;\n" + |
9923 |
"public @interface ZZZ3 {\n" + |
9924 |
"}"); |
9925 |
|
9926 |
CompletionTestsRequestor2 requestor = new CompletionTestsRequestor2(true); |
9927 |
String str = this.workingCopies[0].getSource(); |
9928 |
String completeBehind = "ZZZ"; |
9929 |
int cursorLocation = str.lastIndexOf(completeBehind) + completeBehind.length(); |
9930 |
this.workingCopies[0].codeComplete(cursorLocation, requestor, this.wcOwner); |
9931 |
|
9932 |
assertResults( |
9933 |
"ZZZ1[TYPE_REF]{p.ZZZ1, p, Lp.ZZZ1;, null, null, " + (R_DEFAULT + R_RESOLVED + R_INTERESTING + R_CASE + R_ANNOTATION + R_NON_RESTRICTED) + "}\n" + |
9934 |
"ZZZ2[TYPE_REF]{p.ZZZ2, p, Lp.ZZZ2;, null, null, " + (R_DEFAULT + R_RESOLVED + R_INTERESTING + R_CASE + R_ANNOTATION + R_NON_RESTRICTED) + "}\n" + |
9935 |
"ZZZ3[TYPE_REF]{p.ZZZ3, p, Lp.ZZZ3;, null, null, " + (R_DEFAULT + R_RESOLVED + R_INTERESTING + R_CASE + R_ANNOTATION + R_NON_RESTRICTED) + "}", |
9936 |
requestor.getResults()); |
9937 |
} |
9938 |
//https://bugs.eclipse.org/bugs/show_bug.cgi?id=158985 |
9939 |
public void test0314() throws JavaModelException { |
9940 |
this.workingCopies = new ICompilationUnit[4]; |
9941 |
this.workingCopies[0] = getWorkingCopy( |
9942 |
"/Completion/src3/test/Test.java", |
9943 |
"package test;\n" + |
9944 |
"public class Test {\n" + |
9945 |
" @ZZZ\n" + |
9946 |
" public @interface TestInner {}\n" + |
9947 |
"}"); |
9948 |
|
9949 |
this.workingCopies[1] = getWorkingCopy( |
9950 |
"/Completion/src3/p/ZZZ1.java", |
9951 |
"package p;\n" + |
9952 |
"@java.lang.annotation.Target({java.lang.annotation.ElementType.METHOD})\n" + |
9953 |
"public @interface ZZZ1 {\n" + |
9954 |
"}"); |
9955 |
|
9956 |
this.workingCopies[2] = getWorkingCopy( |
9957 |
"/Completion/src3/p/ZZZ2.java", |
9958 |
"package p;\n" + |
9959 |
"@java.lang.annotation.Target({java.lang.annotation.ElementType.ANNOTATION_TYPE})\n" + |
9960 |
"public @interface ZZZ2 {\n" + |
9961 |
"}"); |
9962 |
|
9963 |
this.workingCopies[3] = getWorkingCopy( |
9964 |
"/Completion/src3/p/ZZZ3.java", |
9965 |
"package p;\n" + |
9966 |
"public @interface ZZZ3 {\n" + |
9967 |
"}"); |
9968 |
|
9969 |
CompletionTestsRequestor2 requestor = new CompletionTestsRequestor2(true); |
9970 |
String str = this.workingCopies[0].getSource(); |
9971 |
String completeBehind = "ZZZ"; |
9972 |
int cursorLocation = str.lastIndexOf(completeBehind) + completeBehind.length(); |
9973 |
this.workingCopies[0].codeComplete(cursorLocation, requestor, this.wcOwner); |
9974 |
|
9975 |
assertResults( |
9976 |
"ZZZ1[TYPE_REF]{p.ZZZ1, p, Lp.ZZZ1;, null, null, " + (R_DEFAULT + R_RESOLVED + R_INTERESTING + R_CASE + R_ANNOTATION + R_NON_RESTRICTED) + "}\n" + |
9977 |
"ZZZ2[TYPE_REF]{p.ZZZ2, p, Lp.ZZZ2;, null, null, " + (R_DEFAULT + R_RESOLVED + R_INTERESTING + R_CASE + R_ANNOTATION + R_TARGET + R_NON_RESTRICTED) + "}\n" + |
9978 |
"ZZZ3[TYPE_REF]{p.ZZZ3, p, Lp.ZZZ3;, null, null, " + (R_DEFAULT + R_RESOLVED + R_INTERESTING + R_CASE + R_ANNOTATION + R_TARGET + R_NON_RESTRICTED) + "}", |
9979 |
requestor.getResults()); |
9980 |
} |
9981 |
//https://bugs.eclipse.org/bugs/show_bug.cgi?id=158985 |
9982 |
public void test0315() throws JavaModelException { |
9983 |
this.workingCopies = new ICompilationUnit[4]; |
9984 |
this.workingCopies[0] = getWorkingCopy( |
9985 |
"/Completion/src3/test/Test.java", |
9986 |
"@ZZZ package test;\n" + |
9987 |
"public class Test {\n" + |
9988 |
"}"); |
9989 |
|
9990 |
this.workingCopies[1] = getWorkingCopy( |
9991 |
"/Completion/src3/p/ZZZ1.java", |
9992 |
"package p;\n" + |
9993 |
"@java.lang.annotation.Target({java.lang.annotation.ElementType.TYPE})\n" + |
9994 |
"public @interface ZZZ1 {\n" + |
9995 |
"}"); |
9996 |
|
9997 |
this.workingCopies[2] = getWorkingCopy( |
9998 |
"/Completion/src3/p/ZZZ2.java", |
9999 |
"package p;\n" + |
10000 |
"@java.lang.annotation.Target({java.lang.annotation.ElementType.PACKAGE})\n" + |
10001 |
"public @interface ZZZ2 {\n" + |
10002 |
"}"); |
10003 |
|
10004 |
this.workingCopies[3] = getWorkingCopy( |
10005 |
"/Completion/src3/p/ZZZ3.java", |
10006 |
"package p;\n" + |
10007 |
"public @interface ZZZ3 {\n" + |
10008 |
"}"); |
10009 |
|
10010 |
CompletionTestsRequestor2 requestor = new CompletionTestsRequestor2(true); |
10011 |
String str = this.workingCopies[0].getSource(); |
10012 |
String completeBehind = "ZZZ"; |
10013 |
int cursorLocation = str.lastIndexOf(completeBehind) + completeBehind.length(); |
10014 |
this.workingCopies[0].codeComplete(cursorLocation, requestor, this.wcOwner); |
10015 |
|
10016 |
assertResults( |
10017 |
"ZZZ2[TYPE_REF]{p.ZZZ2, p, Lp.ZZZ2;, null, null, " + (R_DEFAULT + R_RESOLVED + R_INTERESTING + R_CASE + R_ANNOTATION + R_TARGET + R_NON_RESTRICTED) + "}\n" + |
10018 |
"ZZZ3[TYPE_REF]{p.ZZZ3, p, Lp.ZZZ3;, null, null, " + (R_DEFAULT + R_RESOLVED + R_INTERESTING + R_CASE + R_ANNOTATION + R_TARGET + R_NON_RESTRICTED) + "}", |
10019 |
requestor.getResults()); |
10020 |
} |
10021 |
//https://bugs.eclipse.org/bugs/show_bug.cgi?id=158985 |
10022 |
public void test0316() throws JavaModelException { |
10023 |
this.workingCopies = new ICompilationUnit[4]; |
10024 |
this.workingCopies[0] = getWorkingCopy( |
10025 |
"/Completion/src3/test/Test.java", |
10026 |
"package test;\n" + |
10027 |
"public class Test {\n" + |
10028 |
" @ZZZ\n" + |
10029 |
" public Test(){}\n" + |
10030 |
"}"); |
10031 |
|
10032 |
this.workingCopies[1] = getWorkingCopy( |
10033 |
"/Completion/src3/p/ZZZ1.java", |
10034 |
"package p;\n" + |
10035 |
"@java.lang.annotation.Target({java.lang.annotation.ElementType.METHOD})\n" + |
10036 |
"public @interface ZZZ1 {\n" + |
10037 |
"}"); |
10038 |
|
10039 |
this.workingCopies[2] = getWorkingCopy( |
10040 |
"/Completion/src3/p/ZZZ2.java", |
10041 |
"package p;\n" + |
10042 |
"@java.lang.annotation.Target({java.lang.annotation.ElementType.CONSTRUCTOR})\n" + |
10043 |
"public @interface ZZZ2 {\n" + |
10044 |
"}"); |
10045 |
|
10046 |
this.workingCopies[3] = getWorkingCopy( |
10047 |
"/Completion/src3/p/ZZZ3.java", |
10048 |
"package p;\n" + |
10049 |
"public @interface ZZZ3 {\n" + |
10050 |
"}"); |
10051 |
|
10052 |
CompletionTestsRequestor2 requestor = new CompletionTestsRequestor2(true); |
10053 |
String str = this.workingCopies[0].getSource(); |
10054 |
String completeBehind = "ZZZ"; |
10055 |
int cursorLocation = str.lastIndexOf(completeBehind) + completeBehind.length(); |
10056 |
this.workingCopies[0].codeComplete(cursorLocation, requestor, this.wcOwner); |
10057 |
|
10058 |
assertResults( |
10059 |
"ZZZ1[TYPE_REF]{p.ZZZ1, p, Lp.ZZZ1;, null, null, " + (R_DEFAULT + R_RESOLVED + R_INTERESTING + R_CASE + R_ANNOTATION + R_NON_RESTRICTED) + "}\n" + |
10060 |
"ZZZ2[TYPE_REF]{p.ZZZ2, p, Lp.ZZZ2;, null, null, " + (R_DEFAULT + R_RESOLVED + R_INTERESTING + R_CASE + R_ANNOTATION + R_TARGET + R_NON_RESTRICTED) + "}\n" + |
10061 |
"ZZZ3[TYPE_REF]{p.ZZZ3, p, Lp.ZZZ3;, null, null, " + (R_DEFAULT + R_RESOLVED + R_INTERESTING + R_CASE + R_ANNOTATION + R_TARGET + R_NON_RESTRICTED) + "}", |
10062 |
requestor.getResults()); |
10063 |
} |
10064 |
//https://bugs.eclipse.org/bugs/show_bug.cgi?id=158985 |
10065 |
public void test0317() throws JavaModelException { |
10066 |
this.workingCopies = new ICompilationUnit[4]; |
10067 |
this.workingCopies[0] = getWorkingCopy( |
10068 |
"/Completion/src3/test/Test.java", |
10069 |
"package test;\n" + |
10070 |
"public class Test {\n" + |
10071 |
" @ZZZ\n" + |
10072 |
" public @interface TestInner {}\n" + |
10073 |
"}"); |
10074 |
|
10075 |
this.workingCopies[1] = getWorkingCopy( |
10076 |
"/Completion/src3/p/ZZZ1.java", |
10077 |
"package p;\n" + |
10078 |
"@java.lang.annotation.Target({java.lang.annotation.ElementType.TYPE})\n" + |
10079 |
"public @interface ZZZ1 {\n" + |
10080 |
"}"); |
10081 |
|
10082 |
this.workingCopies[2] = getWorkingCopy( |
10083 |
"/Completion/src3/p/ZZZ2.java", |
10084 |
"package p;\n" + |
10085 |
"@java.lang.annotation.Target({java.lang.annotation.ElementType.ANNOTATION_TYPE})\n" + |
10086 |
"public @interface ZZZ2 {\n" + |
10087 |
"}"); |
10088 |
|
10089 |
this.workingCopies[3] = getWorkingCopy( |
10090 |
"/Completion/src3/p/ZZZ3.java", |
10091 |
"package p;\n" + |
10092 |
"public @interface ZZZ3 {\n" + |
10093 |
"}"); |
10094 |
|
10095 |
CompletionTestsRequestor2 requestor = new CompletionTestsRequestor2(true); |
10096 |
String str = this.workingCopies[0].getSource(); |
10097 |
String completeBehind = "ZZZ"; |
10098 |
int cursorLocation = str.lastIndexOf(completeBehind) + completeBehind.length(); |
10099 |
this.workingCopies[0].codeComplete(cursorLocation, requestor, this.wcOwner); |
10100 |
|
10101 |
assertResults( |
10102 |
"ZZZ1[TYPE_REF]{p.ZZZ1, p, Lp.ZZZ1;, null, null, " + (R_DEFAULT + R_RESOLVED + R_INTERESTING + R_CASE + R_ANNOTATION + R_TARGET + R_NON_RESTRICTED) + "}\n" + |
10103 |
"ZZZ2[TYPE_REF]{p.ZZZ2, p, Lp.ZZZ2;, null, null, " + (R_DEFAULT + R_RESOLVED + R_INTERESTING + R_CASE + R_ANNOTATION + R_TARGET + R_NON_RESTRICTED) + "}\n" + |
10104 |
"ZZZ3[TYPE_REF]{p.ZZZ3, p, Lp.ZZZ3;, null, null, " + (R_DEFAULT + R_RESOLVED + R_INTERESTING + R_CASE + R_ANNOTATION + R_TARGET + R_NON_RESTRICTED) + "}", |
10105 |
requestor.getResults()); |
10106 |
} |
10107 |
//https://bugs.eclipse.org/bugs/show_bug.cgi?id=158985 |
10108 |
public void test0318() throws JavaModelException { |
10109 |
this.workingCopies = new ICompilationUnit[3]; |
10110 |
this.workingCopies[0] = getWorkingCopy( |
10111 |
"/Completion/src3/test/Test.java", |
10112 |
"package test;\n" + |
10113 |
"@ZZZ\n" + |
10114 |
"import test.*;\n" + |
10115 |
"public class Test {\n" + |
10116 |
"}"); |
10117 |
|
10118 |
this.workingCopies[1] = getWorkingCopy( |
10119 |
"/Completion/src3/p/ZZZ1.java", |
10120 |
"package p;\n" + |
10121 |
"@java.lang.annotation.Target({java.lang.annotation.ElementType.TYPE})\n" + |
10122 |
"public @interface ZZZ1 {\n" + |
10123 |
"}"); |
10124 |
|
10125 |
this.workingCopies[2] = getWorkingCopy( |
10126 |
"/Completion/src3/p/ZZZ2.java", |
10127 |
"package p;\n" + |
10128 |
"public @interface ZZZ2 {\n" + |
10129 |
"}"); |
10130 |
|
10131 |
CompletionTestsRequestor2 requestor = new CompletionTestsRequestor2(true); |
10132 |
String str = this.workingCopies[0].getSource(); |
10133 |
String completeBehind = "ZZZ"; |
10134 |
int cursorLocation = str.lastIndexOf(completeBehind) + completeBehind.length(); |
10135 |
this.workingCopies[0].codeComplete(cursorLocation, requestor, this.wcOwner); |
10136 |
|
10137 |
assertResults( |
10138 |
"ZZZ1[TYPE_REF]{p.ZZZ1, p, Lp.ZZZ1;, null, null, " + (R_DEFAULT + R_RESOLVED + R_INTERESTING + R_CASE + R_ANNOTATION + R_NON_RESTRICTED) + "}\n" + |
10139 |
"ZZZ2[TYPE_REF]{p.ZZZ2, p, Lp.ZZZ2;, null, null, " + (R_DEFAULT + R_RESOLVED + R_INTERESTING + R_CASE + R_ANNOTATION + R_NON_RESTRICTED) + "}", |
10140 |
requestor.getResults()); |
10141 |
} |
10142 |
//https://bugs.eclipse.org/bugs/show_bug.cgi?id=158985 |
10143 |
public void test0319() throws JavaModelException { |
10144 |
this.workingCopies = new ICompilationUnit[3]; |
10145 |
this.workingCopies[0] = getWorkingCopy( |
10146 |
"/Completion/src3/test/Test.java", |
10147 |
"package test;\n" + |
10148 |
"public class Test {\n" + |
10149 |
" @ZZZ\n" + |
10150 |
" {}\n" + |
10151 |
" public void foo() {}\n" + |
10152 |
"}"); |
10153 |
|
10154 |
this.workingCopies[1] = getWorkingCopy( |
10155 |
"/Completion/src3/p/ZZZ1.java", |
10156 |
"package p;\n" + |
10157 |
"@java.lang.annotation.Target({java.lang.annotation.ElementType.METHOD})\n" + |
10158 |
"public @interface ZZZ1 {\n" + |
10159 |
"}"); |
10160 |
|
10161 |
this.workingCopies[2] = getWorkingCopy( |
10162 |
"/Completion/src3/p/ZZZ2.java", |
10163 |
"package p;\n" + |
10164 |
"public @interface ZZZ2 {\n" + |
10165 |
"}"); |
10166 |
|
10167 |
CompletionTestsRequestor2 requestor = new CompletionTestsRequestor2(true); |
10168 |
String str = this.workingCopies[0].getSource(); |
10169 |
String completeBehind = "ZZZ"; |
10170 |
int cursorLocation = str.lastIndexOf(completeBehind) + completeBehind.length(); |
10171 |
this.workingCopies[0].codeComplete(cursorLocation, requestor, this.wcOwner); |
10172 |
|
10173 |
assertResults( |
10174 |
"ZZZ1[TYPE_REF]{p.ZZZ1, p, Lp.ZZZ1;, null, null, " + (R_DEFAULT + R_RESOLVED + R_INTERESTING + R_CASE + R_ANNOTATION + R_NON_RESTRICTED) + "}\n" + |
10175 |
"ZZZ2[TYPE_REF]{p.ZZZ2, p, Lp.ZZZ2;, null, null, " + (R_DEFAULT + R_RESOLVED + R_INTERESTING + R_CASE + R_ANNOTATION + R_NON_RESTRICTED) + "}", |
10176 |
requestor.getResults()); |
10177 |
} |
10178 |
//https://bugs.eclipse.org/bugs/show_bug.cgi?id=158985 |
10179 |
public void test0320() throws JavaModelException { |
10180 |
this.workingCopies = new ICompilationUnit[5]; |
10181 |
this.workingCopies[0] = getWorkingCopy( |
10182 |
"/Completion/src3/test/Test.java", |
10183 |
"package test;\n" + |
10184 |
"public class Test {\n" + |
10185 |
" @ZZZ\n" + |
10186 |
" {\n" + |
10187 |
" int var = 0;\n" + |
10188 |
" }\n" + |
10189 |
"}"); |
10190 |
|
10191 |
this.workingCopies[1] = getWorkingCopy( |
10192 |
"/Completion/src3/p/ZZZ1.java", |
10193 |
"package p;\n" + |
10194 |
"@java.lang.annotation.Target({java.lang.annotation.ElementType.FIELD})\n" + |
10195 |
"public @interface ZZZ1 {\n" + |
10196 |
"}"); |
10197 |
|
10198 |
this.workingCopies[2] = getWorkingCopy( |
10199 |
"/Completion/src3/p/ZZZ2.java", |
10200 |
"package p;\n" + |
10201 |
"@java.lang.annotation.Target({java.lang.annotation.ElementType.PARAMETER})\n" + |
10202 |
"public @interface ZZZ2 {\n" + |
10203 |
"}"); |
10204 |
|
10205 |
this.workingCopies[3] = getWorkingCopy( |
10206 |
"/Completion/src3/p/ZZZ3.java", |
10207 |
"package p;\n" + |
10208 |
"@java.lang.annotation.Target({java.lang.annotation.ElementType.LOCAL_VARIABLE})\n" + |
10209 |
"public @interface ZZZ3 {\n" + |
10210 |
"}"); |
10211 |
|
10212 |
this.workingCopies[4] = getWorkingCopy( |
10213 |
"/Completion/src3/p/ZZZ4.java", |
10214 |
"package p;\n" + |
10215 |
"public @interface ZZZ4 {\n" + |
10216 |
"}"); |
10217 |
|
10218 |
CompletionTestsRequestor2 requestor = new CompletionTestsRequestor2(true); |
10219 |
String str = this.workingCopies[0].getSource(); |
10220 |
String completeBehind = "ZZZ"; |
10221 |
int cursorLocation = str.lastIndexOf(completeBehind) + completeBehind.length(); |
10222 |
this.workingCopies[0].codeComplete(cursorLocation, requestor, this.wcOwner); |
10223 |
|
10224 |
assertResults( |
10225 |
"ZZZ1[TYPE_REF]{p.ZZZ1, p, Lp.ZZZ1;, null, null, " + (R_DEFAULT + R_RESOLVED + R_INTERESTING + R_CASE + R_ANNOTATION + R_NON_RESTRICTED) + "}\n" + |
10226 |
"ZZZ2[TYPE_REF]{p.ZZZ2, p, Lp.ZZZ2;, null, null, " + (R_DEFAULT + R_RESOLVED + R_INTERESTING + R_CASE + R_ANNOTATION + R_NON_RESTRICTED) + "}\n" + |
10227 |
"ZZZ3[TYPE_REF]{p.ZZZ3, p, Lp.ZZZ3;, null, null, " + (R_DEFAULT + R_RESOLVED + R_INTERESTING + R_CASE + R_ANNOTATION + R_NON_RESTRICTED) + "}\n" + |
10228 |
"ZZZ4[TYPE_REF]{p.ZZZ4, p, Lp.ZZZ4;, null, null, " + (R_DEFAULT + R_RESOLVED + R_INTERESTING + R_CASE + R_ANNOTATION + R_NON_RESTRICTED) + "}", |
10229 |
requestor.getResults()); |
10230 |
} |
10231 |
//https://bugs.eclipse.org/bugs/show_bug.cgi?id=158985 |
10232 |
public void test0321() throws JavaModelException { |
10233 |
this.workingCopies = new ICompilationUnit[3]; |
10234 |
this.workingCopies[0] = getWorkingCopy( |
10235 |
"/Completion/src3/test/Test.java", |
10236 |
"package test;\n" + |
10237 |
"public class Test {\n" + |
10238 |
" @ZZZ({})\n" + |
10239 |
" int var = 0;\n" + |
10240 |
"}"); |
10241 |
|
10242 |
this.workingCopies[1] = getWorkingCopy( |
10243 |
"/Completion/src3/p/ZZZ1.java", |
10244 |
"package p;\n" + |
10245 |
"@java.lang.annotation.Target({java.lang.annotation.ElementType.FIELD})\n" + |
10246 |
"public @interface ZZZ1 {\n" + |
10247 |
"}"); |
10248 |
|
10249 |
this.workingCopies[2] = getWorkingCopy( |
10250 |
"/Completion/src3/p/ZZZ2.java", |
10251 |
"package p;\n" + |
10252 |
"public @interface ZZZ2 {\n" + |
10253 |
"}"); |
10254 |
|
10255 |
CompletionTestsRequestor2 requestor = new CompletionTestsRequestor2(true); |
10256 |
String str = this.workingCopies[0].getSource(); |
10257 |
String completeBehind = "ZZZ"; |
10258 |
int cursorLocation = str.lastIndexOf(completeBehind) + completeBehind.length(); |
10259 |
this.workingCopies[0].codeComplete(cursorLocation, requestor, this.wcOwner); |
10260 |
|
10261 |
assertResults( |
10262 |
"ZZZ1[TYPE_REF]{p.ZZZ1, p, Lp.ZZZ1;, null, null, " + (R_DEFAULT + R_RESOLVED + R_INTERESTING + R_CASE + R_ANNOTATION + R_TARGET + R_NON_RESTRICTED) + "}\n" + |
10263 |
"ZZZ2[TYPE_REF]{p.ZZZ2, p, Lp.ZZZ2;, null, null, " + (R_DEFAULT + R_RESOLVED + R_INTERESTING + R_CASE + R_ANNOTATION + R_TARGET + R_NON_RESTRICTED) + "}", |
10264 |
requestor.getResults()); |
10265 |
} |
10266 |
//https://bugs.eclipse.org/bugs/show_bug.cgi?id=158985 |
10267 |
public void test0321b() throws JavaModelException { |
10268 |
this.workingCopies = new ICompilationUnit[3]; |
10269 |
this.workingCopies[0] = getWorkingCopy( |
10270 |
"/Completion/src3/test/Test.java", |
10271 |
"package test;\n" + |
10272 |
"public class Test {\n" + |
10273 |
" @ZZZ(value={})\n" + |
10274 |
" int var = 0;\n" + |
10275 |
"}"); |
10276 |
|
10277 |
this.workingCopies[1] = getWorkingCopy( |
10278 |
"/Completion/src3/p/ZZZ1.java", |
10279 |
"package p;\n" + |
10280 |
"@java.lang.annotation.Target({java.lang.annotation.ElementType.FIELD})\n" + |
10281 |
"public @interface ZZZ1 {\n" + |
10282 |
"}"); |
10283 |
|
10284 |
this.workingCopies[2] = getWorkingCopy( |
10285 |
"/Completion/src3/p/ZZZ2.java", |
10286 |
"package p;\n" + |
10287 |
"public @interface ZZZ2 {\n" + |
10288 |
"}"); |
10289 |
|
10290 |
CompletionTestsRequestor2 requestor = new CompletionTestsRequestor2(true); |
10291 |
String str = this.workingCopies[0].getSource(); |
10292 |
String completeBehind = "ZZZ"; |
10293 |
int cursorLocation = str.lastIndexOf(completeBehind) + completeBehind.length(); |
10294 |
this.workingCopies[0].codeComplete(cursorLocation, requestor, this.wcOwner); |
10295 |
|
10296 |
assertResults( |
10297 |
"ZZZ1[TYPE_REF]{p.ZZZ1, p, Lp.ZZZ1;, null, null, " + (R_DEFAULT + R_RESOLVED + R_INTERESTING + R_CASE + R_ANNOTATION + R_TARGET + R_NON_RESTRICTED) + "}\n" + |
10298 |
"ZZZ2[TYPE_REF]{p.ZZZ2, p, Lp.ZZZ2;, null, null, " + (R_DEFAULT + R_RESOLVED + R_INTERESTING + R_CASE + R_ANNOTATION + R_TARGET + R_NON_RESTRICTED) + "}", |
10299 |
requestor.getResults()); |
10300 |
} |
10301 |
//https://bugs.eclipse.org/bugs/show_bug.cgi?id=158985 |
10302 |
public void test0322() throws JavaModelException { |
10303 |
this.workingCopies = new ICompilationUnit[3]; |
10304 |
this.workingCopies[0] = getWorkingCopy( |
10305 |
"/Completion/src3/test/Test.java", |
10306 |
"package test;\n" + |
10307 |
"public class Test {\n" + |
10308 |
" @ZZZ @Annot\n" + |
10309 |
" int var = 0;\n" + |
10310 |
"}"); |
10311 |
|
10312 |
this.workingCopies[1] = getWorkingCopy( |
10313 |
"/Completion/src3/p/ZZZ1.java", |
10314 |
"package p;\n" + |
10315 |
"@java.lang.annotation.Target({java.lang.annotation.ElementType.FIELD})\n" + |
10316 |
"public @interface ZZZ1 {\n" + |
10317 |
"}"); |
10318 |
|
10319 |
this.workingCopies[2] = getWorkingCopy( |
10320 |
"/Completion/src3/p/ZZZ2.java", |
10321 |
"package p;\n" + |
10322 |
"public @interface ZZZ2 {\n" + |
10323 |
"}"); |
10324 |
|
10325 |
CompletionTestsRequestor2 requestor = new CompletionTestsRequestor2(true); |
10326 |
String str = this.workingCopies[0].getSource(); |
10327 |
String completeBehind = "ZZZ"; |
10328 |
int cursorLocation = str.lastIndexOf(completeBehind) + completeBehind.length(); |
10329 |
this.workingCopies[0].codeComplete(cursorLocation, requestor, this.wcOwner); |
10330 |
|
10331 |
assertResults( |
10332 |
"ZZZ1[TYPE_REF]{p.ZZZ1, p, Lp.ZZZ1;, null, null, " + (R_DEFAULT + R_RESOLVED + R_INTERESTING + R_CASE + R_ANNOTATION + R_TARGET + R_NON_RESTRICTED) + "}\n" + |
10333 |
"ZZZ2[TYPE_REF]{p.ZZZ2, p, Lp.ZZZ2;, null, null, " + (R_DEFAULT + R_RESOLVED + R_INTERESTING + R_CASE + R_ANNOTATION + R_TARGET + R_NON_RESTRICTED) + "}", |
10334 |
requestor.getResults()); |
10335 |
} |
10336 |
//https://bugs.eclipse.org/bugs/show_bug.cgi?id=158985 |
10337 |
public void test0323() throws JavaModelException { |
10338 |
this.workingCopies = new ICompilationUnit[3]; |
10339 |
this.workingCopies[0] = getWorkingCopy( |
10340 |
"/Completion/src3/test/Test.java", |
10341 |
"package test;\n" + |
10342 |
"public class Test {\n" + |
10343 |
" @ZZZ @Annot({})\n" + |
10344 |
" int var = 0;\n" + |
10345 |
"}"); |
10346 |
|
10347 |
this.workingCopies[1] = getWorkingCopy( |
10348 |
"/Completion/src3/p/ZZZ1.java", |
10349 |
"package p;\n" + |
10350 |
"@java.lang.annotation.Target({java.lang.annotation.ElementType.FIELD})\n" + |
10351 |
"public @interface ZZZ1 {\n" + |
10352 |
"}"); |
10353 |
|
10354 |
this.workingCopies[2] = getWorkingCopy( |
10355 |
"/Completion/src3/p/ZZZ2.java", |
10356 |
"package p;\n" + |
10357 |
"public @interface ZZZ2 {\n" + |
10358 |
"}"); |
10359 |
|
10360 |
CompletionTestsRequestor2 requestor = new CompletionTestsRequestor2(true); |
10361 |
String str = this.workingCopies[0].getSource(); |
10362 |
String completeBehind = "ZZZ"; |
10363 |
int cursorLocation = str.lastIndexOf(completeBehind) + completeBehind.length(); |
10364 |
this.workingCopies[0].codeComplete(cursorLocation, requestor, this.wcOwner); |
10365 |
|
10366 |
assertResults( |
10367 |
"ZZZ1[TYPE_REF]{p.ZZZ1, p, Lp.ZZZ1;, null, null, " + (R_DEFAULT + R_RESOLVED + R_INTERESTING + R_CASE + R_ANNOTATION + R_TARGET + R_NON_RESTRICTED) + "}\n" + |
10368 |
"ZZZ2[TYPE_REF]{p.ZZZ2, p, Lp.ZZZ2;, null, null, " + (R_DEFAULT + R_RESOLVED + R_INTERESTING + R_CASE + R_ANNOTATION + R_TARGET + R_NON_RESTRICTED) + "}", |
10369 |
requestor.getResults()); |
10370 |
} |
10371 |
//https://bugs.eclipse.org/bugs/show_bug.cgi?id=158985 |
10372 |
public void test0324() throws JavaModelException { |
10373 |
this.workingCopies = new ICompilationUnit[4]; |
10374 |
this.workingCopies[0] = getWorkingCopy( |
10375 |
"/Completion/src3/test/Test.java", |
10376 |
"package test;\n" + |
10377 |
"public class Test {\n" + |
10378 |
" public void foo(@ZZZ int param){}\n" + |
10379 |
"}"); |
10380 |
|
10381 |
this.workingCopies[1] = getWorkingCopy( |
10382 |
"/Completion/src3/p/ZZZ1.java", |
10383 |
"package p;\n" + |
10384 |
"@java.lang.annotation.Target({java.lang.annotation.ElementType.FIELD})\n" + |
10385 |
"public @interface ZZZ1 {\n" + |
10386 |
"}"); |
10387 |
|
10388 |
this.workingCopies[2] = getWorkingCopy( |
10389 |
"/Completion/src3/p/ZZZ2.java", |
10390 |
"package p;\n" + |
10391 |
"@java.lang.annotation.Target({java.lang.annotation.ElementType.PARAMETER})\n" + |
10392 |
"public @interface ZZZ2 {\n" + |
10393 |
"}"); |
10394 |
|
10395 |
this.workingCopies[3] = getWorkingCopy( |
10396 |
"/Completion/src3/p/ZZZ3.java", |
10397 |
"package p;\n" + |
10398 |
"public @interface ZZZ3 {\n" + |
10399 |
"}"); |
10400 |
|
10401 |
CompletionTestsRequestor2 requestor = new CompletionTestsRequestor2(true); |
10402 |
String str = this.workingCopies[0].getSource(); |
10403 |
String completeBehind = "ZZZ"; |
10404 |
int cursorLocation = str.lastIndexOf(completeBehind) + completeBehind.length(); |
10405 |
this.workingCopies[0].codeComplete(cursorLocation, requestor, this.wcOwner); |
10406 |
|
10407 |
assertResults( |
10408 |
"ZZZ1[TYPE_REF]{p.ZZZ1, p, Lp.ZZZ1;, null, null, " + (R_DEFAULT + R_RESOLVED + R_INTERESTING + R_CASE + R_ANNOTATION + R_NON_RESTRICTED) + "}\n" + |
10409 |
"ZZZ2[TYPE_REF]{p.ZZZ2, p, Lp.ZZZ2;, null, null, " + (R_DEFAULT + R_RESOLVED + R_INTERESTING + R_CASE + R_ANNOTATION + R_TARGET + R_NON_RESTRICTED) + "}\n" + |
10410 |
"ZZZ3[TYPE_REF]{p.ZZZ3, p, Lp.ZZZ3;, null, null, " + (R_DEFAULT + R_RESOLVED + R_INTERESTING + R_CASE + R_ANNOTATION + R_TARGET + R_NON_RESTRICTED) + "}", |
10411 |
requestor.getResults()); |
10412 |
} |
10413 |
//https://bugs.eclipse.org/bugs/show_bug.cgi?id=158985 |
10414 |
public void test0325() throws JavaModelException { |
10415 |
this.workingCopies = new ICompilationUnit[4]; |
10416 |
this.workingCopies[0] = getWorkingCopy( |
10417 |
"/Completion/src3/test/Test.java", |
10418 |
"package test;\n" + |
10419 |
"public class Test {\n" + |
10420 |
" @p.Annot(@ZZZ)\n" + |
10421 |
" public void foo(){}\n" + |
10422 |
"}"); |
10423 |
|
10424 |
this.workingCopies[1] = getWorkingCopy( |
10425 |
"/Completion/src3/p/ZZZ1.java", |
10426 |
"package p;\n" + |
10427 |
"@java.lang.annotation.Target({java.lang.annotation.ElementType.METHOD})\n" + |
10428 |
"public @interface ZZZ1 {\n" + |
10429 |
"}"); |
10430 |
|
10431 |
this.workingCopies[2] = getWorkingCopy( |
10432 |
"/Completion/src3/p/ZZZ2.java", |
10433 |
"package p;\n" + |
10434 |
"public @interface ZZZ2 {\n" + |
10435 |
"}"); |
10436 |
|
10437 |
this.workingCopies[3] = getWorkingCopy( |
10438 |
"/Completion/src3/p/Annot.java", |
10439 |
"package p;\n" + |
10440 |
"public @interface Annot {\n" + |
10441 |
" ZZZ2 value();\n" + |
10442 |
"}"); |
10443 |
|
10444 |
CompletionTestsRequestor2 requestor = new CompletionTestsRequestor2(true); |
10445 |
String str = this.workingCopies[0].getSource(); |
10446 |
String completeBehind = "ZZZ"; |
10447 |
int cursorLocation = str.lastIndexOf(completeBehind) + completeBehind.length(); |
10448 |
this.workingCopies[0].codeComplete(cursorLocation, requestor, this.wcOwner); |
10449 |
|
10450 |
assertResults( |
10451 |
"ZZZ1[TYPE_REF]{p.ZZZ1, p, Lp.ZZZ1;, null, null, " + (R_DEFAULT + R_RESOLVED + R_INTERESTING + R_CASE + R_ANNOTATION + R_NON_RESTRICTED) + "}\n" + |
10452 |
"ZZZ2[TYPE_REF]{p.ZZZ2, p, Lp.ZZZ2;, null, null, " + (R_DEFAULT + R_RESOLVED + R_INTERESTING + R_CASE + R_ANNOTATION + R_NON_RESTRICTED) + "}", |
10453 |
requestor.getResults()); |
10454 |
} |
10455 |
//https://bugs.eclipse.org/bugs/show_bug.cgi?id=158985 |
10456 |
public void test0326() throws JavaModelException { |
10457 |
this.workingCopies = new ICompilationUnit[4]; |
10458 |
this.workingCopies[0] = getWorkingCopy( |
10459 |
"/Completion/src3/test/Test.java", |
10460 |
"package test;\n" + |
10461 |
"public class Test {\n" + |
10462 |
" @p.Annot(@ZZZ(value=0))\n" + |
10463 |
" public void foo(){}\n" + |
10464 |
"}"); |
10465 |
|
10466 |
this.workingCopies[1] = getWorkingCopy( |
10467 |
"/Completion/src3/p/ZZZ1.java", |
10468 |
"package p;\n" + |
10469 |
"@java.lang.annotation.Target({java.lang.annotation.ElementType.METHOD})\n" + |
10470 |
"public @interface ZZZ1 {\n" + |
10471 |
"}"); |
10472 |
|
10473 |
this.workingCopies[2] = getWorkingCopy( |
10474 |
"/Completion/src3/p/ZZZ2.java", |
10475 |
"package p;\n" + |
10476 |
"public @interface ZZZ2 {\n" + |
10477 |
"}"); |
10478 |
|
10479 |
this.workingCopies[3] = getWorkingCopy( |
10480 |
"/Completion/src3/p/Annot.java", |
10481 |
"package p;\n" + |
10482 |
"public @interface Annot {\n" + |
10483 |
" ZZZ2 value();\n" + |
10484 |
"}"); |
10485 |
|
10486 |
CompletionTestsRequestor2 requestor = new CompletionTestsRequestor2(true); |
10487 |
String str = this.workingCopies[0].getSource(); |
10488 |
String completeBehind = "ZZZ"; |
10489 |
int cursorLocation = str.lastIndexOf(completeBehind) + completeBehind.length(); |
10490 |
this.workingCopies[0].codeComplete(cursorLocation, requestor, this.wcOwner); |
10491 |
|
10492 |
assertResults( |
10493 |
"ZZZ1[TYPE_REF]{p.ZZZ1, p, Lp.ZZZ1;, null, null, " + (R_DEFAULT + R_RESOLVED + R_INTERESTING + R_CASE + R_ANNOTATION + R_NON_RESTRICTED) + "}\n" + |
10494 |
"ZZZ2[TYPE_REF]{p.ZZZ2, p, Lp.ZZZ2;, null, null, " + (R_DEFAULT + R_RESOLVED + R_INTERESTING + R_CASE + R_ANNOTATION + R_NON_RESTRICTED) + "}", |
10495 |
requestor.getResults()); |
10496 |
} |
10497 |
//https://bugs.eclipse.org/bugs/show_bug.cgi?id=158985 |
10498 |
public void test0327() throws JavaModelException { |
10499 |
this.workingCopies = new ICompilationUnit[4]; |
10500 |
this.workingCopies[0] = getWorkingCopy( |
10501 |
"/Completion/src3/test/Test.java", |
10502 |
"package test;\n" + |
10503 |
"public class Test {\n" + |
10504 |
" @p.Annot(@ZZZ(value=0\n" + |
10505 |
" public void foo(){}\n" + |
10506 |
"}"); |
10507 |
|
10508 |
this.workingCopies[1] = getWorkingCopy( |
10509 |
"/Completion/src3/p/ZZZ1.java", |
10510 |
"package p;\n" + |
10511 |
"@java.lang.annotation.Target({java.lang.annotation.ElementType.METHOD})\n" + |
10512 |
"public @interface ZZZ1 {\n" + |
10513 |
"}"); |
10514 |
|
10515 |
this.workingCopies[2] = getWorkingCopy( |
10516 |
"/Completion/src3/p/ZZZ2.java", |
10517 |
"package p;\n" + |
10518 |
"public @interface ZZZ2 {\n" + |
10519 |
"}"); |
10520 |
|
10521 |
this.workingCopies[3] = getWorkingCopy( |
10522 |
"/Completion/src3/p/Annot.java", |
10523 |
"package p;\n" + |
10524 |
"public @interface Annot {\n" + |
10525 |
" ZZZ2 value();\n" + |
10526 |
"}"); |
10527 |
|
10528 |
CompletionTestsRequestor2 requestor = new CompletionTestsRequestor2(true); |
10529 |
String str = this.workingCopies[0].getSource(); |
10530 |
String completeBehind = "ZZZ"; |
10531 |
int cursorLocation = str.lastIndexOf(completeBehind) + completeBehind.length(); |
10532 |
this.workingCopies[0].codeComplete(cursorLocation, requestor, this.wcOwner); |
10533 |
|
10534 |
assertResults( |
10535 |
"ZZZ1[TYPE_REF]{p.ZZZ1, p, Lp.ZZZ1;, null, null, " + (R_DEFAULT + R_RESOLVED + R_INTERESTING + R_CASE + R_ANNOTATION + R_NON_RESTRICTED) + "}\n" + |
10536 |
"ZZZ2[TYPE_REF]{p.ZZZ2, p, Lp.ZZZ2;, null, null, " + (R_DEFAULT + R_RESOLVED + R_INTERESTING + R_CASE + R_ANNOTATION + R_NON_RESTRICTED) + "}", |
10537 |
requestor.getResults()); |
10538 |
} |
10539 |
//https://bugs.eclipse.org/bugs/show_bug.cgi?id=158985 |
10540 |
public void test0328() throws JavaModelException { |
10541 |
this.workingCopies = new ICompilationUnit[4]; |
10542 |
this.workingCopies[0] = getWorkingCopy( |
10543 |
"/Completion/src3/test/Test.java", |
10544 |
"package test;\n" + |
10545 |
"public class Test {\n" + |
10546 |
" @p.Annot(@ZZZ(value=\n" + |
10547 |
" public void foo(){}\n" + |
10548 |
"}"); |
10549 |
|
10550 |
this.workingCopies[1] = getWorkingCopy( |
10551 |
"/Completion/src3/p/ZZZ1.java", |
10552 |
"package p;\n" + |
10553 |
"@java.lang.annotation.Target({java.lang.annotation.ElementType.METHOD})\n" + |
10554 |
"public @interface ZZZ1 {\n" + |
10555 |
"}"); |
10556 |
|
10557 |
this.workingCopies[2] = getWorkingCopy( |
10558 |
"/Completion/src3/p/ZZZ2.java", |
10559 |
"package p;\n" + |
10560 |
"public @interface ZZZ2 {\n" + |
10561 |
"}"); |
10562 |
|
10563 |
this.workingCopies[3] = getWorkingCopy( |
10564 |
"/Completion/src3/p/Annot.java", |
10565 |
"package p;\n" + |
10566 |
"public @interface Annot {\n" + |
10567 |
" ZZZ2 value();\n" + |
10568 |
"}"); |
10569 |
|
10570 |
CompletionTestsRequestor2 requestor = new CompletionTestsRequestor2(true); |
10571 |
String str = this.workingCopies[0].getSource(); |
10572 |
String completeBehind = "ZZZ"; |
10573 |
int cursorLocation = str.lastIndexOf(completeBehind) + completeBehind.length(); |
10574 |
this.workingCopies[0].codeComplete(cursorLocation, requestor, this.wcOwner); |
10575 |
|
10576 |
assertResults( |
10577 |
"ZZZ1[TYPE_REF]{p.ZZZ1, p, Lp.ZZZ1;, null, null, " + (R_DEFAULT + R_RESOLVED + R_INTERESTING + R_CASE + R_ANNOTATION + R_NON_RESTRICTED) + "}\n" + |
10578 |
"ZZZ2[TYPE_REF]{p.ZZZ2, p, Lp.ZZZ2;, null, null, " + (R_DEFAULT + R_RESOLVED + R_INTERESTING + R_CASE + R_ANNOTATION + R_NON_RESTRICTED) + "}", |
10579 |
requestor.getResults()); |
10580 |
} |
10581 |
//https://bugs.eclipse.org/bugs/show_bug.cgi?id=158985 |
10582 |
public void test0329() throws JavaModelException { |
10583 |
this.workingCopies = new ICompilationUnit[4]; |
10584 |
this.workingCopies[0] = getWorkingCopy( |
10585 |
"/Completion/src3/test/Test.java", |
10586 |
"package test;\n" + |
10587 |
"@ZZZ\n" + |
10588 |
"public class Test {\n" + |
10589 |
"}"); |
10590 |
|
10591 |
this.workingCopies[1] = getWorkingCopy( |
10592 |
"/Completion/src3/p/ZZZ1.java", |
10593 |
"package p;\n" + |
10594 |
"@java.lang.annotation.Target({java.lang.annotation.ElementType.TYPE})\n" + |
10595 |
"public @interface ZZZ1 {\n" + |
10596 |
"}"); |
10597 |
|
10598 |
this.workingCopies[1] = getWorkingCopy( |
10599 |
"/Completion/src3/p/ZZZ2.java", |
10600 |
"package p;\n" + |
10601 |
"@java.lang.annotation.Target({java.lang.annotation.ElementType.METHOD})\n" + |
10602 |
"public @interface ZZZ2 {\n" + |
10603 |
"}"); |
10604 |
|
10605 |
this.workingCopies[2] = getWorkingCopy( |
10606 |
"/Completion/src3/p/ZZZ3.java", |
10607 |
"package p;\n" + |
10608 |
"public @interface ZZZ3 {\n" + |
10609 |
"}"); |
10610 |
|
10611 |
|
10612 |
CompletionTestsRequestor2 requestor = new CompletionTestsRequestor2(true); |
10613 |
String str = this.workingCopies[0].getSource(); |
10614 |
String completeBehind = "ZZZ"; |
10615 |
int cursorLocation = str.lastIndexOf(completeBehind) + completeBehind.length(); |
10616 |
this.workingCopies[0].codeComplete(cursorLocation, requestor, this.wcOwner); |
10617 |
|
10618 |
assertResults( |
10619 |
"ZZZ1[TYPE_REF]{p.ZZZ1, p, Lp.ZZZ1;, null, null, " + (R_DEFAULT + R_RESOLVED + R_INTERESTING + R_CASE + R_ANNOTATION + R_TARGET + R_NON_RESTRICTED) + "}\n" + |
10620 |
"ZZZ3[TYPE_REF]{p.ZZZ3, p, Lp.ZZZ3;, null, null, " + (R_DEFAULT + R_RESOLVED + R_INTERESTING + R_CASE + R_ANNOTATION + R_TARGET + R_NON_RESTRICTED) + "}", |
10621 |
requestor.getResults()); |
10622 |
} |
9440 |
//https://bugs.eclipse.org/bugs/show_bug.cgi?id=153130 |
10623 |
//https://bugs.eclipse.org/bugs/show_bug.cgi?id=153130 |
9441 |
public void testEC001() throws JavaModelException { |
10624 |
public void testEC001() throws JavaModelException { |
9442 |
this.workingCopies = new ICompilationUnit[1]; |
10625 |
this.workingCopies = new ICompilationUnit[1]; |