Lines 51-57
Link Here
|
51 |
expectedReplacedSource, |
51 |
expectedReplacedSource, |
52 |
"diet ast"); |
52 |
"diet ast"); |
53 |
} |
53 |
} |
54 |
public void test0002(){ |
54 |
public void test0002_Diet(){ |
55 |
String str = |
55 |
String str = |
56 |
"package p;\n" + |
56 |
"package p;\n" + |
57 |
"public class X {\n" + |
57 |
"public class X {\n" + |
Lines 85-105
Link Here
|
85 |
completionIdentifier, |
85 |
completionIdentifier, |
86 |
expectedReplacedSource, |
86 |
expectedReplacedSource, |
87 |
"diet ast"); |
87 |
"diet ast"); |
88 |
|
88 |
} |
89 |
expectedCompletionNodeToString = "<CompleteOnName:zzz>"; |
89 |
public void test0002_Method(){ |
90 |
expectedParentNodeToString = "Object o = <CompleteOnName:zzz>;"; |
90 |
String str = |
91 |
completionIdentifier = "zzz"; |
91 |
"package p;\n" + |
92 |
expectedReplacedSource = "zzz"; |
92 |
"public class X {\n" + |
93 |
expectedUnitDisplayString = |
|
|
94 |
"package p;\n" + |
95 |
"public class X {\n" + |
96 |
" {\n" + |
93 |
" {\n" + |
97 |
" Object o = <CompleteOnName:zzz>;\n" + |
94 |
" Object o = zzz;\n" + |
98 |
" }\n" + |
|
|
99 |
" public X() {\n" + |
100 |
" }\n" + |
95 |
" }\n" + |
101 |
"}\n"; |
96 |
"}\n"; |
102 |
|
97 |
|
|
|
98 |
String completeBehind = "zzz"; |
99 |
int cursorLocation = str.indexOf("zzz") + completeBehind.length() - 1; |
100 |
|
101 |
String expectedCompletionNodeToString = "<CompleteOnName:zzz>"; |
102 |
String expectedParentNodeToString = "Object o = <CompleteOnName:zzz>;"; |
103 |
String completionIdentifier = "zzz"; |
104 |
String expectedReplacedSource = "zzz"; |
105 |
String expectedUnitDisplayString = |
106 |
"package p;\n" + |
107 |
"public class X {\n" + |
108 |
" {\n" + |
109 |
" Object o = <CompleteOnName:zzz>;\n" + |
110 |
" }\n" + |
111 |
" public X() {\n" + |
112 |
" }\n" + |
113 |
"}\n"; |
114 |
|
103 |
checkMethodParse( |
115 |
checkMethodParse( |
104 |
str.toCharArray(), |
116 |
str.toCharArray(), |
105 |
cursorLocation, |
117 |
cursorLocation, |
Lines 110-116
Link Here
|
110 |
expectedReplacedSource, |
122 |
expectedReplacedSource, |
111 |
"full ast"); |
123 |
"full ast"); |
112 |
} |
124 |
} |
113 |
public void test0003(){ |
125 |
public void test0003_Diet(){ |
114 |
String str = |
126 |
String str = |
115 |
"package p;\n" + |
127 |
"package p;\n" + |
116 |
"public class X {\n" + |
128 |
"public class X {\n" + |
Lines 144-163
Link Here
|
144 |
completionIdentifier, |
156 |
completionIdentifier, |
145 |
expectedReplacedSource, |
157 |
expectedReplacedSource, |
146 |
"diet ast"); |
158 |
"diet ast"); |
147 |
|
159 |
} |
148 |
expectedCompletionNodeToString = "<CompleteOnName:zzz>"; |
160 |
public void test0003_Method(){ |
149 |
expectedParentNodeToString = "Object o = <CompleteOnName:zzz>;"; |
161 |
String str = |
150 |
completionIdentifier = "zzz"; |
162 |
"package p;\n" + |
151 |
expectedReplacedSource = "zzz"; |
163 |
"public class X {\n" + |
152 |
expectedUnitDisplayString = |
164 |
" void foo(){\n" + |
153 |
"package p;\n" + |
165 |
" Object o = zzz;\n" + |
154 |
"public class X {\n" + |
|
|
155 |
" public X() {\n" + |
156 |
" }\n" + |
157 |
" void foo() {\n" + |
158 |
" Object o = <CompleteOnName:zzz>;\n" + |
159 |
" }\n" + |
166 |
" }\n" + |
160 |
"}\n"; |
167 |
"}\n"; |
|
|
168 |
|
169 |
String completeBehind = "zzz"; |
170 |
int cursorLocation = str.indexOf("zzz") + completeBehind.length() - 1; |
171 |
|
172 |
String expectedCompletionNodeToString = "<CompleteOnName:zzz>"; |
173 |
String expectedParentNodeToString = "Object o = <CompleteOnName:zzz>;"; |
174 |
String completionIdentifier = "zzz"; |
175 |
String expectedReplacedSource = "zzz"; |
176 |
String expectedUnitDisplayString = |
177 |
"package p;\n" + |
178 |
"public class X {\n" + |
179 |
" public X() {\n" + |
180 |
" }\n" + |
181 |
" void foo() {\n" + |
182 |
" Object o = <CompleteOnName:zzz>;\n" + |
183 |
" }\n" + |
184 |
"}\n"; |
161 |
|
185 |
|
162 |
checkMethodParse( |
186 |
checkMethodParse( |
163 |
str.toCharArray(), |
187 |
str.toCharArray(), |
Lines 202-208
Link Here
|
202 |
expectedReplacedSource, |
226 |
expectedReplacedSource, |
203 |
"diet ast"); |
227 |
"diet ast"); |
204 |
} |
228 |
} |
205 |
public void test0005(){ |
229 |
public void test0005_Diet(){ |
206 |
String str = |
230 |
String str = |
207 |
"package p;\n" + |
231 |
"package p;\n" + |
208 |
"public class X {\n" + |
232 |
"public class X {\n" + |
Lines 237-258
Link Here
|
237 |
completionIdentifier, |
261 |
completionIdentifier, |
238 |
expectedReplacedSource, |
262 |
expectedReplacedSource, |
239 |
"diet ast"); |
263 |
"diet ast"); |
240 |
|
264 |
} |
241 |
expectedCompletionNodeToString = "<CompleteOnName:zzz>"; |
265 |
public void test0005_Method(){ |
242 |
expectedParentNodeToString = "Object o = <CompleteOnName:zzz>;"; |
266 |
String str = |
243 |
completionIdentifier = "zzz"; |
267 |
"package p;\n" + |
244 |
expectedReplacedSource = "zzz"; |
268 |
"public class X {\n" + |
245 |
expectedUnitDisplayString = |
|
|
246 |
"package p;\n" + |
247 |
"public class X {\n" + |
248 |
" {\n" + |
269 |
" {\n" + |
249 |
" {\n" + |
270 |
" #\n" + |
250 |
" Object o = <CompleteOnName:zzz>;\n" + |
271 |
" Object o = zzz;\n" + |
251 |
" }\n" + |
|
|
252 |
" }\n" + |
253 |
" public X() {\n" + |
254 |
" }\n" + |
272 |
" }\n" + |
255 |
"}\n"; |
273 |
"}\n"; |
|
|
274 |
|
275 |
String completeBehind = "zzz"; |
276 |
int cursorLocation = str.indexOf("zzz") + completeBehind.length() - 1; |
277 |
|
278 |
String expectedCompletionNodeToString = "<CompleteOnName:zzz>"; |
279 |
String expectedParentNodeToString = "Object o = <CompleteOnName:zzz>;"; |
280 |
String completionIdentifier = "zzz"; |
281 |
String expectedReplacedSource = "zzz"; |
282 |
String expectedUnitDisplayString = |
283 |
"package p;\n" + |
284 |
"public class X {\n" + |
285 |
" {\n" + |
286 |
" {\n" + |
287 |
" Object o = <CompleteOnName:zzz>;\n" + |
288 |
" }\n" + |
289 |
" }\n" + |
290 |
" public X() {\n" + |
291 |
" }\n" + |
292 |
"}\n"; |
256 |
|
293 |
|
257 |
checkMethodParse( |
294 |
checkMethodParse( |
258 |
str.toCharArray(), |
295 |
str.toCharArray(), |
Lines 264-270
Link Here
|
264 |
expectedReplacedSource, |
301 |
expectedReplacedSource, |
265 |
"full ast"); |
302 |
"full ast"); |
266 |
} |
303 |
} |
267 |
public void test0006(){ |
304 |
public void test0006_Diet(){ |
268 |
String str = |
305 |
String str = |
269 |
"package p;\n" + |
306 |
"package p;\n" + |
270 |
"public class X {\n" + |
307 |
"public class X {\n" + |
Lines 299-319
Link Here
|
299 |
completionIdentifier, |
336 |
completionIdentifier, |
300 |
expectedReplacedSource, |
337 |
expectedReplacedSource, |
301 |
"diet ast"); |
338 |
"diet ast"); |
302 |
|
339 |
} |
303 |
|
340 |
public void test0006_Method(){ |
304 |
expectedCompletionNodeToString = "<CompleteOnName:zzz>"; |
341 |
String str = |
305 |
expectedParentNodeToString = "Object o = <CompleteOnName:zzz>;"; |
342 |
"package p;\n" + |
306 |
completionIdentifier = "zzz"; |
343 |
"public class X {\n" + |
307 |
expectedReplacedSource = "zzz"; |
344 |
" void foo(){\n" + |
308 |
expectedUnitDisplayString = |
345 |
" #\n" + |
309 |
"package p;\n" + |
346 |
" Object o = zzz;\n" + |
310 |
"public class X {\n" + |
|
|
311 |
" public X() {\n" + |
312 |
" }\n" + |
313 |
" void foo() {\n" + |
314 |
" Object o = <CompleteOnName:zzz>;\n" + |
315 |
" }\n" + |
347 |
" }\n" + |
316 |
"}\n"; |
348 |
"}\n"; |
|
|
349 |
|
350 |
String completeBehind = "zzz"; |
351 |
int cursorLocation = str.indexOf("zzz") + completeBehind.length() - 1; |
352 |
|
353 |
String expectedCompletionNodeToString = "<CompleteOnName:zzz>"; |
354 |
String expectedParentNodeToString = "Object o = <CompleteOnName:zzz>;"; |
355 |
String completionIdentifier = "zzz"; |
356 |
String expectedReplacedSource = "zzz"; |
357 |
String expectedUnitDisplayString = |
358 |
"package p;\n" + |
359 |
"public class X {\n" + |
360 |
" public X() {\n" + |
361 |
" }\n" + |
362 |
" void foo() {\n" + |
363 |
" Object o = <CompleteOnName:zzz>;\n" + |
364 |
" }\n" + |
365 |
"}\n"; |
317 |
checkMethodParse( |
366 |
checkMethodParse( |
318 |
str.toCharArray(), |
367 |
str.toCharArray(), |
319 |
cursorLocation, |
368 |
cursorLocation, |
Lines 356-362
Link Here
|
356 |
expectedReplacedSource, |
405 |
expectedReplacedSource, |
357 |
"diet ast"); |
406 |
"diet ast"); |
358 |
} |
407 |
} |
359 |
public void test0008(){ |
408 |
public void test0008_Diet(){ |
360 |
String str = |
409 |
String str = |
361 |
"package p;\n" + |
410 |
"package p;\n" + |
362 |
"public class X {\n" + |
411 |
"public class X {\n" + |
Lines 389-409
Link Here
|
389 |
expectedUnitDisplayString, |
438 |
expectedUnitDisplayString, |
390 |
completionIdentifier, |
439 |
completionIdentifier, |
391 |
expectedReplacedSource, |
440 |
expectedReplacedSource, |
392 |
"diet ast"); |
441 |
"diet ast"); |
393 |
|
442 |
} |
394 |
expectedCompletionNodeToString = "<CompleteOnType:zzz>"; |
443 |
public void test0008_Method(){ |
395 |
expectedParentNodeToString = "Object o = new <CompleteOnType:zzz>();"; |
444 |
String str = |
396 |
completionIdentifier = "zzz"; |
445 |
"package p;\n" + |
397 |
expectedReplacedSource = "zzz"; |
446 |
"public class X {\n" + |
398 |
expectedUnitDisplayString = |
|
|
399 |
"package p;\n" + |
400 |
"public class X {\n" + |
401 |
" {\n" + |
447 |
" {\n" + |
402 |
" Object o = new <CompleteOnType:zzz>();\n" + |
448 |
" Object o = new zzz;\n" + |
403 |
" }\n" + |
|
|
404 |
" public X() {\n" + |
405 |
" }\n" + |
449 |
" }\n" + |
406 |
"}\n"; |
450 |
"}\n"; |
|
|
451 |
|
452 |
String completeBehind = "zzz"; |
453 |
int cursorLocation = str.indexOf("zzz") + completeBehind.length() - 1; |
454 |
|
455 |
String expectedCompletionNodeToString = "<CompleteOnType:zzz>"; |
456 |
String expectedParentNodeToString = "Object o = new <CompleteOnType:zzz>();"; |
457 |
String completionIdentifier = "zzz"; |
458 |
String expectedReplacedSource = "zzz"; |
459 |
String expectedUnitDisplayString = |
460 |
"package p;\n" + |
461 |
"public class X {\n" + |
462 |
" {\n" + |
463 |
" Object o = new <CompleteOnType:zzz>();\n" + |
464 |
" }\n" + |
465 |
" public X() {\n" + |
466 |
" }\n" + |
467 |
"}\n"; |
407 |
|
468 |
|
408 |
checkMethodParse( |
469 |
checkMethodParse( |
409 |
str.toCharArray(), |
470 |
str.toCharArray(), |
Lines 415-421
Link Here
|
415 |
expectedReplacedSource, |
476 |
expectedReplacedSource, |
416 |
"full ast"); |
477 |
"full ast"); |
417 |
} |
478 |
} |
418 |
public void test0009(){ |
479 |
public void test0009_Diet(){ |
419 |
String str = |
480 |
String str = |
420 |
"package p;\n" + |
481 |
"package p;\n" + |
421 |
"public class X {\n" + |
482 |
"public class X {\n" + |
Lines 448-468
Link Here
|
448 |
expectedUnitDisplayString, |
509 |
expectedUnitDisplayString, |
449 |
completionIdentifier, |
510 |
completionIdentifier, |
450 |
expectedReplacedSource, |
511 |
expectedReplacedSource, |
451 |
"diet ast"); |
512 |
"diet ast"); |
452 |
|
513 |
} |
453 |
expectedCompletionNodeToString = "<CompleteOnType:zzz>"; |
514 |
public void test0009_Method(){ |
454 |
expectedParentNodeToString = "Object o = new <CompleteOnType:zzz>();"; |
515 |
String str = |
455 |
completionIdentifier = "zzz"; |
516 |
"package p;\n" + |
456 |
expectedReplacedSource = "zzz"; |
517 |
"public class X {\n" + |
457 |
expectedUnitDisplayString = |
518 |
" void foo(){\n" + |
458 |
"package p;\n" + |
519 |
" Object o = new zzz;\n" + |
459 |
"public class X {\n" + |
|
|
460 |
" public X() {\n" + |
461 |
" }\n" + |
462 |
" void foo() {\n" + |
463 |
" Object o = new <CompleteOnType:zzz>();\n" + |
464 |
" }\n" + |
520 |
" }\n" + |
465 |
"}\n"; |
521 |
"}\n"; |
|
|
522 |
|
523 |
String completeBehind = "zzz"; |
524 |
int cursorLocation = str.indexOf("zzz") + completeBehind.length() - 1; |
525 |
|
526 |
String expectedCompletionNodeToString = "<CompleteOnType:zzz>"; |
527 |
String expectedParentNodeToString = "Object o = new <CompleteOnType:zzz>();"; |
528 |
String completionIdentifier = "zzz"; |
529 |
String expectedReplacedSource = "zzz"; |
530 |
String expectedUnitDisplayString = |
531 |
"package p;\n" + |
532 |
"public class X {\n" + |
533 |
" public X() {\n" + |
534 |
" }\n" + |
535 |
" void foo() {\n" + |
536 |
" Object o = new <CompleteOnType:zzz>();\n" + |
537 |
" }\n" + |
538 |
"}\n"; |
466 |
|
539 |
|
467 |
checkMethodParse( |
540 |
checkMethodParse( |
468 |
str.toCharArray(), |
541 |
str.toCharArray(), |
Lines 507-513
Link Here
|
507 |
expectedReplacedSource, |
580 |
expectedReplacedSource, |
508 |
"diet ast"); |
581 |
"diet ast"); |
509 |
} |
582 |
} |
510 |
public void test0011(){ |
583 |
public void test0011_Diet(){ |
511 |
String str = |
584 |
String str = |
512 |
"package p;\n" + |
585 |
"package p;\n" + |
513 |
"public class X {\n" + |
586 |
"public class X {\n" + |
Lines 541-564
Link Here
|
541 |
expectedUnitDisplayString, |
614 |
expectedUnitDisplayString, |
542 |
completionIdentifier, |
615 |
completionIdentifier, |
543 |
expectedReplacedSource, |
616 |
expectedReplacedSource, |
544 |
"diet ast"); |
617 |
"diet ast"); |
545 |
|
618 |
} |
546 |
expectedCompletionNodeToString = "<CompleteOnType:zzz>"; |
619 |
public void test0011_Method(){ |
547 |
expectedParentNodeToString = "Object o = new <CompleteOnType:zzz>();"; |
620 |
String str = |
548 |
completionIdentifier = "zzz"; |
621 |
"package p;\n" + |
549 |
expectedReplacedSource = "zzz"; |
622 |
"public class X {\n" + |
550 |
expectedUnitDisplayString = |
623 |
" {\n" + |
551 |
"package p;\n" + |
624 |
" #\n" + |
552 |
"public class X {\n" + |
625 |
" Object o = new zzz;\n" + |
553 |
" {\n" + |
|
|
554 |
" {\n" + |
555 |
" Object o = new <CompleteOnType:zzz>();\n" + |
556 |
" }\n" + |
557 |
" }\n" + |
558 |
" public X() {\n" + |
559 |
" }\n" + |
626 |
" }\n" + |
560 |
"}\n"; |
627 |
"}\n"; |
561 |
|
628 |
|
|
|
629 |
String completeBehind = "zzz"; |
630 |
int cursorLocation = str.indexOf("zzz") + completeBehind.length() - 1; |
631 |
|
632 |
String expectedCompletionNodeToString = "<CompleteOnType:zzz>"; |
633 |
String expectedParentNodeToString = "Object o = new <CompleteOnType:zzz>();"; |
634 |
String completionIdentifier = "zzz"; |
635 |
String expectedReplacedSource = "zzz"; |
636 |
String expectedUnitDisplayString = |
637 |
"package p;\n" + |
638 |
"public class X {\n" + |
639 |
" {\n" + |
640 |
" {\n" + |
641 |
" Object o = new <CompleteOnType:zzz>();\n" + |
642 |
" }\n" + |
643 |
" }\n" + |
644 |
" public X() {\n" + |
645 |
" }\n" + |
646 |
"}\n"; |
647 |
|
562 |
checkMethodParse( |
648 |
checkMethodParse( |
563 |
str.toCharArray(), |
649 |
str.toCharArray(), |
564 |
cursorLocation, |
650 |
cursorLocation, |
Lines 569-575
Link Here
|
569 |
expectedReplacedSource, |
655 |
expectedReplacedSource, |
570 |
"full ast"); |
656 |
"full ast"); |
571 |
} |
657 |
} |
572 |
public void test0012(){ |
658 |
public void test0012_Diet(){ |
573 |
String str = |
659 |
String str = |
574 |
"package p;\n" + |
660 |
"package p;\n" + |
575 |
"public class X {\n" + |
661 |
"public class X {\n" + |
Lines 603-623
Link Here
|
603 |
expectedUnitDisplayString, |
689 |
expectedUnitDisplayString, |
604 |
completionIdentifier, |
690 |
completionIdentifier, |
605 |
expectedReplacedSource, |
691 |
expectedReplacedSource, |
606 |
"diet ast"); |
692 |
"diet ast"); |
607 |
|
693 |
} |
608 |
expectedCompletionNodeToString = "<CompleteOnType:zzz>"; |
694 |
public void test0012_Method(){ |
609 |
expectedParentNodeToString = "Object o = new <CompleteOnType:zzz>();"; |
695 |
String str = |
610 |
completionIdentifier = "zzz"; |
696 |
"package p;\n" + |
611 |
expectedReplacedSource = "zzz"; |
697 |
"public class X {\n" + |
612 |
expectedUnitDisplayString = |
698 |
" void foo(){\n" + |
613 |
"package p;\n" + |
699 |
" #\n" + |
614 |
"public class X {\n" + |
700 |
" Object o = new zzz;\n" + |
615 |
" public X() {\n" + |
|
|
616 |
" }\n" + |
617 |
" void foo() {\n" + |
618 |
" Object o = new <CompleteOnType:zzz>();\n" + |
619 |
" }\n" + |
701 |
" }\n" + |
620 |
"}\n"; |
702 |
"}\n"; |
|
|
703 |
|
704 |
String completeBehind = "zzz"; |
705 |
int cursorLocation = str.indexOf("zzz") + completeBehind.length() - 1; |
706 |
|
707 |
String expectedCompletionNodeToString = "<CompleteOnType:zzz>"; |
708 |
String expectedParentNodeToString = "Object o = new <CompleteOnType:zzz>();"; |
709 |
String completionIdentifier = "zzz"; |
710 |
String expectedReplacedSource = "zzz"; |
711 |
String expectedUnitDisplayString = |
712 |
"package p;\n" + |
713 |
"public class X {\n" + |
714 |
" public X() {\n" + |
715 |
" }\n" + |
716 |
" void foo() {\n" + |
717 |
" Object o = new <CompleteOnType:zzz>();\n" + |
718 |
" }\n" + |
719 |
"}\n"; |
621 |
|
720 |
|
622 |
checkMethodParse( |
721 |
checkMethodParse( |
623 |
str.toCharArray(), |
722 |
str.toCharArray(), |
Lines 664-670
Link Here
|
664 |
"diet ast"); |
763 |
"diet ast"); |
665 |
} |
764 |
} |
666 |
|
765 |
|
667 |
public void test0014(){ |
766 |
public void test0014_Diet(){ |
668 |
String str = |
767 |
String str = |
669 |
"package p;\n" + |
768 |
"package p;\n" + |
670 |
"public class X {\n" + |
769 |
"public class X {\n" + |
Lines 698-719
Link Here
|
698 |
expectedUnitDisplayString, |
797 |
expectedUnitDisplayString, |
699 |
completionIdentifier, |
798 |
completionIdentifier, |
700 |
expectedReplacedSource, |
799 |
expectedReplacedSource, |
701 |
"diet ast"); |
800 |
"diet ast"); |
702 |
|
801 |
} |
703 |
expectedCompletionNodeToString = "<CompleteOnName:zzz>"; |
802 |
public void test0014_Method(){ |
704 |
expectedParentNodeToString = "<NONE>"; |
803 |
String str = |
705 |
completionIdentifier = "zzz"; |
804 |
"package p;\n" + |
706 |
expectedReplacedSource = "zzz"; |
805 |
"public class X {\n" + |
707 |
expectedUnitDisplayString = |
|
|
708 |
"package p;\n" + |
709 |
"public class X {\n" + |
710 |
" {\n" + |
806 |
" {\n" + |
711 |
" Object o;\n" + |
807 |
" Object o = yyy;\n" + |
712 |
" <CompleteOnName:zzz>;\n" + |
808 |
" zzz\n" + |
713 |
" }\n" + |
|
|
714 |
" public X() {\n" + |
715 |
" }\n" + |
809 |
" }\n" + |
716 |
"}\n"; |
810 |
"}\n"; |
|
|
811 |
|
812 |
String completeBehind = "zzz"; |
813 |
int cursorLocation = str.indexOf("zzz") + completeBehind.length() - 1; |
814 |
|
815 |
String expectedCompletionNodeToString = "<CompleteOnName:zzz>"; |
816 |
String expectedParentNodeToString = "<NONE>"; |
817 |
String completionIdentifier = "zzz"; |
818 |
String expectedReplacedSource = "zzz"; |
819 |
String expectedUnitDisplayString = |
820 |
"package p;\n" + |
821 |
"public class X {\n" + |
822 |
" {\n" + |
823 |
" Object o;\n" + |
824 |
" <CompleteOnName:zzz>;\n" + |
825 |
" }\n" + |
826 |
" public X() {\n" + |
827 |
" }\n" + |
828 |
"}\n"; |
717 |
|
829 |
|
718 |
checkMethodParse( |
830 |
checkMethodParse( |
719 |
str.toCharArray(), |
831 |
str.toCharArray(), |
Lines 726-732
Link Here
|
726 |
"full ast"); |
838 |
"full ast"); |
727 |
} |
839 |
} |
728 |
|
840 |
|
729 |
public void test0015(){ |
841 |
public void test0015_Diet(){ |
730 |
String str = |
842 |
String str = |
731 |
"package p;\n" + |
843 |
"package p;\n" + |
732 |
"public class X {\n" + |
844 |
"public class X {\n" + |
Lines 760-781
Link Here
|
760 |
expectedUnitDisplayString, |
872 |
expectedUnitDisplayString, |
761 |
completionIdentifier, |
873 |
completionIdentifier, |
762 |
expectedReplacedSource, |
874 |
expectedReplacedSource, |
763 |
"diet ast"); |
875 |
"diet ast"); |
764 |
|
876 |
} |
765 |
expectedCompletionNodeToString = "<CompleteOnName:zzz>"; |
877 |
public void test0015_Method(){ |
766 |
expectedParentNodeToString = "<NONE>"; |
878 |
String str = |
767 |
completionIdentifier = "zzz"; |
879 |
"package p;\n" + |
768 |
expectedReplacedSource = "zzz"; |
880 |
"public class X {\n" + |
769 |
expectedUnitDisplayString = |
881 |
" void foo(){\n" + |
770 |
"package p;\n" + |
882 |
" Object o = yyy;\n" + |
771 |
"public class X {\n" + |
883 |
" zzz\n" + |
772 |
" public X() {\n" + |
|
|
773 |
" }\n" + |
774 |
" void foo() {\n" + |
775 |
" Object o;\n" + |
776 |
" <CompleteOnName:zzz>;\n" + |
777 |
" }\n" + |
884 |
" }\n" + |
778 |
"}\n"; |
885 |
"}\n"; |
|
|
886 |
|
887 |
String completeBehind = "zzz"; |
888 |
int cursorLocation = str.indexOf("zzz") + completeBehind.length() - 1; |
889 |
|
890 |
String expectedCompletionNodeToString = "<CompleteOnName:zzz>"; |
891 |
String expectedParentNodeToString = "<NONE>"; |
892 |
String completionIdentifier = "zzz"; |
893 |
String expectedReplacedSource = "zzz"; |
894 |
String expectedUnitDisplayString = |
895 |
"package p;\n" + |
896 |
"public class X {\n" + |
897 |
" public X() {\n" + |
898 |
" }\n" + |
899 |
" void foo() {\n" + |
900 |
" Object o;\n" + |
901 |
" <CompleteOnName:zzz>;\n" + |
902 |
" }\n" + |
903 |
"}\n"; |
779 |
|
904 |
|
780 |
checkMethodParse( |
905 |
checkMethodParse( |
781 |
str.toCharArray(), |
906 |
str.toCharArray(), |
Lines 824-830
Link Here
|
824 |
"diet ast"); |
949 |
"diet ast"); |
825 |
} |
950 |
} |
826 |
|
951 |
|
827 |
public void test0017(){ |
952 |
public void test0017_Diet(){ |
828 |
String str = |
953 |
String str = |
829 |
"package p;\n" + |
954 |
"package p;\n" + |
830 |
"public class X {\n" + |
955 |
"public class X {\n" + |
Lines 859-882
Link Here
|
859 |
expectedUnitDisplayString, |
984 |
expectedUnitDisplayString, |
860 |
completionIdentifier, |
985 |
completionIdentifier, |
861 |
expectedReplacedSource, |
986 |
expectedReplacedSource, |
862 |
"diet ast"); |
987 |
"diet ast"); |
863 |
|
988 |
} |
864 |
expectedCompletionNodeToString = "<CompleteOnName:zzz>"; |
989 |
public void test0017_Method(){ |
865 |
expectedParentNodeToString = "<NONE>"; |
990 |
String str = |
866 |
completionIdentifier = "zzz"; |
991 |
"package p;\n" + |
867 |
expectedReplacedSource = "zzz"; |
992 |
"public class X {\n" + |
868 |
expectedUnitDisplayString = |
|
|
869 |
"package p;\n" + |
870 |
"public class X {\n" + |
871 |
" {\n" + |
993 |
" {\n" + |
872 |
" {\n" + |
994 |
" #\n" + |
873 |
" Object o;\n" + |
995 |
" Object o = yyy;\n" + |
874 |
" <CompleteOnName:zzz>;\n" + |
996 |
" zzz\n" + |
875 |
" }\n" + |
|
|
876 |
" }\n" + |
877 |
" public X() {\n" + |
878 |
" }\n" + |
997 |
" }\n" + |
879 |
"}\n"; |
998 |
"}\n"; |
|
|
999 |
|
1000 |
String completeBehind = "zzz"; |
1001 |
int cursorLocation = str.indexOf("zzz") + completeBehind.length() - 1; |
1002 |
|
1003 |
String expectedCompletionNodeToString = "<CompleteOnName:zzz>"; |
1004 |
String expectedParentNodeToString = "<NONE>"; |
1005 |
String completionIdentifier = "zzz"; |
1006 |
String expectedReplacedSource = "zzz"; |
1007 |
String expectedUnitDisplayString = |
1008 |
"package p;\n" + |
1009 |
"public class X {\n" + |
1010 |
" {\n" + |
1011 |
" {\n" + |
1012 |
" Object o;\n" + |
1013 |
" <CompleteOnName:zzz>;\n" + |
1014 |
" }\n" + |
1015 |
" }\n" + |
1016 |
" public X() {\n" + |
1017 |
" }\n" + |
1018 |
"}\n"; |
880 |
|
1019 |
|
881 |
checkMethodParse( |
1020 |
checkMethodParse( |
882 |
str.toCharArray(), |
1021 |
str.toCharArray(), |
Lines 889-895
Link Here
|
889 |
"full ast"); |
1028 |
"full ast"); |
890 |
} |
1029 |
} |
891 |
|
1030 |
|
892 |
public void test0018(){ |
1031 |
public void test0018_Diet(){ |
893 |
String str = |
1032 |
String str = |
894 |
"package p;\n" + |
1033 |
"package p;\n" + |
895 |
"public class X {\n" + |
1034 |
"public class X {\n" + |
Lines 924-945
Link Here
|
924 |
expectedUnitDisplayString, |
1063 |
expectedUnitDisplayString, |
925 |
completionIdentifier, |
1064 |
completionIdentifier, |
926 |
expectedReplacedSource, |
1065 |
expectedReplacedSource, |
927 |
"diet ast"); |
1066 |
"diet ast"); |
928 |
|
1067 |
} |
929 |
expectedCompletionNodeToString = "<CompleteOnName:zzz>"; |
1068 |
public void test0018_Method(){ |
930 |
expectedParentNodeToString = "<NONE>"; |
1069 |
String str = |
931 |
completionIdentifier = "zzz"; |
1070 |
"package p;\n" + |
932 |
expectedReplacedSource = "zzz"; |
1071 |
"public class X {\n" + |
933 |
expectedUnitDisplayString = |
1072 |
" void foo(){\n" + |
934 |
"package p;\n" + |
1073 |
" #\n" + |
935 |
"public class X {\n" + |
1074 |
" Object o = yyy;\n" + |
936 |
" public X() {\n" + |
1075 |
" zzz\n" + |
937 |
" }\n" + |
|
|
938 |
" void foo() {\n" + |
939 |
" Object o;\n" + |
940 |
" <CompleteOnName:zzz>;\n" + |
941 |
" }\n" + |
1076 |
" }\n" + |
942 |
"}\n"; |
1077 |
"}\n"; |
|
|
1078 |
|
1079 |
String completeBehind = "zzz"; |
1080 |
int cursorLocation = str.indexOf("zzz") + completeBehind.length() - 1; |
1081 |
|
1082 |
String expectedCompletionNodeToString = "<CompleteOnName:zzz>"; |
1083 |
String expectedParentNodeToString = "<NONE>"; |
1084 |
String completionIdentifier = "zzz"; |
1085 |
String expectedReplacedSource = "zzz"; |
1086 |
String expectedUnitDisplayString = |
1087 |
"package p;\n" + |
1088 |
"public class X {\n" + |
1089 |
" public X() {\n" + |
1090 |
" }\n" + |
1091 |
" void foo() {\n" + |
1092 |
" Object o;\n" + |
1093 |
" <CompleteOnName:zzz>;\n" + |
1094 |
" }\n" + |
1095 |
"}\n"; |
943 |
|
1096 |
|
944 |
checkMethodParse( |
1097 |
checkMethodParse( |
945 |
str.toCharArray(), |
1098 |
str.toCharArray(), |
Lines 984-990
Link Here
|
984 |
"diet ast"); |
1137 |
"diet ast"); |
985 |
} |
1138 |
} |
986 |
|
1139 |
|
987 |
public void test0020(){ |
1140 |
public void test0020_Diet(){ |
988 |
String str = |
1141 |
String str = |
989 |
"package p;\n" + |
1142 |
"package p;\n" + |
990 |
"public class X {\n" + |
1143 |
"public class X {\n" + |
Lines 1017-1037
Link Here
|
1017 |
expectedUnitDisplayString, |
1170 |
expectedUnitDisplayString, |
1018 |
completionIdentifier, |
1171 |
completionIdentifier, |
1019 |
expectedReplacedSource, |
1172 |
expectedReplacedSource, |
1020 |
"diet ast"); |
1173 |
"diet ast"); |
1021 |
|
1174 |
} |
1022 |
expectedCompletionNodeToString = "<CompleteOnName:zzz>"; |
1175 |
public void test0020_Method(){ |
1023 |
expectedParentNodeToString = "bar(<CompleteOnName:zzz>)"; |
1176 |
String str = |
1024 |
completionIdentifier = "zzz"; |
1177 |
"package p;\n" + |
1025 |
expectedReplacedSource = "zzz"; |
1178 |
"public class X {\n" + |
1026 |
expectedUnitDisplayString = |
|
|
1027 |
"package p;\n" + |
1028 |
"public class X {\n" + |
1029 |
" {\n" + |
1179 |
" {\n" + |
1030 |
" Object o = bar(<CompleteOnName:zzz>);\n" + |
1180 |
" Object o = bar(zzz;\n" + |
1031 |
" }\n" + |
|
|
1032 |
" public X() {\n" + |
1033 |
" }\n" + |
1181 |
" }\n" + |
1034 |
"}\n"; |
1182 |
"}\n"; |
|
|
1183 |
|
1184 |
String completeBehind = "zzz"; |
1185 |
int cursorLocation = str.indexOf("zzz") + completeBehind.length() - 1; |
1186 |
|
1187 |
String expectedCompletionNodeToString = "<CompleteOnName:zzz>"; |
1188 |
String expectedParentNodeToString = "bar(<CompleteOnName:zzz>)"; |
1189 |
String completionIdentifier = "zzz"; |
1190 |
String expectedReplacedSource = "zzz"; |
1191 |
String expectedUnitDisplayString = |
1192 |
"package p;\n" + |
1193 |
"public class X {\n" + |
1194 |
" {\n" + |
1195 |
" Object o = bar(<CompleteOnName:zzz>);\n" + |
1196 |
" }\n" + |
1197 |
" public X() {\n" + |
1198 |
" }\n" + |
1199 |
"}\n"; |
1035 |
|
1200 |
|
1036 |
checkMethodParse( |
1201 |
checkMethodParse( |
1037 |
str.toCharArray(), |
1202 |
str.toCharArray(), |
Lines 1044-1050
Link Here
|
1044 |
"full ast"); |
1209 |
"full ast"); |
1045 |
} |
1210 |
} |
1046 |
|
1211 |
|
1047 |
public void test0021(){ |
1212 |
public void test0021_Diet(){ |
1048 |
String str = |
1213 |
String str = |
1049 |
"package p;\n" + |
1214 |
"package p;\n" + |
1050 |
"public class X {\n" + |
1215 |
"public class X {\n" + |
Lines 1077-1097
Link Here
|
1077 |
expectedUnitDisplayString, |
1242 |
expectedUnitDisplayString, |
1078 |
completionIdentifier, |
1243 |
completionIdentifier, |
1079 |
expectedReplacedSource, |
1244 |
expectedReplacedSource, |
1080 |
"diet ast"); |
1245 |
"diet ast"); |
1081 |
|
1246 |
} |
1082 |
expectedCompletionNodeToString = "<CompleteOnName:zzz>"; |
1247 |
public void test0021_Method(){ |
1083 |
expectedParentNodeToString = "bar(<CompleteOnName:zzz>)"; |
1248 |
String str = |
1084 |
completionIdentifier = "zzz"; |
1249 |
"package p;\n" + |
1085 |
expectedReplacedSource = "zzz"; |
1250 |
"public class X {\n" + |
1086 |
expectedUnitDisplayString = |
1251 |
" void foo(){\n" + |
1087 |
"package p;\n" + |
1252 |
" Object o = bar(zzz;\n" + |
1088 |
"public class X {\n" + |
|
|
1089 |
" public X() {\n" + |
1090 |
" }\n" + |
1091 |
" void foo() {\n" + |
1092 |
" Object o = bar(<CompleteOnName:zzz>);\n" + |
1093 |
" }\n" + |
1253 |
" }\n" + |
1094 |
"}\n"; |
1254 |
"}\n"; |
|
|
1255 |
|
1256 |
String completeBehind = "zzz"; |
1257 |
int cursorLocation = str.indexOf("zzz") + completeBehind.length() - 1; |
1258 |
|
1259 |
String expectedCompletionNodeToString = "<CompleteOnName:zzz>"; |
1260 |
String expectedParentNodeToString = "bar(<CompleteOnName:zzz>)"; |
1261 |
String completionIdentifier = "zzz"; |
1262 |
String expectedReplacedSource = "zzz"; |
1263 |
String expectedUnitDisplayString = |
1264 |
"package p;\n" + |
1265 |
"public class X {\n" + |
1266 |
" public X() {\n" + |
1267 |
" }\n" + |
1268 |
" void foo() {\n" + |
1269 |
" Object o = bar(<CompleteOnName:zzz>);\n" + |
1270 |
" }\n" + |
1271 |
"}\n"; |
1095 |
|
1272 |
|
1096 |
checkMethodParse( |
1273 |
checkMethodParse( |
1097 |
str.toCharArray(), |
1274 |
str.toCharArray(), |
Lines 1138-1144
Link Here
|
1138 |
"diet ast"); |
1315 |
"diet ast"); |
1139 |
} |
1316 |
} |
1140 |
|
1317 |
|
1141 |
public void test0023(){ |
1318 |
public void test0023_Diet(){ |
1142 |
String str = |
1319 |
String str = |
1143 |
"package p;\n" + |
1320 |
"package p;\n" + |
1144 |
"public class X {\n" + |
1321 |
"public class X {\n" + |
Lines 1172-1194
Link Here
|
1172 |
expectedUnitDisplayString, |
1349 |
expectedUnitDisplayString, |
1173 |
completionIdentifier, |
1350 |
completionIdentifier, |
1174 |
expectedReplacedSource, |
1351 |
expectedReplacedSource, |
1175 |
"diet ast"); |
1352 |
"diet ast"); |
1176 |
|
1353 |
} |
1177 |
expectedCompletionNodeToString = "<CompleteOnName:zzz>"; |
1354 |
public void test0023_Method(){ |
1178 |
expectedParentNodeToString = "bar(<CompleteOnName:zzz>)"; |
1355 |
String str = |
1179 |
completionIdentifier = "zzz"; |
1356 |
"package p;\n" + |
1180 |
expectedReplacedSource = "zzz"; |
1357 |
"public class X {\n" + |
1181 |
expectedUnitDisplayString = |
|
|
1182 |
"package p;\n" + |
1183 |
"public class X {\n" + |
1184 |
" {\n" + |
1358 |
" {\n" + |
1185 |
" {\n" + |
1359 |
" #\n" + |
1186 |
" Object o = bar(<CompleteOnName:zzz>);\n" + |
1360 |
" Object o = bar(zzz;\n" + |
1187 |
" }\n" + |
|
|
1188 |
" }\n" + |
1189 |
" public X() {\n" + |
1190 |
" }\n" + |
1361 |
" }\n" + |
1191 |
"}\n"; |
1362 |
"}\n"; |
|
|
1363 |
|
1364 |
String completeBehind = "zzz"; |
1365 |
int cursorLocation = str.indexOf("zzz") + completeBehind.length() - 1; |
1366 |
|
1367 |
String expectedCompletionNodeToString = "<CompleteOnName:zzz>"; |
1368 |
String expectedParentNodeToString = "bar(<CompleteOnName:zzz>)"; |
1369 |
String completionIdentifier = "zzz"; |
1370 |
String expectedReplacedSource = "zzz"; |
1371 |
String expectedUnitDisplayString = |
1372 |
"package p;\n" + |
1373 |
"public class X {\n" + |
1374 |
" {\n" + |
1375 |
" {\n" + |
1376 |
" Object o = bar(<CompleteOnName:zzz>);\n" + |
1377 |
" }\n" + |
1378 |
" }\n" + |
1379 |
" public X() {\n" + |
1380 |
" }\n" + |
1381 |
"}\n"; |
1192 |
|
1382 |
|
1193 |
checkMethodParse( |
1383 |
checkMethodParse( |
1194 |
str.toCharArray(), |
1384 |
str.toCharArray(), |
Lines 1201-1207
Link Here
|
1201 |
"full ast"); |
1391 |
"full ast"); |
1202 |
} |
1392 |
} |
1203 |
|
1393 |
|
1204 |
public void test0024(){ |
1394 |
public void test0024_Diet(){ |
1205 |
String str = |
1395 |
String str = |
1206 |
"package p;\n" + |
1396 |
"package p;\n" + |
1207 |
"public class X {\n" + |
1397 |
"public class X {\n" + |
Lines 1235-1255
Link Here
|
1235 |
expectedUnitDisplayString, |
1425 |
expectedUnitDisplayString, |
1236 |
completionIdentifier, |
1426 |
completionIdentifier, |
1237 |
expectedReplacedSource, |
1427 |
expectedReplacedSource, |
1238 |
"diet ast"); |
1428 |
"diet ast"); |
1239 |
|
1429 |
} |
1240 |
expectedCompletionNodeToString = "<CompleteOnName:zzz>"; |
1430 |
public void test0024_Method(){ |
1241 |
expectedParentNodeToString = "bar(<CompleteOnName:zzz>)"; |
1431 |
String str = |
1242 |
completionIdentifier = "zzz"; |
1432 |
"package p;\n" + |
1243 |
expectedReplacedSource = "zzz"; |
1433 |
"public class X {\n" + |
1244 |
expectedUnitDisplayString = |
1434 |
" void foo(){\n" + |
1245 |
"package p;\n" + |
1435 |
" #\n" + |
1246 |
"public class X {\n" + |
1436 |
" Object o = bar(zzz;\n" + |
1247 |
" public X() {\n" + |
|
|
1248 |
" }\n" + |
1249 |
" void foo() {\n" + |
1250 |
" Object o = bar(<CompleteOnName:zzz>);\n" + |
1251 |
" }\n" + |
1437 |
" }\n" + |
1252 |
"}\n"; |
1438 |
"}\n"; |
|
|
1439 |
|
1440 |
String completeBehind = "zzz"; |
1441 |
int cursorLocation = str.indexOf("zzz") + completeBehind.length() - 1; |
1442 |
|
1443 |
String expectedCompletionNodeToString = "<CompleteOnName:zzz>"; |
1444 |
String expectedParentNodeToString = "bar(<CompleteOnName:zzz>)"; |
1445 |
String completionIdentifier = "zzz"; |
1446 |
String expectedReplacedSource = "zzz"; |
1447 |
String expectedUnitDisplayString = |
1448 |
"package p;\n" + |
1449 |
"public class X {\n" + |
1450 |
" public X() {\n" + |
1451 |
" }\n" + |
1452 |
" void foo() {\n" + |
1453 |
" Object o = bar(<CompleteOnName:zzz>);\n" + |
1454 |
" }\n" + |
1455 |
"}\n"; |
1253 |
|
1456 |
|
1254 |
checkMethodParse( |
1457 |
checkMethodParse( |
1255 |
str.toCharArray(), |
1458 |
str.toCharArray(), |
Lines 1295-1301
Link Here
|
1295 |
} |
1498 |
} |
1296 |
|
1499 |
|
1297 |
|
1500 |
|
1298 |
public void test0026(){ |
1501 |
public void test0026_Diet(){ |
1299 |
String str = |
1502 |
String str = |
1300 |
"package p;\n" + |
1503 |
"package p;\n" + |
1301 |
"public class X {\n" + |
1504 |
"public class X {\n" + |
Lines 1328-1348
Link Here
|
1328 |
expectedUnitDisplayString, |
1531 |
expectedUnitDisplayString, |
1329 |
completionIdentifier, |
1532 |
completionIdentifier, |
1330 |
expectedReplacedSource, |
1533 |
expectedReplacedSource, |
1331 |
"diet ast"); |
1534 |
"diet ast"); |
1332 |
|
1535 |
} |
1333 |
expectedCompletionNodeToString = "<CompleteOnName:zzz>"; |
1536 |
public void test0026_Method(){ |
1334 |
expectedParentNodeToString = "new X(<CompleteOnName:zzz>)"; |
1537 |
String str = |
1335 |
completionIdentifier = "zzz"; |
1538 |
"package p;\n" + |
1336 |
expectedReplacedSource = "zzz"; |
1539 |
"public class X {\n" + |
1337 |
expectedUnitDisplayString = |
|
|
1338 |
"package p;\n" + |
1339 |
"public class X {\n" + |
1340 |
" {\n" + |
1540 |
" {\n" + |
1341 |
" Object o = new X(<CompleteOnName:zzz>);\n" + |
1541 |
" Object o = new X(zzz;\n" + |
1342 |
" }\n" + |
|
|
1343 |
" public X() {\n" + |
1344 |
" }\n" + |
1542 |
" }\n" + |
1345 |
"}\n"; |
1543 |
"}\n"; |
|
|
1544 |
|
1545 |
String completeBehind = "zzz"; |
1546 |
int cursorLocation = str.indexOf("zzz") + completeBehind.length() - 1; |
1547 |
|
1548 |
String expectedCompletionNodeToString = "<CompleteOnName:zzz>"; |
1549 |
String expectedParentNodeToString = "new X(<CompleteOnName:zzz>)"; |
1550 |
String completionIdentifier = "zzz"; |
1551 |
String expectedReplacedSource = "zzz"; |
1552 |
String expectedUnitDisplayString = |
1553 |
"package p;\n" + |
1554 |
"public class X {\n" + |
1555 |
" {\n" + |
1556 |
" Object o = new X(<CompleteOnName:zzz>);\n" + |
1557 |
" }\n" + |
1558 |
" public X() {\n" + |
1559 |
" }\n" + |
1560 |
"}\n"; |
1346 |
|
1561 |
|
1347 |
checkMethodParse( |
1562 |
checkMethodParse( |
1348 |
str.toCharArray(), |
1563 |
str.toCharArray(), |
Lines 1356-1362
Link Here
|
1356 |
} |
1571 |
} |
1357 |
|
1572 |
|
1358 |
|
1573 |
|
1359 |
public void test0027(){ |
1574 |
public void test0027_Diet(){ |
1360 |
String str = |
1575 |
String str = |
1361 |
"package p;\n" + |
1576 |
"package p;\n" + |
1362 |
"public class X {\n" + |
1577 |
"public class X {\n" + |
Lines 1389-1409
Link Here
|
1389 |
expectedUnitDisplayString, |
1604 |
expectedUnitDisplayString, |
1390 |
completionIdentifier, |
1605 |
completionIdentifier, |
1391 |
expectedReplacedSource, |
1606 |
expectedReplacedSource, |
1392 |
"diet ast"); |
1607 |
"diet ast"); |
1393 |
|
1608 |
} |
1394 |
expectedCompletionNodeToString = "<CompleteOnName:zzz>"; |
1609 |
public void test0027_Method(){ |
1395 |
expectedParentNodeToString = "new X(<CompleteOnName:zzz>)"; |
1610 |
String str = |
1396 |
completionIdentifier = "zzz"; |
1611 |
"package p;\n" + |
1397 |
expectedReplacedSource = "zzz"; |
1612 |
"public class X {\n" + |
1398 |
expectedUnitDisplayString = |
1613 |
" void foo(){\n" + |
1399 |
"package p;\n" + |
1614 |
" Object o = new X(zzz;\n" + |
1400 |
"public class X {\n" + |
|
|
1401 |
" public X() {\n" + |
1402 |
" }\n" + |
1403 |
" void foo() {\n" + |
1404 |
" Object o = new X(<CompleteOnName:zzz>);\n" + |
1405 |
" }\n" + |
1615 |
" }\n" + |
1406 |
"}\n"; |
1616 |
"}\n"; |
|
|
1617 |
|
1618 |
String completeBehind = "zzz"; |
1619 |
int cursorLocation = str.indexOf("zzz") + completeBehind.length() - 1; |
1620 |
|
1621 |
String expectedCompletionNodeToString = "<CompleteOnName:zzz>"; |
1622 |
String expectedParentNodeToString = "new X(<CompleteOnName:zzz>)"; |
1623 |
String completionIdentifier = "zzz"; |
1624 |
String expectedReplacedSource = "zzz"; |
1625 |
String expectedUnitDisplayString = |
1626 |
"package p;\n" + |
1627 |
"public class X {\n" + |
1628 |
" public X() {\n" + |
1629 |
" }\n" + |
1630 |
" void foo() {\n" + |
1631 |
" Object o = new X(<CompleteOnName:zzz>);\n" + |
1632 |
" }\n" + |
1633 |
"}\n"; |
1407 |
|
1634 |
|
1408 |
checkMethodParse( |
1635 |
checkMethodParse( |
1409 |
str.toCharArray(), |
1636 |
str.toCharArray(), |
Lines 1452-1458
Link Here
|
1452 |
} |
1679 |
} |
1453 |
|
1680 |
|
1454 |
|
1681 |
|
1455 |
public void test0029(){ |
1682 |
public void test0029_Diet(){ |
1456 |
String str = |
1683 |
String str = |
1457 |
"package p;\n" + |
1684 |
"package p;\n" + |
1458 |
"public class X {\n" + |
1685 |
"public class X {\n" + |
Lines 1486-1508
Link Here
|
1486 |
expectedUnitDisplayString, |
1713 |
expectedUnitDisplayString, |
1487 |
completionIdentifier, |
1714 |
completionIdentifier, |
1488 |
expectedReplacedSource, |
1715 |
expectedReplacedSource, |
1489 |
"diet ast"); |
1716 |
"diet ast"); |
1490 |
|
1717 |
} |
1491 |
expectedCompletionNodeToString = "<CompleteOnName:zzz>"; |
1718 |
public void test0029_Method(){ |
1492 |
expectedParentNodeToString = "new X(<CompleteOnName:zzz>)"; |
1719 |
String str = |
1493 |
completionIdentifier = "zzz"; |
1720 |
"package p;\n" + |
1494 |
expectedReplacedSource = "zzz"; |
1721 |
"public class X {\n" + |
1495 |
expectedUnitDisplayString = |
|
|
1496 |
"package p;\n" + |
1497 |
"public class X {\n" + |
1498 |
" {\n" + |
1722 |
" {\n" + |
1499 |
" {\n" + |
1723 |
" #\n" + |
1500 |
" Object o = new X(<CompleteOnName:zzz>);\n" + |
1724 |
" Object o = new X(zzz;\n" + |
1501 |
" }\n" + |
|
|
1502 |
" }\n" + |
1503 |
" public X() {\n" + |
1504 |
" }\n" + |
1725 |
" }\n" + |
1505 |
"}\n"; |
1726 |
"}\n"; |
|
|
1727 |
|
1728 |
String completeBehind = "zzz"; |
1729 |
int cursorLocation = str.indexOf("zzz") + completeBehind.length() - 1; |
1730 |
|
1731 |
String expectedCompletionNodeToString = "<CompleteOnName:zzz>"; |
1732 |
String expectedParentNodeToString = "new X(<CompleteOnName:zzz>)"; |
1733 |
String completionIdentifier = "zzz"; |
1734 |
String expectedReplacedSource = "zzz"; |
1735 |
String expectedUnitDisplayString = |
1736 |
"package p;\n" + |
1737 |
"public class X {\n" + |
1738 |
" {\n" + |
1739 |
" {\n" + |
1740 |
" Object o = new X(<CompleteOnName:zzz>);\n" + |
1741 |
" }\n" + |
1742 |
" }\n" + |
1743 |
" public X() {\n" + |
1744 |
" }\n" + |
1745 |
"}\n"; |
1506 |
|
1746 |
|
1507 |
checkMethodParse( |
1747 |
checkMethodParse( |
1508 |
str.toCharArray(), |
1748 |
str.toCharArray(), |
Lines 1516-1522
Link Here
|
1516 |
} |
1756 |
} |
1517 |
|
1757 |
|
1518 |
|
1758 |
|
1519 |
public void test0030(){ |
1759 |
public void test0030_Diet(){ |
1520 |
String str = |
1760 |
String str = |
1521 |
"package p;\n" + |
1761 |
"package p;\n" + |
1522 |
"public class X {\n" + |
1762 |
"public class X {\n" + |
Lines 1550-1570
Link Here
|
1550 |
expectedUnitDisplayString, |
1790 |
expectedUnitDisplayString, |
1551 |
completionIdentifier, |
1791 |
completionIdentifier, |
1552 |
expectedReplacedSource, |
1792 |
expectedReplacedSource, |
1553 |
"diet ast"); |
1793 |
"diet ast"); |
1554 |
|
1794 |
} |
1555 |
expectedCompletionNodeToString = "<CompleteOnName:zzz>"; |
1795 |
public void test0030_Method(){ |
1556 |
expectedParentNodeToString = "new X(<CompleteOnName:zzz>)"; |
1796 |
String str = |
1557 |
completionIdentifier = "zzz"; |
1797 |
"package p;\n" + |
1558 |
expectedReplacedSource = "zzz"; |
1798 |
"public class X {\n" + |
1559 |
expectedUnitDisplayString = |
1799 |
" void foo(){\n" + |
1560 |
"package p;\n" + |
1800 |
" #\n" + |
1561 |
"public class X {\n" + |
1801 |
" Object o = new X(zzz;\n" + |
1562 |
" public X() {\n" + |
|
|
1563 |
" }\n" + |
1564 |
" void foo() {\n" + |
1565 |
" Object o = new X(<CompleteOnName:zzz>);\n" + |
1566 |
" }\n" + |
1802 |
" }\n" + |
1567 |
"}\n"; |
1803 |
"}\n"; |
|
|
1804 |
|
1805 |
String completeBehind = "zzz"; |
1806 |
int cursorLocation = str.indexOf("zzz") + completeBehind.length() - 1; |
1807 |
|
1808 |
String expectedCompletionNodeToString = "<CompleteOnName:zzz>"; |
1809 |
String expectedParentNodeToString = "new X(<CompleteOnName:zzz>)"; |
1810 |
String completionIdentifier = "zzz"; |
1811 |
String expectedReplacedSource = "zzz"; |
1812 |
String expectedUnitDisplayString = |
1813 |
"package p;\n" + |
1814 |
"public class X {\n" + |
1815 |
" public X() {\n" + |
1816 |
" }\n" + |
1817 |
" void foo() {\n" + |
1818 |
" Object o = new X(<CompleteOnName:zzz>);\n" + |
1819 |
" }\n" + |
1820 |
"}\n"; |
1568 |
|
1821 |
|
1569 |
checkMethodParse( |
1822 |
checkMethodParse( |
1570 |
str.toCharArray(), |
1823 |
str.toCharArray(), |
Lines 1576-1582
Link Here
|
1576 |
expectedReplacedSource, |
1829 |
expectedReplacedSource, |
1577 |
"full ast"); |
1830 |
"full ast"); |
1578 |
} |
1831 |
} |
1579 |
public void test0031(){ |
1832 |
public void test0031_Diet(){ |
1580 |
String str = |
1833 |
String str = |
1581 |
"package p;\n" + |
1834 |
"package p;\n" + |
1582 |
"public class X {\n" + |
1835 |
"public class X {\n" + |
Lines 1609-1629
Link Here
|
1609 |
completionIdentifier, |
1862 |
completionIdentifier, |
1610 |
expectedReplacedSource, |
1863 |
expectedReplacedSource, |
1611 |
"diet ast"); |
1864 |
"diet ast"); |
1612 |
|
1865 |
} |
1613 |
expectedCompletionNodeToString = "<CompleteOnName:zzz>"; |
1866 |
public void test0031_Method(){ |
1614 |
expectedParentNodeToString = "<NONE>"; |
1867 |
String str = |
1615 |
completionIdentifier = "zzz"; |
1868 |
"package p;\n" + |
1616 |
expectedReplacedSource = "zzz"; |
1869 |
"public class X {\n" + |
1617 |
expectedUnitDisplayString = |
1870 |
" Object o = {zzz;\n" + |
1618 |
"package p;\n" + |
|
|
1619 |
"public class X {\n" + |
1620 |
" Object o;\n" + |
1621 |
" {\n" + |
1622 |
" <CompleteOnName:zzz>;\n" + |
1623 |
" }\n" + |
1624 |
" public X() {\n" + |
1625 |
" }\n" + |
1626 |
"}\n"; |
1871 |
"}\n"; |
|
|
1872 |
|
1873 |
String completeBehind = "zzz"; |
1874 |
int cursorLocation = str.indexOf("zzz") + completeBehind.length() - 1; |
1875 |
|
1876 |
String expectedCompletionNodeToString = "<CompleteOnName:zzz>"; |
1877 |
String expectedParentNodeToString = "<NONE>"; |
1878 |
String completionIdentifier = "zzz"; |
1879 |
String expectedReplacedSource = "zzz"; |
1880 |
String expectedUnitDisplayString = |
1881 |
"package p;\n" + |
1882 |
"public class X {\n" + |
1883 |
" Object o;\n" + |
1884 |
" {\n" + |
1885 |
" <CompleteOnName:zzz>;\n" + |
1886 |
" }\n" + |
1887 |
" public X() {\n" + |
1888 |
" }\n" + |
1889 |
"}\n"; |
1627 |
|
1890 |
|
1628 |
checkMethodParse( |
1891 |
checkMethodParse( |
1629 |
str.toCharArray(), |
1892 |
str.toCharArray(), |
Lines 1636-1642
Link Here
|
1636 |
"full ast"); |
1899 |
"full ast"); |
1637 |
} |
1900 |
} |
1638 |
|
1901 |
|
1639 |
public void test0032(){ |
1902 |
public void test0032_Diet(){ |
1640 |
String str = |
1903 |
String str = |
1641 |
"package p;\n" + |
1904 |
"package p;\n" + |
1642 |
"public class X {\n" + |
1905 |
"public class X {\n" + |
Lines 1670-1692
Link Here
|
1670 |
completionIdentifier, |
1933 |
completionIdentifier, |
1671 |
expectedReplacedSource, |
1934 |
expectedReplacedSource, |
1672 |
"diet ast"); |
1935 |
"diet ast"); |
1673 |
|
1936 |
} |
1674 |
expectedCompletionNodeToString = "<CompleteOnName:zzz>"; |
1937 |
public void test0032_Method(){ |
1675 |
expectedParentNodeToString = "<NONE>"; |
1938 |
String str = |
1676 |
completionIdentifier = "zzz"; |
1939 |
"package p;\n" + |
1677 |
expectedReplacedSource = "zzz"; |
1940 |
"public class X {\n" + |
1678 |
expectedUnitDisplayString = |
|
|
1679 |
"package p;\n" + |
1680 |
"public class X {\n" + |
1681 |
" {\n" + |
1941 |
" {\n" + |
1682 |
" Object o;\n" + |
1942 |
" Object o = {zzz;\n" + |
1683 |
" {\n" + |
|
|
1684 |
" <CompleteOnName:zzz>;\n" + |
1685 |
" }\n" + |
1686 |
" }\n" + |
1687 |
" public X() {\n" + |
1688 |
" }\n" + |
1943 |
" }\n" + |
1689 |
"}\n"; |
1944 |
"}\n"; |
|
|
1945 |
|
1946 |
String completeBehind = "zzz"; |
1947 |
int cursorLocation = str.indexOf("zzz") + completeBehind.length() - 1; |
1948 |
|
1949 |
String expectedCompletionNodeToString = "<CompleteOnName:zzz>"; |
1950 |
String expectedParentNodeToString = "<NONE>"; |
1951 |
String completionIdentifier = "zzz"; |
1952 |
String expectedReplacedSource = "zzz"; |
1953 |
String expectedUnitDisplayString = |
1954 |
"package p;\n" + |
1955 |
"public class X {\n" + |
1956 |
" {\n" + |
1957 |
" Object o;\n" + |
1958 |
" {\n" + |
1959 |
" <CompleteOnName:zzz>;\n" + |
1960 |
" }\n" + |
1961 |
" }\n" + |
1962 |
" public X() {\n" + |
1963 |
" }\n" + |
1964 |
"}\n"; |
1690 |
|
1965 |
|
1691 |
checkMethodParse( |
1966 |
checkMethodParse( |
1692 |
str.toCharArray(), |
1967 |
str.toCharArray(), |
Lines 1699-1705
Link Here
|
1699 |
"full ast"); |
1974 |
"full ast"); |
1700 |
} |
1975 |
} |
1701 |
|
1976 |
|
1702 |
public void test0033(){ |
1977 |
public void test0033_Diet(){ |
1703 |
String str = |
1978 |
String str = |
1704 |
"package p;\n" + |
1979 |
"package p;\n" + |
1705 |
"public class X {\n" + |
1980 |
"public class X {\n" + |
Lines 1736-1758
Link Here
|
1736 |
completionIdentifier, |
2011 |
completionIdentifier, |
1737 |
expectedReplacedSource, |
2012 |
expectedReplacedSource, |
1738 |
"diet ast"); |
2013 |
"diet ast"); |
1739 |
|
2014 |
} |
1740 |
expectedCompletionNodeToString = "<CompleteOnName:zzz>"; |
2015 |
public void test0033_Method(){ |
1741 |
expectedParentNodeToString = "<NONE>"; |
2016 |
String str = |
1742 |
completionIdentifier = "zzz"; |
2017 |
"package p;\n" + |
1743 |
expectedReplacedSource = "zzz"; |
2018 |
"public class X {\n" + |
1744 |
expectedUnitDisplayString = |
2019 |
" void foo(){\n" + |
1745 |
"package p;\n" + |
2020 |
" Object o = {zzz;\n" + |
1746 |
"public class X {\n" + |
|
|
1747 |
" public X() {\n" + |
1748 |
" }\n" + |
1749 |
" void foo() {\n" + |
1750 |
" Object o;\n" + |
1751 |
" {\n" + |
1752 |
" <CompleteOnName:zzz>;\n" + |
1753 |
" }\n" + |
1754 |
" }\n" + |
2021 |
" }\n" + |
1755 |
"}\n"; |
2022 |
"}\n"; |
|
|
2023 |
|
2024 |
String completeBehind = "zzz"; |
2025 |
int cursorLocation = str.indexOf("zzz") + completeBehind.length() - 1; |
2026 |
|
2027 |
String expectedCompletionNodeToString = "<CompleteOnName:zzz>"; |
2028 |
String expectedParentNodeToString = "<NONE>"; |
2029 |
String completionIdentifier = "zzz"; |
2030 |
String expectedReplacedSource = "zzz"; |
2031 |
String expectedUnitDisplayString = |
2032 |
"package p;\n" + |
2033 |
"public class X {\n" + |
2034 |
" public X() {\n" + |
2035 |
" }\n" + |
2036 |
" void foo() {\n" + |
2037 |
" Object o;\n" + |
2038 |
" {\n" + |
2039 |
" <CompleteOnName:zzz>;\n" + |
2040 |
" }\n" + |
2041 |
" }\n" + |
2042 |
"}\n"; |
1756 |
|
2043 |
|
1757 |
checkMethodParse( |
2044 |
checkMethodParse( |
1758 |
str.toCharArray(), |
2045 |
str.toCharArray(), |
Lines 1765-1771
Link Here
|
1765 |
"full ast"); |
2052 |
"full ast"); |
1766 |
} |
2053 |
} |
1767 |
|
2054 |
|
1768 |
public void test0034(){ |
2055 |
public void test0034_Diet(){ |
1769 |
String str = |
2056 |
String str = |
1770 |
"package p;\n" + |
2057 |
"package p;\n" + |
1771 |
"public class X {\n" + |
2058 |
"public class X {\n" + |
Lines 1799-1819
Link Here
|
1799 |
completionIdentifier, |
2086 |
completionIdentifier, |
1800 |
expectedReplacedSource, |
2087 |
expectedReplacedSource, |
1801 |
"diet ast"); |
2088 |
"diet ast"); |
1802 |
|
2089 |
} |
1803 |
expectedCompletionNodeToString = "<CompleteOnName:zzz>"; |
2090 |
public void test0034_Method(){ |
1804 |
expectedParentNodeToString = "<NONE>"; |
2091 |
String str = |
1805 |
completionIdentifier = "zzz"; |
2092 |
"package p;\n" + |
1806 |
expectedReplacedSource = "zzz"; |
2093 |
"public class X {\n" + |
1807 |
expectedUnitDisplayString = |
2094 |
" #\n" + |
1808 |
"package p;\n" + |
2095 |
" Object o = {zzz;\n" + |
1809 |
"public class X {\n" + |
|
|
1810 |
" Object o;\n" + |
1811 |
" {\n" + |
1812 |
" <CompleteOnName:zzz>;\n" + |
1813 |
" }\n" + |
1814 |
" public X() {\n" + |
1815 |
" }\n" + |
1816 |
"}\n"; |
2096 |
"}\n"; |
|
|
2097 |
|
2098 |
String completeBehind = "zzz"; |
2099 |
int cursorLocation = str.indexOf("zzz") + completeBehind.length() - 1; |
2100 |
|
2101 |
String expectedCompletionNodeToString = "<CompleteOnName:zzz>"; |
2102 |
String expectedParentNodeToString = "<NONE>"; |
2103 |
String completionIdentifier = "zzz"; |
2104 |
String expectedReplacedSource = "zzz"; |
2105 |
String expectedUnitDisplayString = |
2106 |
"package p;\n" + |
2107 |
"public class X {\n" + |
2108 |
" Object o;\n" + |
2109 |
" {\n" + |
2110 |
" <CompleteOnName:zzz>;\n" + |
2111 |
" }\n" + |
2112 |
" public X() {\n" + |
2113 |
" }\n" + |
2114 |
"}\n"; |
1817 |
|
2115 |
|
1818 |
checkMethodParse( |
2116 |
checkMethodParse( |
1819 |
str.toCharArray(), |
2117 |
str.toCharArray(), |
Lines 1826-1832
Link Here
|
1826 |
"full ast"); |
2124 |
"full ast"); |
1827 |
} |
2125 |
} |
1828 |
|
2126 |
|
1829 |
public void test0035(){ |
2127 |
public void test0035_Diet(){ |
1830 |
String str = |
2128 |
String str = |
1831 |
"package p;\n" + |
2129 |
"package p;\n" + |
1832 |
"public class X {\n" + |
2130 |
"public class X {\n" + |
Lines 1861-1885
Link Here
|
1861 |
completionIdentifier, |
2159 |
completionIdentifier, |
1862 |
expectedReplacedSource, |
2160 |
expectedReplacedSource, |
1863 |
"diet ast"); |
2161 |
"diet ast"); |
1864 |
|
2162 |
} |
1865 |
expectedCompletionNodeToString = "<CompleteOnName:zzz>"; |
2163 |
public void test0035_Method(){ |
1866 |
expectedParentNodeToString = "<NONE>"; |
2164 |
String str = |
1867 |
completionIdentifier = "zzz"; |
2165 |
"package p;\n" + |
1868 |
expectedReplacedSource = "zzz"; |
2166 |
"public class X {\n" + |
1869 |
expectedUnitDisplayString = |
|
|
1870 |
"package p;\n" + |
1871 |
"public class X {\n" + |
1872 |
" {\n" + |
2167 |
" {\n" + |
1873 |
" {\n" + |
2168 |
" #\n" + |
1874 |
" Object o;\n" + |
2169 |
" Object o = {zzz;\n" + |
1875 |
" {\n" + |
|
|
1876 |
" <CompleteOnName:zzz>;\n" + |
1877 |
" }\n" + |
1878 |
" }\n" + |
1879 |
" }\n" + |
1880 |
" public X() {\n" + |
1881 |
" }\n" + |
2170 |
" }\n" + |
1882 |
"}\n"; |
2171 |
"}\n"; |
|
|
2172 |
|
2173 |
String completeBehind = "zzz"; |
2174 |
int cursorLocation = str.indexOf("zzz") + completeBehind.length() - 1; |
2175 |
|
2176 |
String expectedCompletionNodeToString = "<CompleteOnName:zzz>"; |
2177 |
String expectedParentNodeToString = "<NONE>"; |
2178 |
String completionIdentifier = "zzz"; |
2179 |
String expectedReplacedSource = "zzz"; |
2180 |
String expectedUnitDisplayString = |
2181 |
"package p;\n" + |
2182 |
"public class X {\n" + |
2183 |
" {\n" + |
2184 |
" {\n" + |
2185 |
" Object o;\n" + |
2186 |
" {\n" + |
2187 |
" <CompleteOnName:zzz>;\n" + |
2188 |
" }\n" + |
2189 |
" }\n" + |
2190 |
" }\n" + |
2191 |
" public X() {\n" + |
2192 |
" }\n" + |
2193 |
"}\n"; |
1883 |
|
2194 |
|
1884 |
checkMethodParse( |
2195 |
checkMethodParse( |
1885 |
str.toCharArray(), |
2196 |
str.toCharArray(), |
Lines 1892-1898
Link Here
|
1892 |
"full ast"); |
2203 |
"full ast"); |
1893 |
} |
2204 |
} |
1894 |
|
2205 |
|
1895 |
public void test0036(){ |
2206 |
public void test0036_Diet(){ |
1896 |
String str = |
2207 |
String str = |
1897 |
"package p;\n" + |
2208 |
"package p;\n" + |
1898 |
"public class X {\n" + |
2209 |
"public class X {\n" + |
Lines 1930-1952
Link Here
|
1930 |
completionIdentifier, |
2241 |
completionIdentifier, |
1931 |
expectedReplacedSource, |
2242 |
expectedReplacedSource, |
1932 |
"diet ast"); |
2243 |
"diet ast"); |
1933 |
|
2244 |
} |
1934 |
expectedCompletionNodeToString = "<CompleteOnName:zzz>"; |
2245 |
public void test0036_Method(){ |
1935 |
expectedParentNodeToString = "<NONE>"; |
2246 |
String str = |
1936 |
completionIdentifier = "zzz"; |
2247 |
"package p;\n" + |
1937 |
expectedReplacedSource = "zzz"; |
2248 |
"public class X {\n" + |
1938 |
expectedUnitDisplayString = |
2249 |
" void foo(){\n" + |
1939 |
"package p;\n" + |
2250 |
" #\n" + |
1940 |
"public class X {\n" + |
2251 |
" Object o = {zzz;\n" + |
1941 |
" public X() {\n" + |
|
|
1942 |
" }\n" + |
1943 |
" void foo() {\n" + |
1944 |
" Object o;\n" + |
1945 |
" {\n" + |
1946 |
" <CompleteOnName:zzz>;\n" + |
1947 |
" }\n" + |
1948 |
" }\n" + |
2252 |
" }\n" + |
1949 |
"}\n"; |
2253 |
"}\n"; |
|
|
2254 |
|
2255 |
String completeBehind = "zzz"; |
2256 |
int cursorLocation = str.indexOf("zzz") + completeBehind.length() - 1; |
2257 |
|
2258 |
String expectedCompletionNodeToString = "<CompleteOnName:zzz>"; |
2259 |
String expectedParentNodeToString = "<NONE>"; |
2260 |
String completionIdentifier = "zzz"; |
2261 |
String expectedReplacedSource = "zzz"; |
2262 |
String expectedUnitDisplayString = |
2263 |
"package p;\n" + |
2264 |
"public class X {\n" + |
2265 |
" public X() {\n" + |
2266 |
" }\n" + |
2267 |
" void foo() {\n" + |
2268 |
" Object o;\n" + |
2269 |
" {\n" + |
2270 |
" <CompleteOnName:zzz>;\n" + |
2271 |
" }\n" + |
2272 |
" }\n" + |
2273 |
"}\n"; |
1950 |
|
2274 |
|
1951 |
checkMethodParse( |
2275 |
checkMethodParse( |
1952 |
str.toCharArray(), |
2276 |
str.toCharArray(), |
Lines 1992-1998
Link Here
|
1992 |
} |
2316 |
} |
1993 |
|
2317 |
|
1994 |
|
2318 |
|
1995 |
public void test0038(){ |
2319 |
public void test0038_Diet(){ |
1996 |
String str = |
2320 |
String str = |
1997 |
"package p;\n" + |
2321 |
"package p;\n" + |
1998 |
"public class X {\n" + |
2322 |
"public class X {\n" + |
Lines 2026-2045
Link Here
|
2026 |
completionIdentifier, |
2350 |
completionIdentifier, |
2027 |
expectedReplacedSource, |
2351 |
expectedReplacedSource, |
2028 |
"diet ast"); |
2352 |
"diet ast"); |
2029 |
|
2353 |
} |
2030 |
expectedCompletionNodeToString = "<CompleteOnName:zzz>"; |
2354 |
public void test0038_Method(){ |
2031 |
expectedParentNodeToString = "Object[] o = {<CompleteOnName:zzz>};"; |
2355 |
String str = |
2032 |
completionIdentifier = "zzz"; |
2356 |
"package p;\n" + |
2033 |
expectedReplacedSource = "zzz"; |
2357 |
"public class X {\n" + |
2034 |
expectedUnitDisplayString = |
|
|
2035 |
"package p;\n" + |
2036 |
"public class X {\n" + |
2037 |
" {\n" + |
2358 |
" {\n" + |
2038 |
" Object[] o = {<CompleteOnName:zzz>};\n" + |
2359 |
" Object[] o = {zzz;\n" + |
2039 |
" }\n" + |
|
|
2040 |
" public X() {\n" + |
2041 |
" }\n" + |
2360 |
" }\n" + |
2042 |
"}\n"; |
2361 |
"}\n"; |
|
|
2362 |
|
2363 |
String completeBehind = "zzz"; |
2364 |
int cursorLocation = str.indexOf("zzz") + completeBehind.length() - 1; |
2365 |
|
2366 |
String expectedCompletionNodeToString = "<CompleteOnName:zzz>"; |
2367 |
String expectedParentNodeToString = "Object[] o = {<CompleteOnName:zzz>};"; |
2368 |
String completionIdentifier = "zzz"; |
2369 |
String expectedReplacedSource = "zzz"; |
2370 |
String expectedUnitDisplayString = |
2371 |
"package p;\n" + |
2372 |
"public class X {\n" + |
2373 |
" {\n" + |
2374 |
" Object[] o = {<CompleteOnName:zzz>};\n" + |
2375 |
" }\n" + |
2376 |
" public X() {\n" + |
2377 |
" }\n" + |
2378 |
"}\n"; |
2043 |
|
2379 |
|
2044 |
checkMethodParse( |
2380 |
checkMethodParse( |
2045 |
str.toCharArray(), |
2381 |
str.toCharArray(), |
Lines 2053-2059
Link Here
|
2053 |
} |
2389 |
} |
2054 |
|
2390 |
|
2055 |
|
2391 |
|
2056 |
public void test0039(){ |
2392 |
public void test0039_Diet(){ |
2057 |
String str = |
2393 |
String str = |
2058 |
"package p;\n" + |
2394 |
"package p;\n" + |
2059 |
"public class X {\n" + |
2395 |
"public class X {\n" + |
Lines 2090-2109
Link Here
|
2090 |
completionIdentifier, |
2426 |
completionIdentifier, |
2091 |
expectedReplacedSource, |
2427 |
expectedReplacedSource, |
2092 |
"diet ast"); |
2428 |
"diet ast"); |
2093 |
|
2429 |
} |
2094 |
expectedCompletionNodeToString = "<CompleteOnName:zzz>"; |
2430 |
public void test0039_Method(){ |
2095 |
expectedParentNodeToString = "Object[] o = {<CompleteOnName:zzz>};"; |
2431 |
String str = |
2096 |
completionIdentifier = "zzz"; |
2432 |
"package p;\n" + |
2097 |
expectedReplacedSource = "zzz"; |
2433 |
"public class X {\n" + |
2098 |
expectedUnitDisplayString = |
2434 |
" void foo(){\n" + |
2099 |
"package p;\n" + |
2435 |
" Object[] o = {zzz;\n" + |
2100 |
"public class X {\n" + |
|
|
2101 |
" public X() {\n" + |
2102 |
" }\n" + |
2103 |
" void foo() {\n" + |
2104 |
" Object[] o = {<CompleteOnName:zzz>};\n" + |
2105 |
" }\n" + |
2436 |
" }\n" + |
2106 |
"}\n"; |
2437 |
"}\n"; |
|
|
2438 |
|
2439 |
String completeBehind = "zzz"; |
2440 |
int cursorLocation = str.indexOf("zzz") + completeBehind.length() - 1; |
2441 |
|
2442 |
String expectedCompletionNodeToString = "<CompleteOnName:zzz>"; |
2443 |
String expectedParentNodeToString = "Object[] o = {<CompleteOnName:zzz>};"; |
2444 |
String completionIdentifier = "zzz"; |
2445 |
String expectedReplacedSource = "zzz"; |
2446 |
String expectedUnitDisplayString = |
2447 |
"package p;\n" + |
2448 |
"public class X {\n" + |
2449 |
" public X() {\n" + |
2450 |
" }\n" + |
2451 |
" void foo() {\n" + |
2452 |
" Object[] o = {<CompleteOnName:zzz>};\n" + |
2453 |
" }\n" + |
2454 |
"}\n"; |
2107 |
|
2455 |
|
2108 |
checkMethodParse( |
2456 |
checkMethodParse( |
2109 |
str.toCharArray(), |
2457 |
str.toCharArray(), |
Lines 2152-2158
Link Here
|
2152 |
} |
2500 |
} |
2153 |
|
2501 |
|
2154 |
|
2502 |
|
2155 |
public void test0041(){ |
2503 |
public void test0041_Diet(){ |
2156 |
String str = |
2504 |
String str = |
2157 |
"package p;\n" + |
2505 |
"package p;\n" + |
2158 |
"public class X {\n" + |
2506 |
"public class X {\n" + |
Lines 2187-2208
Link Here
|
2187 |
completionIdentifier, |
2535 |
completionIdentifier, |
2188 |
expectedReplacedSource, |
2536 |
expectedReplacedSource, |
2189 |
"diet ast"); |
2537 |
"diet ast"); |
2190 |
|
2538 |
} |
2191 |
expectedCompletionNodeToString = "<CompleteOnName:zzz>"; |
2539 |
public void test0041_Method(){ |
2192 |
expectedParentNodeToString = "Object[] o = {<CompleteOnName:zzz>};"; |
2540 |
String str = |
2193 |
completionIdentifier = "zzz"; |
2541 |
"package p;\n" + |
2194 |
expectedReplacedSource = "zzz"; |
2542 |
"public class X {\n" + |
2195 |
expectedUnitDisplayString = |
|
|
2196 |
"package p;\n" + |
2197 |
"public class X {\n" + |
2198 |
" {\n" + |
2543 |
" {\n" + |
2199 |
" {\n" + |
2544 |
" #\n" + |
2200 |
" Object[] o = {<CompleteOnName:zzz>};\n" + |
2545 |
" Object[] o = {zzz;\n" + |
2201 |
" }\n" + |
|
|
2202 |
" }\n" + |
2203 |
" public X() {\n" + |
2204 |
" }\n" + |
2546 |
" }\n" + |
2205 |
"}\n"; |
2547 |
"}\n"; |
|
|
2548 |
|
2549 |
String completeBehind = "zzz"; |
2550 |
int cursorLocation = str.indexOf("zzz") + completeBehind.length() - 1; |
2551 |
|
2552 |
String expectedCompletionNodeToString = "<CompleteOnName:zzz>"; |
2553 |
String expectedParentNodeToString = "Object[] o = {<CompleteOnName:zzz>};"; |
2554 |
String completionIdentifier = "zzz"; |
2555 |
String expectedReplacedSource = "zzz"; |
2556 |
String expectedUnitDisplayString = |
2557 |
"package p;\n" + |
2558 |
"public class X {\n" + |
2559 |
" {\n" + |
2560 |
" {\n" + |
2561 |
" Object[] o = {<CompleteOnName:zzz>};\n" + |
2562 |
" }\n" + |
2563 |
" }\n" + |
2564 |
" public X() {\n" + |
2565 |
" }\n" + |
2566 |
"}\n"; |
2206 |
|
2567 |
|
2207 |
checkMethodParse( |
2568 |
checkMethodParse( |
2208 |
str.toCharArray(), |
2569 |
str.toCharArray(), |
Lines 2216-2222
Link Here
|
2216 |
} |
2577 |
} |
2217 |
|
2578 |
|
2218 |
|
2579 |
|
2219 |
public void test0042(){ |
2580 |
public void test0042_Diet(){ |
2220 |
String str = |
2581 |
String str = |
2221 |
"package p;\n" + |
2582 |
"package p;\n" + |
2222 |
"public class X {\n" + |
2583 |
"public class X {\n" + |
Lines 2254-2273
Link Here
|
2254 |
completionIdentifier, |
2615 |
completionIdentifier, |
2255 |
expectedReplacedSource, |
2616 |
expectedReplacedSource, |
2256 |
"diet ast"); |
2617 |
"diet ast"); |
2257 |
|
2618 |
} |
2258 |
expectedCompletionNodeToString = "<CompleteOnName:zzz>"; |
2619 |
public void test0042_Method(){ |
2259 |
expectedParentNodeToString = "Object[] o = {<CompleteOnName:zzz>};"; |
2620 |
String str = |
2260 |
completionIdentifier = "zzz"; |
2621 |
"package p;\n" + |
2261 |
expectedReplacedSource = "zzz"; |
2622 |
"public class X {\n" + |
2262 |
expectedUnitDisplayString = |
2623 |
" void foo(){\n" + |
2263 |
"package p;\n" + |
2624 |
" #\n" + |
2264 |
"public class X {\n" + |
2625 |
" Object[] o = {zzz;\n" + |
2265 |
" public X() {\n" + |
|
|
2266 |
" }\n" + |
2267 |
" void foo() {\n" + |
2268 |
" Object[] o = {<CompleteOnName:zzz>};\n" + |
2269 |
" }\n" + |
2626 |
" }\n" + |
2270 |
"}\n"; |
2627 |
"}\n"; |
|
|
2628 |
|
2629 |
String completeBehind = "zzz"; |
2630 |
int cursorLocation = str.indexOf("zzz") + completeBehind.length() - 1; |
2631 |
|
2632 |
String expectedCompletionNodeToString = "<CompleteOnName:zzz>"; |
2633 |
String expectedParentNodeToString = "Object[] o = {<CompleteOnName:zzz>};"; |
2634 |
String completionIdentifier = "zzz"; |
2635 |
String expectedReplacedSource = "zzz"; |
2636 |
String expectedUnitDisplayString = |
2637 |
"package p;\n" + |
2638 |
"public class X {\n" + |
2639 |
" public X() {\n" + |
2640 |
" }\n" + |
2641 |
" void foo() {\n" + |
2642 |
" Object[] o = {<CompleteOnName:zzz>};\n" + |
2643 |
" }\n" + |
2644 |
"}\n"; |
2271 |
|
2645 |
|
2272 |
checkMethodParse( |
2646 |
checkMethodParse( |
2273 |
str.toCharArray(), |
2647 |
str.toCharArray(), |
Lines 2314-2320
Link Here
|
2314 |
|
2688 |
|
2315 |
|
2689 |
|
2316 |
|
2690 |
|
2317 |
public void test0044(){ |
2691 |
public void test0044_Diet(){ |
2318 |
String str = |
2692 |
String str = |
2319 |
"package p;\n" + |
2693 |
"package p;\n" + |
2320 |
"public class X {\n" + |
2694 |
"public class X {\n" + |
Lines 2348-2367
Link Here
|
2348 |
completionIdentifier, |
2722 |
completionIdentifier, |
2349 |
expectedReplacedSource, |
2723 |
expectedReplacedSource, |
2350 |
"diet ast"); |
2724 |
"diet ast"); |
2351 |
|
2725 |
} |
2352 |
expectedCompletionNodeToString = "<CompleteOnName:zzz>"; |
2726 |
public void test0044_Method(){ |
2353 |
expectedParentNodeToString = "new X[<CompleteOnName:zzz>]"; |
2727 |
String str = |
2354 |
completionIdentifier = "zzz"; |
2728 |
"package p;\n" + |
2355 |
expectedReplacedSource = "zzz"; |
2729 |
"public class X {\n" + |
2356 |
expectedUnitDisplayString = |
2730 |
" {\n" + |
2357 |
"package p;\n" + |
2731 |
" Object[] o = new X[zzz;\n" + |
2358 |
"public class X {\n" + |
|
|
2359 |
" {\n" + |
2360 |
" Object[] o = new X[<CompleteOnName:zzz>];\n" + |
2361 |
" }\n" + |
2362 |
" public X() {\n" + |
2363 |
" }\n" + |
2732 |
" }\n" + |
2364 |
"}\n"; |
2733 |
"}\n"; |
|
|
2734 |
|
2735 |
String completeBehind = "zzz"; |
2736 |
int cursorLocation = str.indexOf("zzz") + completeBehind.length() - 1; |
2737 |
|
2738 |
String expectedCompletionNodeToString = "<CompleteOnName:zzz>"; |
2739 |
String expectedParentNodeToString = "new X[<CompleteOnName:zzz>]"; |
2740 |
String completionIdentifier = "zzz"; |
2741 |
String expectedReplacedSource = "zzz"; |
2742 |
String expectedUnitDisplayString = |
2743 |
"package p;\n" + |
2744 |
"public class X {\n" + |
2745 |
" {\n" + |
2746 |
" Object[] o = new X[<CompleteOnName:zzz>];\n" + |
2747 |
" }\n" + |
2748 |
" public X() {\n" + |
2749 |
" }\n" + |
2750 |
"}\n"; |
2365 |
|
2751 |
|
2366 |
checkMethodParse( |
2752 |
checkMethodParse( |
2367 |
str.toCharArray(), |
2753 |
str.toCharArray(), |
Lines 2376-2382
Link Here
|
2376 |
|
2762 |
|
2377 |
|
2763 |
|
2378 |
|
2764 |
|
2379 |
public void test0045(){ |
2765 |
public void test0045_Diet(){ |
2380 |
String str = |
2766 |
String str = |
2381 |
"package p;\n" + |
2767 |
"package p;\n" + |
2382 |
"public class X {\n" + |
2768 |
"public class X {\n" + |
Lines 2409-2429
Link Here
|
2409 |
expectedUnitDisplayString, |
2795 |
expectedUnitDisplayString, |
2410 |
completionIdentifier, |
2796 |
completionIdentifier, |
2411 |
expectedReplacedSource, |
2797 |
expectedReplacedSource, |
2412 |
"diet ast"); |
2798 |
"diet ast"); |
2413 |
|
2799 |
} |
2414 |
expectedCompletionNodeToString = "<CompleteOnName:zzz>"; |
2800 |
public void test0045_Method(){ |
2415 |
expectedParentNodeToString = "new X[<CompleteOnName:zzz>]"; |
2801 |
String str = |
2416 |
completionIdentifier = "zzz"; |
2802 |
"package p;\n" + |
2417 |
expectedReplacedSource = "zzz"; |
2803 |
"public class X {\n" + |
2418 |
expectedUnitDisplayString = |
2804 |
" void foo(){\n" + |
2419 |
"package p;\n" + |
2805 |
" Object[] o = new X[zzz;\n" + |
2420 |
"public class X {\n" + |
|
|
2421 |
" public X() {\n" + |
2422 |
" }\n" + |
2423 |
" void foo() {\n" + |
2424 |
" Object[] o = new X[<CompleteOnName:zzz>];\n" + |
2425 |
" }\n" + |
2806 |
" }\n" + |
2426 |
"}\n"; |
2807 |
"}\n"; |
|
|
2808 |
|
2809 |
String completeBehind = "zzz"; |
2810 |
int cursorLocation = str.indexOf("zzz") + completeBehind.length() - 1; |
2811 |
|
2812 |
String expectedCompletionNodeToString = "<CompleteOnName:zzz>"; |
2813 |
String expectedParentNodeToString = "new X[<CompleteOnName:zzz>]"; |
2814 |
String completionIdentifier = "zzz"; |
2815 |
String expectedReplacedSource = "zzz"; |
2816 |
String expectedUnitDisplayString = |
2817 |
"package p;\n" + |
2818 |
"public class X {\n" + |
2819 |
" public X() {\n" + |
2820 |
" }\n" + |
2821 |
" void foo() {\n" + |
2822 |
" Object[] o = new X[<CompleteOnName:zzz>];\n" + |
2823 |
" }\n" + |
2824 |
"}\n"; |
2427 |
|
2825 |
|
2428 |
checkMethodParse( |
2826 |
checkMethodParse( |
2429 |
str.toCharArray(), |
2827 |
str.toCharArray(), |
Lines 2474-2480
Link Here
|
2474 |
|
2872 |
|
2475 |
|
2873 |
|
2476 |
|
2874 |
|
2477 |
public void test0047(){ |
2875 |
public void test0047_Diet(){ |
2478 |
String str = |
2876 |
String str = |
2479 |
"package p;\n" + |
2877 |
"package p;\n" + |
2480 |
"public class X {\n" + |
2878 |
"public class X {\n" + |
Lines 2509-2530
Link Here
|
2509 |
completionIdentifier, |
2907 |
completionIdentifier, |
2510 |
expectedReplacedSource, |
2908 |
expectedReplacedSource, |
2511 |
"diet ast"); |
2909 |
"diet ast"); |
2512 |
|
2910 |
} |
2513 |
expectedCompletionNodeToString = "<CompleteOnName:zzz>"; |
2911 |
public void test0047_Method(){ |
2514 |
expectedParentNodeToString = "new X[<CompleteOnName:zzz>]"; |
2912 |
String str = |
2515 |
completionIdentifier = "zzz"; |
2913 |
"package p;\n" + |
2516 |
expectedReplacedSource = "zzz"; |
2914 |
"public class X {\n" + |
2517 |
expectedUnitDisplayString = |
2915 |
" {\n" + |
2518 |
"package p;\n" + |
2916 |
" #\n" + |
2519 |
"public class X {\n" + |
2917 |
" Object[] o = new X[zzz;\n" + |
2520 |
" {\n" + |
|
|
2521 |
" {\n" + |
2522 |
" Object[] o = new X[<CompleteOnName:zzz>];\n" + |
2523 |
" }\n" + |
2524 |
" }\n" + |
2525 |
" public X() {\n" + |
2526 |
" }\n" + |
2918 |
" }\n" + |
2527 |
"}\n"; |
2919 |
"}\n"; |
|
|
2920 |
|
2921 |
String completeBehind = "zzz"; |
2922 |
int cursorLocation = str.indexOf("zzz") + completeBehind.length() - 1; |
2923 |
|
2924 |
String expectedCompletionNodeToString = "<CompleteOnName:zzz>"; |
2925 |
String expectedParentNodeToString = "new X[<CompleteOnName:zzz>]"; |
2926 |
String completionIdentifier = "zzz"; |
2927 |
String expectedReplacedSource = "zzz"; |
2928 |
String expectedUnitDisplayString = |
2929 |
"package p;\n" + |
2930 |
"public class X {\n" + |
2931 |
" {\n" + |
2932 |
" {\n" + |
2933 |
" Object[] o = new X[<CompleteOnName:zzz>];\n" + |
2934 |
" }\n" + |
2935 |
" }\n" + |
2936 |
" public X() {\n" + |
2937 |
" }\n" + |
2938 |
"}\n"; |
2528 |
|
2939 |
|
2529 |
checkMethodParse( |
2940 |
checkMethodParse( |
2530 |
str.toCharArray(), |
2941 |
str.toCharArray(), |
Lines 2539-2545
Link Here
|
2539 |
|
2950 |
|
2540 |
|
2951 |
|
2541 |
|
2952 |
|
2542 |
public void test0048(){ |
2953 |
public void test0048_Diet(){ |
2543 |
String str = |
2954 |
String str = |
2544 |
"package p;\n" + |
2955 |
"package p;\n" + |
2545 |
"public class X {\n" + |
2956 |
"public class X {\n" + |
Lines 2574-2593
Link Here
|
2574 |
completionIdentifier, |
2985 |
completionIdentifier, |
2575 |
expectedReplacedSource, |
2986 |
expectedReplacedSource, |
2576 |
"diet ast"); |
2987 |
"diet ast"); |
2577 |
|
2988 |
} |
2578 |
expectedCompletionNodeToString = "<CompleteOnName:zzz>"; |
2989 |
public void test0048_Method(){ |
2579 |
expectedParentNodeToString = "new X[<CompleteOnName:zzz>]"; |
2990 |
String str = |
2580 |
completionIdentifier = "zzz"; |
2991 |
"package p;\n" + |
2581 |
expectedReplacedSource = "zzz"; |
2992 |
"public class X {\n" + |
2582 |
expectedUnitDisplayString = |
2993 |
" void foo(){\n" + |
2583 |
"package p;\n" + |
2994 |
" #\n" + |
2584 |
"public class X {\n" + |
2995 |
" Object[] o = new X[zzz;\n" + |
2585 |
" public X() {\n" + |
|
|
2586 |
" }\n" + |
2587 |
" void foo() {\n" + |
2588 |
" Object[] o = new X[<CompleteOnName:zzz>];\n" + |
2589 |
" }\n" + |
2996 |
" }\n" + |
2590 |
"}\n"; |
2997 |
"}\n"; |
|
|
2998 |
|
2999 |
String completeBehind = "zzz"; |
3000 |
int cursorLocation = str.indexOf("zzz") + completeBehind.length() - 1; |
3001 |
|
3002 |
String expectedCompletionNodeToString = "<CompleteOnName:zzz>"; |
3003 |
String expectedParentNodeToString = "new X[<CompleteOnName:zzz>]"; |
3004 |
String completionIdentifier = "zzz"; |
3005 |
String expectedReplacedSource = "zzz"; |
3006 |
String expectedUnitDisplayString = |
3007 |
"package p;\n" + |
3008 |
"public class X {\n" + |
3009 |
" public X() {\n" + |
3010 |
" }\n" + |
3011 |
" void foo() {\n" + |
3012 |
" Object[] o = new X[<CompleteOnName:zzz>];\n" + |
3013 |
" }\n" + |
3014 |
"}\n"; |
2591 |
|
3015 |
|
2592 |
checkMethodParse( |
3016 |
checkMethodParse( |
2593 |
str.toCharArray(), |
3017 |
str.toCharArray(), |
Lines 2631-2637
Link Here
|
2631 |
expectedReplacedSource, |
3055 |
expectedReplacedSource, |
2632 |
"diet ast"); |
3056 |
"diet ast"); |
2633 |
} |
3057 |
} |
2634 |
public void test0050(){ |
3058 |
public void test0050_Diet(){ |
2635 |
String str = |
3059 |
String str = |
2636 |
"package p;\n" + |
3060 |
"package p;\n" + |
2637 |
"public class X {\n" + |
3061 |
"public class X {\n" + |
Lines 2665-2684
Link Here
|
2665 |
completionIdentifier, |
3089 |
completionIdentifier, |
2666 |
expectedReplacedSource, |
3090 |
expectedReplacedSource, |
2667 |
"diet ast"); |
3091 |
"diet ast"); |
2668 |
|
3092 |
} |
2669 |
expectedCompletionNodeToString = "<CompleteOnName:zzz>"; |
3093 |
public void test0050_Method(){ |
2670 |
expectedParentNodeToString = "new X[]{<CompleteOnName:zzz>}"; |
3094 |
String str = |
2671 |
completionIdentifier = "zzz"; |
3095 |
"package p;\n" + |
2672 |
expectedReplacedSource = "zzz"; |
3096 |
"public class X {\n" + |
2673 |
expectedUnitDisplayString = |
|
|
2674 |
"package p;\n" + |
2675 |
"public class X {\n" + |
2676 |
" {\n" + |
3097 |
" {\n" + |
2677 |
" Object[] o = new X[]{<CompleteOnName:zzz>};\n" + |
3098 |
" Object[] o = new X[]{zzz;\n" + |
2678 |
" }\n" + |
|
|
2679 |
" public X() {\n" + |
2680 |
" }\n" + |
3099 |
" }\n" + |
2681 |
"}\n"; |
3100 |
"}\n"; |
|
|
3101 |
|
3102 |
String completeBehind = "zzz"; |
3103 |
int cursorLocation = str.indexOf("zzz") + completeBehind.length() - 1; |
3104 |
|
3105 |
String expectedCompletionNodeToString = "<CompleteOnName:zzz>"; |
3106 |
String expectedParentNodeToString = "new X[]{<CompleteOnName:zzz>}"; |
3107 |
String completionIdentifier = "zzz"; |
3108 |
String expectedReplacedSource = "zzz"; |
3109 |
String expectedUnitDisplayString = |
3110 |
"package p;\n" + |
3111 |
"public class X {\n" + |
3112 |
" {\n" + |
3113 |
" Object[] o = new X[]{<CompleteOnName:zzz>};\n" + |
3114 |
" }\n" + |
3115 |
" public X() {\n" + |
3116 |
" }\n" + |
3117 |
"}\n"; |
2682 |
|
3118 |
|
2683 |
checkMethodParse( |
3119 |
checkMethodParse( |
2684 |
str.toCharArray(), |
3120 |
str.toCharArray(), |
Lines 2690-2696
Link Here
|
2690 |
expectedReplacedSource, |
3126 |
expectedReplacedSource, |
2691 |
"full ast"); |
3127 |
"full ast"); |
2692 |
} |
3128 |
} |
2693 |
public void test0051(){ |
3129 |
public void test0051_Diet(){ |
2694 |
String str = |
3130 |
String str = |
2695 |
"package p;\n" + |
3131 |
"package p;\n" + |
2696 |
"public class X {\n" + |
3132 |
"public class X {\n" + |
Lines 2726-2746
Link Here
|
2726 |
expectedUnitDisplayString, |
3162 |
expectedUnitDisplayString, |
2727 |
completionIdentifier, |
3163 |
completionIdentifier, |
2728 |
expectedReplacedSource, |
3164 |
expectedReplacedSource, |
2729 |
"diet ast"); |
3165 |
"diet ast"); |
2730 |
|
3166 |
} |
2731 |
expectedCompletionNodeToString = "<CompleteOnName:zzz>"; |
3167 |
public void test0051_Method(){ |
2732 |
expectedParentNodeToString = "new X[]{<CompleteOnName:zzz>}"; |
3168 |
String str = |
2733 |
completionIdentifier = "zzz"; |
3169 |
"package p;\n" + |
2734 |
expectedReplacedSource = "zzz"; |
3170 |
"public class X {\n" + |
2735 |
expectedUnitDisplayString = |
3171 |
" void foo(){\n" + |
2736 |
"package p;\n" + |
3172 |
" Object[] o = new X[]{zzz;\n" + |
2737 |
"public class X {\n" + |
|
|
2738 |
" public X() {\n" + |
2739 |
" }\n" + |
2740 |
" void foo() {\n" + |
2741 |
" Object[] o = new X[]{<CompleteOnName:zzz>};\n" + |
2742 |
" }\n" + |
3173 |
" }\n" + |
2743 |
"}\n"; |
3174 |
"}\n"; |
|
|
3175 |
|
3176 |
String completeBehind = "zzz"; |
3177 |
int cursorLocation = str.indexOf("zzz") + completeBehind.length() - 1; |
3178 |
|
3179 |
String expectedCompletionNodeToString = "<CompleteOnName:zzz>"; |
3180 |
String expectedParentNodeToString = "new X[]{<CompleteOnName:zzz>}"; |
3181 |
String completionIdentifier = "zzz"; |
3182 |
String expectedReplacedSource = "zzz"; |
3183 |
String expectedUnitDisplayString = |
3184 |
"package p;\n" + |
3185 |
"public class X {\n" + |
3186 |
" public X() {\n" + |
3187 |
" }\n" + |
3188 |
" void foo() {\n" + |
3189 |
" Object[] o = new X[]{<CompleteOnName:zzz>};\n" + |
3190 |
" }\n" + |
3191 |
"}\n"; |
2744 |
|
3192 |
|
2745 |
checkMethodParse( |
3193 |
checkMethodParse( |
2746 |
str.toCharArray(), |
3194 |
str.toCharArray(), |
Lines 2785-2791
Link Here
|
2785 |
expectedReplacedSource, |
3233 |
expectedReplacedSource, |
2786 |
"diet ast"); |
3234 |
"diet ast"); |
2787 |
} |
3235 |
} |
2788 |
public void test0053(){ |
3236 |
public void test0053_Diet(){ |
2789 |
String str = |
3237 |
String str = |
2790 |
"package p;\n" + |
3238 |
"package p;\n" + |
2791 |
"public class X {\n" + |
3239 |
"public class X {\n" + |
Lines 2820-2841
Link Here
|
2820 |
completionIdentifier, |
3268 |
completionIdentifier, |
2821 |
expectedReplacedSource, |
3269 |
expectedReplacedSource, |
2822 |
"diet ast"); |
3270 |
"diet ast"); |
2823 |
|
3271 |
} |
2824 |
expectedCompletionNodeToString = "<CompleteOnName:zzz>"; |
3272 |
public void test0053_Method(){ |
2825 |
expectedParentNodeToString = "new X[]{<CompleteOnName:zzz>}"; |
3273 |
String str = |
2826 |
completionIdentifier = "zzz"; |
3274 |
"package p;\n" + |
2827 |
expectedReplacedSource = "zzz"; |
3275 |
"public class X {\n" + |
2828 |
expectedUnitDisplayString = |
|
|
2829 |
"package p;\n" + |
2830 |
"public class X {\n" + |
2831 |
" {\n" + |
3276 |
" {\n" + |
2832 |
" {\n" + |
3277 |
" #\n" + |
2833 |
" Object[] o = new X[]{<CompleteOnName:zzz>};\n" + |
3278 |
" Object[] o = new X[]{zzz;\n" + |
2834 |
" }\n" + |
|
|
2835 |
" }\n" + |
2836 |
" public X() {\n" + |
2837 |
" }\n" + |
3279 |
" }\n" + |
2838 |
"}\n"; |
3280 |
"}\n"; |
|
|
3281 |
|
3282 |
String completeBehind = "zzz"; |
3283 |
int cursorLocation = str.indexOf("zzz") + completeBehind.length() - 1; |
3284 |
|
3285 |
String expectedCompletionNodeToString = "<CompleteOnName:zzz>"; |
3286 |
String expectedParentNodeToString = "new X[]{<CompleteOnName:zzz>}"; |
3287 |
String completionIdentifier = "zzz"; |
3288 |
String expectedReplacedSource = "zzz"; |
3289 |
String expectedUnitDisplayString = |
3290 |
"package p;\n" + |
3291 |
"public class X {\n" + |
3292 |
" {\n" + |
3293 |
" {\n" + |
3294 |
" Object[] o = new X[]{<CompleteOnName:zzz>};\n" + |
3295 |
" }\n" + |
3296 |
" }\n" + |
3297 |
" public X() {\n" + |
3298 |
" }\n" + |
3299 |
"}\n"; |
2839 |
|
3300 |
|
2840 |
checkMethodParse( |
3301 |
checkMethodParse( |
2841 |
str.toCharArray(), |
3302 |
str.toCharArray(), |
Lines 2847-2853
Link Here
|
2847 |
expectedReplacedSource, |
3308 |
expectedReplacedSource, |
2848 |
"full ast"); |
3309 |
"full ast"); |
2849 |
} |
3310 |
} |
2850 |
public void test0054(){ |
3311 |
public void test0054_Diet(){ |
2851 |
String str = |
3312 |
String str = |
2852 |
"package p;\n" + |
3313 |
"package p;\n" + |
2853 |
"public class X {\n" + |
3314 |
"public class X {\n" + |
Lines 2885-2904
Link Here
|
2885 |
completionIdentifier, |
3346 |
completionIdentifier, |
2886 |
expectedReplacedSource, |
3347 |
expectedReplacedSource, |
2887 |
"diet ast"); |
3348 |
"diet ast"); |
2888 |
|
3349 |
} |
2889 |
expectedCompletionNodeToString = "<CompleteOnName:zzz>"; |
3350 |
public void test0054_Method(){ |
2890 |
expectedParentNodeToString = "new X[]{<CompleteOnName:zzz>}"; |
3351 |
String str = |
2891 |
completionIdentifier = "zzz"; |
3352 |
"package p;\n" + |
2892 |
expectedReplacedSource = "zzz"; |
3353 |
"public class X {\n" + |
2893 |
expectedUnitDisplayString = |
3354 |
" void foo(){\n" + |
2894 |
"package p;\n" + |
3355 |
" #\n" + |
2895 |
"public class X {\n" + |
3356 |
" Object[] o = new X[]{zzz;\n" + |
2896 |
" public X() {\n" + |
|
|
2897 |
" }\n" + |
2898 |
" void foo() {\n" + |
2899 |
" Object[] o = new X[]{<CompleteOnName:zzz>};\n" + |
2900 |
" }\n" + |
3357 |
" }\n" + |
2901 |
"}\n"; |
3358 |
"}\n"; |
|
|
3359 |
|
3360 |
String completeBehind = "zzz"; |
3361 |
int cursorLocation = str.indexOf("zzz") + completeBehind.length() - 1; |
3362 |
|
3363 |
String expectedCompletionNodeToString = "<CompleteOnName:zzz>"; |
3364 |
String expectedParentNodeToString = "new X[]{<CompleteOnName:zzz>}"; |
3365 |
String completionIdentifier = "zzz"; |
3366 |
String expectedReplacedSource = "zzz"; |
3367 |
String expectedUnitDisplayString = |
3368 |
"package p;\n" + |
3369 |
"public class X {\n" + |
3370 |
" public X() {\n" + |
3371 |
" }\n" + |
3372 |
" void foo() {\n" + |
3373 |
" Object[] o = new X[]{<CompleteOnName:zzz>};\n" + |
3374 |
" }\n" + |
3375 |
"}\n"; |
2902 |
|
3376 |
|
2903 |
checkMethodParse( |
3377 |
checkMethodParse( |
2904 |
str.toCharArray(), |
3378 |
str.toCharArray(), |
Lines 2944-2950
Link Here
|
2944 |
"diet ast"); |
3418 |
"diet ast"); |
2945 |
} |
3419 |
} |
2946 |
|
3420 |
|
2947 |
public void test0056(){ |
3421 |
public void test0056_Diet(){ |
2948 |
String str = |
3422 |
String str = |
2949 |
"package p;\n" + |
3423 |
"package p;\n" + |
2950 |
"public class X {\n" + |
3424 |
"public class X {\n" + |
Lines 2978-2997
Link Here
|
2978 |
completionIdentifier, |
3452 |
completionIdentifier, |
2979 |
expectedReplacedSource, |
3453 |
expectedReplacedSource, |
2980 |
"diet ast"); |
3454 |
"diet ast"); |
2981 |
|
3455 |
} |
2982 |
expectedCompletionNodeToString = "<CompleteOnName:zzz>"; |
3456 |
public void test0056_Method(){ |
2983 |
expectedParentNodeToString = "Object[] o = <CompleteOnName:zzz>;"; |
3457 |
String str = |
2984 |
completionIdentifier = "zzz"; |
3458 |
"package p;\n" + |
2985 |
expectedReplacedSource = "zzz"; |
3459 |
"public class X {\n" + |
2986 |
expectedUnitDisplayString = |
|
|
2987 |
"package p;\n" + |
2988 |
"public class X {\n" + |
2989 |
" {\n" + |
3460 |
" {\n" + |
2990 |
" Object[] o = <CompleteOnName:zzz>;\n" + |
3461 |
" Object[] o = zzz;\n" + |
2991 |
" }\n" + |
|
|
2992 |
" public X() {\n" + |
2993 |
" }\n" + |
3462 |
" }\n" + |
2994 |
"}\n"; |
3463 |
"}\n"; |
|
|
3464 |
|
3465 |
String completeBehind = "zzz"; |
3466 |
int cursorLocation = str.indexOf("zzz") + completeBehind.length() - 1; |
3467 |
|
3468 |
String expectedCompletionNodeToString = "<CompleteOnName:zzz>"; |
3469 |
String expectedParentNodeToString = "Object[] o = <CompleteOnName:zzz>;"; |
3470 |
String completionIdentifier = "zzz"; |
3471 |
String expectedReplacedSource = "zzz"; |
3472 |
String expectedUnitDisplayString = |
3473 |
"package p;\n" + |
3474 |
"public class X {\n" + |
3475 |
" {\n" + |
3476 |
" Object[] o = <CompleteOnName:zzz>;\n" + |
3477 |
" }\n" + |
3478 |
" public X() {\n" + |
3479 |
" }\n" + |
3480 |
"}\n"; |
2995 |
|
3481 |
|
2996 |
checkMethodParse( |
3482 |
checkMethodParse( |
2997 |
str.toCharArray(), |
3483 |
str.toCharArray(), |
Lines 3004-3010
Link Here
|
3004 |
"full ast"); |
3490 |
"full ast"); |
3005 |
} |
3491 |
} |
3006 |
|
3492 |
|
3007 |
public void test0057(){ |
3493 |
public void test0057_Diet(){ |
3008 |
String str = |
3494 |
String str = |
3009 |
"package p;\n" + |
3495 |
"package p;\n" + |
3010 |
"public class X {\n" + |
3496 |
"public class X {\n" + |
Lines 3037-3057
Link Here
|
3037 |
expectedUnitDisplayString, |
3523 |
expectedUnitDisplayString, |
3038 |
completionIdentifier, |
3524 |
completionIdentifier, |
3039 |
expectedReplacedSource, |
3525 |
expectedReplacedSource, |
3040 |
"diet ast"); |
3526 |
"diet ast"); |
3041 |
|
3527 |
} |
3042 |
expectedCompletionNodeToString = "<CompleteOnName:zzz>"; |
3528 |
public void test0057_Method(){ |
3043 |
expectedParentNodeToString = "Object[] o = <CompleteOnName:zzz>;"; |
3529 |
String str = |
3044 |
completionIdentifier = "zzz"; |
3530 |
"package p;\n" + |
3045 |
expectedReplacedSource = "zzz"; |
3531 |
"public class X {\n" + |
3046 |
expectedUnitDisplayString = |
3532 |
" void foo(){\n" + |
3047 |
"package p;\n" + |
3533 |
" Object[] o = zzz;\n" + |
3048 |
"public class X {\n" + |
|
|
3049 |
" public X() {\n" + |
3050 |
" }\n" + |
3051 |
" void foo() {\n" + |
3052 |
" Object[] o = <CompleteOnName:zzz>;\n" + |
3053 |
" }\n" + |
3534 |
" }\n" + |
3054 |
"}\n"; |
3535 |
"}\n"; |
|
|
3536 |
|
3537 |
String completeBehind = "zzz"; |
3538 |
int cursorLocation = str.indexOf("zzz") + completeBehind.length() - 1; |
3539 |
|
3540 |
String expectedCompletionNodeToString = "<CompleteOnName:zzz>"; |
3541 |
String expectedParentNodeToString = "Object[] o = <CompleteOnName:zzz>;"; |
3542 |
String completionIdentifier = "zzz"; |
3543 |
String expectedReplacedSource = "zzz"; |
3544 |
String expectedUnitDisplayString = |
3545 |
"package p;\n" + |
3546 |
"public class X {\n" + |
3547 |
" public X() {\n" + |
3548 |
" }\n" + |
3549 |
" void foo() {\n" + |
3550 |
" Object[] o = <CompleteOnName:zzz>;\n" + |
3551 |
" }\n" + |
3552 |
"}\n"; |
3055 |
|
3553 |
|
3056 |
checkMethodParse( |
3554 |
checkMethodParse( |
3057 |
str.toCharArray(), |
3555 |
str.toCharArray(), |
Lines 3098-3104
Link Here
|
3098 |
"diet ast"); |
3596 |
"diet ast"); |
3099 |
} |
3597 |
} |
3100 |
|
3598 |
|
3101 |
public void test0059(){ |
3599 |
public void test0059_Diet(){ |
3102 |
String str = |
3600 |
String str = |
3103 |
"package p;\n" + |
3601 |
"package p;\n" + |
3104 |
"public class X {\n" + |
3602 |
"public class X {\n" + |
Lines 3133-3154
Link Here
|
3133 |
completionIdentifier, |
3631 |
completionIdentifier, |
3134 |
expectedReplacedSource, |
3632 |
expectedReplacedSource, |
3135 |
"diet ast"); |
3633 |
"diet ast"); |
3136 |
|
3634 |
} |
3137 |
expectedCompletionNodeToString = "<CompleteOnName:zzz>"; |
3635 |
public void test0059_Method(){ |
3138 |
expectedParentNodeToString = "Object[] o = <CompleteOnName:zzz>;"; |
3636 |
String str = |
3139 |
completionIdentifier = "zzz"; |
3637 |
"package p;\n" + |
3140 |
expectedReplacedSource = "zzz"; |
3638 |
"public class X {\n" + |
3141 |
expectedUnitDisplayString = |
3639 |
" {\n" + |
3142 |
"package p;\n" + |
3640 |
" #\n" + |
3143 |
"public class X {\n" + |
3641 |
" Object[] o = zzz;\n" + |
3144 |
" {\n" + |
|
|
3145 |
" {\n" + |
3146 |
" Object[] o = <CompleteOnName:zzz>;\n" + |
3147 |
" }\n" + |
3148 |
" }\n" + |
3149 |
" public X() {\n" + |
3150 |
" }\n" + |
3642 |
" }\n" + |
3151 |
"}\n"; |
3643 |
"}\n"; |
|
|
3644 |
|
3645 |
String completeBehind = "zzz"; |
3646 |
int cursorLocation = str.indexOf("zzz") + completeBehind.length() - 1; |
3647 |
|
3648 |
String expectedCompletionNodeToString = "<CompleteOnName:zzz>"; |
3649 |
String expectedParentNodeToString = "Object[] o = <CompleteOnName:zzz>;"; |
3650 |
String completionIdentifier = "zzz"; |
3651 |
String expectedReplacedSource = "zzz"; |
3652 |
String expectedUnitDisplayString = |
3653 |
"package p;\n" + |
3654 |
"public class X {\n" + |
3655 |
" {\n" + |
3656 |
" {\n" + |
3657 |
" Object[] o = <CompleteOnName:zzz>;\n" + |
3658 |
" }\n" + |
3659 |
" }\n" + |
3660 |
" public X() {\n" + |
3661 |
" }\n" + |
3662 |
"}\n"; |
3152 |
|
3663 |
|
3153 |
checkMethodParse( |
3664 |
checkMethodParse( |
3154 |
str.toCharArray(), |
3665 |
str.toCharArray(), |
Lines 3161-3167
Link Here
|
3161 |
"full ast"); |
3672 |
"full ast"); |
3162 |
} |
3673 |
} |
3163 |
|
3674 |
|
3164 |
public void test0060(){ |
3675 |
public void test0060_Diet(){ |
3165 |
String str = |
3676 |
String str = |
3166 |
"package p;\n" + |
3677 |
"package p;\n" + |
3167 |
"public class X {\n" + |
3678 |
"public class X {\n" + |
Lines 3196-3215
Link Here
|
3196 |
completionIdentifier, |
3707 |
completionIdentifier, |
3197 |
expectedReplacedSource, |
3708 |
expectedReplacedSource, |
3198 |
"diet ast"); |
3709 |
"diet ast"); |
3199 |
|
3710 |
} |
3200 |
expectedCompletionNodeToString = "<CompleteOnName:zzz>"; |
3711 |
public void test0060_Method(){ |
3201 |
expectedParentNodeToString = "Object[] o = <CompleteOnName:zzz>;"; |
3712 |
String str = |
3202 |
completionIdentifier = "zzz"; |
3713 |
"package p;\n" + |
3203 |
expectedReplacedSource = "zzz"; |
3714 |
"public class X {\n" + |
3204 |
expectedUnitDisplayString = |
3715 |
" void foo(){\n" + |
3205 |
"package p;\n" + |
3716 |
" #\n" + |
3206 |
"public class X {\n" + |
3717 |
" Object[] o = zzz;\n" + |
3207 |
" public X() {\n" + |
|
|
3208 |
" }\n" + |
3209 |
" void foo() {\n" + |
3210 |
" Object[] o = <CompleteOnName:zzz>;\n" + |
3211 |
" }\n" + |
3718 |
" }\n" + |
3212 |
"}\n"; |
3719 |
"}\n"; |
|
|
3720 |
|
3721 |
String completeBehind = "zzz"; |
3722 |
int cursorLocation = str.indexOf("zzz") + completeBehind.length() - 1; |
3723 |
|
3724 |
String expectedCompletionNodeToString = "<CompleteOnName:zzz>"; |
3725 |
String expectedParentNodeToString = "Object[] o = <CompleteOnName:zzz>;"; |
3726 |
String completionIdentifier = "zzz"; |
3727 |
String expectedReplacedSource = "zzz"; |
3728 |
String expectedUnitDisplayString = |
3729 |
"package p;\n" + |
3730 |
"public class X {\n" + |
3731 |
" public X() {\n" + |
3732 |
" }\n" + |
3733 |
" void foo() {\n" + |
3734 |
" Object[] o = <CompleteOnName:zzz>;\n" + |
3735 |
" }\n" + |
3736 |
"}\n"; |
3213 |
|
3737 |
|
3214 |
checkMethodParse( |
3738 |
checkMethodParse( |
3215 |
str.toCharArray(), |
3739 |
str.toCharArray(), |
Lines 3254-3260
Link Here
|
3254 |
"diet ast"); |
3778 |
"diet ast"); |
3255 |
} |
3779 |
} |
3256 |
|
3780 |
|
3257 |
public void test0062(){ |
3781 |
public void test0062_Diet(){ |
3258 |
String str = |
3782 |
String str = |
3259 |
"package p;\n" + |
3783 |
"package p;\n" + |
3260 |
"public class X {\n" + |
3784 |
"public class X {\n" + |
Lines 3288-3307
Link Here
|
3288 |
completionIdentifier, |
3812 |
completionIdentifier, |
3289 |
expectedReplacedSource, |
3813 |
expectedReplacedSource, |
3290 |
"diet ast"); |
3814 |
"diet ast"); |
3291 |
|
3815 |
} |
3292 |
expectedCompletionNodeToString = "<CompleteOnName:zzz>"; |
3816 |
public void test0062_Method(){ |
3293 |
expectedParentNodeToString = "new X[<CompleteOnName:zzz>]"; |
3817 |
String str = |
3294 |
completionIdentifier = "zzz"; |
3818 |
"package p;\n" + |
3295 |
expectedReplacedSource = "zzz"; |
3819 |
"public class X {\n" + |
3296 |
expectedUnitDisplayString = |
|
|
3297 |
"package p;\n" + |
3298 |
"public class X {\n" + |
3299 |
" {\n" + |
3820 |
" {\n" + |
3300 |
" Object o = new X[<CompleteOnName:zzz>];\n" + |
3821 |
" Object o = new X[zzz;\n" + |
3301 |
" }\n" + |
|
|
3302 |
" public X() {\n" + |
3303 |
" }\n" + |
3822 |
" }\n" + |
3304 |
"}\n"; |
3823 |
"}\n"; |
|
|
3824 |
|
3825 |
String completeBehind = "zzz"; |
3826 |
int cursorLocation = str.indexOf("zzz") + completeBehind.length() - 1; |
3827 |
|
3828 |
String expectedCompletionNodeToString = "<CompleteOnName:zzz>"; |
3829 |
String expectedParentNodeToString = "new X[<CompleteOnName:zzz>]"; |
3830 |
String completionIdentifier = "zzz"; |
3831 |
String expectedReplacedSource = "zzz"; |
3832 |
String expectedUnitDisplayString = |
3833 |
"package p;\n" + |
3834 |
"public class X {\n" + |
3835 |
" {\n" + |
3836 |
" Object o = new X[<CompleteOnName:zzz>];\n" + |
3837 |
" }\n" + |
3838 |
" public X() {\n" + |
3839 |
" }\n" + |
3840 |
"}\n"; |
3305 |
|
3841 |
|
3306 |
checkMethodParse( |
3842 |
checkMethodParse( |
3307 |
str.toCharArray(), |
3843 |
str.toCharArray(), |
Lines 3314-3320
Link Here
|
3314 |
"full ast"); |
3850 |
"full ast"); |
3315 |
} |
3851 |
} |
3316 |
|
3852 |
|
3317 |
public void test0063(){ |
3853 |
public void test0063_Diet(){ |
3318 |
String str = |
3854 |
String str = |
3319 |
"package p;\n" + |
3855 |
"package p;\n" + |
3320 |
"public class X {\n" + |
3856 |
"public class X {\n" + |
Lines 3347-3367
Link Here
|
3347 |
expectedUnitDisplayString, |
3883 |
expectedUnitDisplayString, |
3348 |
completionIdentifier, |
3884 |
completionIdentifier, |
3349 |
expectedReplacedSource, |
3885 |
expectedReplacedSource, |
3350 |
"diet ast"); |
3886 |
"diet ast"); |
3351 |
|
3887 |
} |
3352 |
expectedCompletionNodeToString = "<CompleteOnName:zzz>"; |
3888 |
public void test0063_Method(){ |
3353 |
expectedParentNodeToString = "new X[<CompleteOnName:zzz>]"; |
3889 |
String str = |
3354 |
completionIdentifier = "zzz"; |
3890 |
"package p;\n" + |
3355 |
expectedReplacedSource = "zzz"; |
3891 |
"public class X {\n" + |
3356 |
expectedUnitDisplayString = |
3892 |
" void foo(){\n" + |
3357 |
"package p;\n" + |
3893 |
" Object o = new X[zzz;\n" + |
3358 |
"public class X {\n" + |
|
|
3359 |
" public X() {\n" + |
3360 |
" }\n" + |
3361 |
" void foo() {\n" + |
3362 |
" Object o = new X[<CompleteOnName:zzz>];\n" + |
3363 |
" }\n" + |
3894 |
" }\n" + |
3364 |
"}\n"; |
3895 |
"}\n"; |
|
|
3896 |
|
3897 |
String completeBehind = "zzz"; |
3898 |
int cursorLocation = str.indexOf("zzz") + completeBehind.length() - 1; |
3899 |
|
3900 |
String expectedCompletionNodeToString = "<CompleteOnName:zzz>"; |
3901 |
String expectedParentNodeToString = "new X[<CompleteOnName:zzz>]"; |
3902 |
String completionIdentifier = "zzz"; |
3903 |
String expectedReplacedSource = "zzz"; |
3904 |
String expectedUnitDisplayString = |
3905 |
"package p;\n" + |
3906 |
"public class X {\n" + |
3907 |
" public X() {\n" + |
3908 |
" }\n" + |
3909 |
" void foo() {\n" + |
3910 |
" Object o = new X[<CompleteOnName:zzz>];\n" + |
3911 |
" }\n" + |
3912 |
"}\n"; |
3365 |
|
3913 |
|
3366 |
checkMethodParse( |
3914 |
checkMethodParse( |
3367 |
str.toCharArray(), |
3915 |
str.toCharArray(), |
Lines 3408-3414
Link Here
|
3408 |
"diet ast"); |
3956 |
"diet ast"); |
3409 |
} |
3957 |
} |
3410 |
|
3958 |
|
3411 |
public void test0065(){ |
3959 |
public void test0065_Diet(){ |
3412 |
String str = |
3960 |
String str = |
3413 |
"package p;\n" + |
3961 |
"package p;\n" + |
3414 |
"public class X {\n" + |
3962 |
"public class X {\n" + |
Lines 3443-3464
Link Here
|
3443 |
completionIdentifier, |
3991 |
completionIdentifier, |
3444 |
expectedReplacedSource, |
3992 |
expectedReplacedSource, |
3445 |
"diet ast"); |
3993 |
"diet ast"); |
3446 |
|
3994 |
} |
3447 |
expectedCompletionNodeToString = "<CompleteOnName:zzz>"; |
3995 |
public void test0065_Method(){ |
3448 |
expectedParentNodeToString = "new X[<CompleteOnName:zzz>]"; |
3996 |
String str = |
3449 |
completionIdentifier = "zzz"; |
3997 |
"package p;\n" + |
3450 |
expectedReplacedSource = "zzz"; |
3998 |
"public class X {\n" + |
3451 |
expectedUnitDisplayString = |
|
|
3452 |
"package p;\n" + |
3453 |
"public class X {\n" + |
3454 |
" {\n" + |
3999 |
" {\n" + |
3455 |
" {\n" + |
4000 |
" #\n" + |
3456 |
" Object o = new X[<CompleteOnName:zzz>];\n" + |
4001 |
" Object o = new X[zzz;\n" + |
3457 |
" }\n" + |
|
|
3458 |
" }\n" + |
3459 |
" public X() {\n" + |
3460 |
" }\n" + |
4002 |
" }\n" + |
3461 |
"}\n"; |
4003 |
"}\n"; |
|
|
4004 |
|
4005 |
String completeBehind = "zzz"; |
4006 |
int cursorLocation = str.indexOf("zzz") + completeBehind.length() - 1; |
4007 |
|
4008 |
String expectedCompletionNodeToString = "<CompleteOnName:zzz>"; |
4009 |
String expectedParentNodeToString = "new X[<CompleteOnName:zzz>]"; |
4010 |
String completionIdentifier = "zzz"; |
4011 |
String expectedReplacedSource = "zzz"; |
4012 |
String expectedUnitDisplayString = |
4013 |
"package p;\n" + |
4014 |
"public class X {\n" + |
4015 |
" {\n" + |
4016 |
" {\n" + |
4017 |
" Object o = new X[<CompleteOnName:zzz>];\n" + |
4018 |
" }\n" + |
4019 |
" }\n" + |
4020 |
" public X() {\n" + |
4021 |
" }\n" + |
4022 |
"}\n"; |
3462 |
|
4023 |
|
3463 |
checkMethodParse( |
4024 |
checkMethodParse( |
3464 |
str.toCharArray(), |
4025 |
str.toCharArray(), |
Lines 3471-3477
Link Here
|
3471 |
"full ast"); |
4032 |
"full ast"); |
3472 |
} |
4033 |
} |
3473 |
|
4034 |
|
3474 |
public void test0066(){ |
4035 |
public void test0066_Diet(){ |
3475 |
String str = |
4036 |
String str = |
3476 |
"package p;\n" + |
4037 |
"package p;\n" + |
3477 |
"public class X {\n" + |
4038 |
"public class X {\n" + |
Lines 3506-3526
Link Here
|
3506 |
completionIdentifier, |
4067 |
completionIdentifier, |
3507 |
expectedReplacedSource, |
4068 |
expectedReplacedSource, |
3508 |
"diet ast"); |
4069 |
"diet ast"); |
3509 |
|
4070 |
} |
3510 |
expectedCompletionNodeToString = "<CompleteOnName:zzz>"; |
4071 |
public void test0066_Method(){ |
3511 |
expectedParentNodeToString = "new X[<CompleteOnName:zzz>]"; |
4072 |
String str = |
3512 |
completionIdentifier = "zzz"; |
4073 |
"package p;\n" + |
3513 |
expectedReplacedSource = "zzz"; |
4074 |
"public class X {\n" + |
3514 |
expectedUnitDisplayString = |
4075 |
" void foo(){\n" + |
3515 |
"package p;\n" + |
4076 |
" #\n" + |
3516 |
"public class X {\n" + |
4077 |
" Object o = new X[zzz;\n" + |
3517 |
" public X() {\n" + |
|
|
3518 |
" }\n" + |
3519 |
" void foo() {\n" + |
3520 |
" Object o = new X[<CompleteOnName:zzz>];\n" + |
3521 |
" }\n" + |
4078 |
" }\n" + |
3522 |
"}\n"; |
4079 |
"}\n"; |
3523 |
|
4080 |
|
|
|
4081 |
String completeBehind = "zzz"; |
4082 |
int cursorLocation = str.indexOf("zzz") + completeBehind.length() - 1; |
4083 |
|
4084 |
String expectedCompletionNodeToString = "<CompleteOnName:zzz>"; |
4085 |
String expectedParentNodeToString = "new X[<CompleteOnName:zzz>]"; |
4086 |
String completionIdentifier = "zzz"; |
4087 |
String expectedReplacedSource = "zzz"; |
4088 |
String expectedUnitDisplayString = |
4089 |
"package p;\n" + |
4090 |
"public class X {\n" + |
4091 |
" public X() {\n" + |
4092 |
" }\n" + |
4093 |
" void foo() {\n" + |
4094 |
" Object o = new X[<CompleteOnName:zzz>];\n" + |
4095 |
" }\n" + |
4096 |
"}\n"; |
4097 |
|
3524 |
checkMethodParse( |
4098 |
checkMethodParse( |
3525 |
str.toCharArray(), |
4099 |
str.toCharArray(), |
3526 |
cursorLocation, |
4100 |
cursorLocation, |
Lines 3531-3537
Link Here
|
3531 |
expectedReplacedSource, |
4105 |
expectedReplacedSource, |
3532 |
"full ast"); |
4106 |
"full ast"); |
3533 |
} |
4107 |
} |
3534 |
public void test0067(){ |
4108 |
public void test0067_Diet(){ |
3535 |
String str = |
4109 |
String str = |
3536 |
"package p;\n" + |
4110 |
"package p;\n" + |
3537 |
"public class X {\n" + |
4111 |
"public class X {\n" + |
Lines 3564-3585
Link Here
|
3564 |
completionIdentifier, |
4138 |
completionIdentifier, |
3565 |
expectedReplacedSource, |
4139 |
expectedReplacedSource, |
3566 |
"diet ast"); |
4140 |
"diet ast"); |
3567 |
|
4141 |
} |
3568 |
expectedCompletionNodeToString = "<CompleteOnName:zzz>"; |
4142 |
public void test0067_Method(){ |
3569 |
expectedParentNodeToString = "<NONE>"; |
4143 |
String str = |
3570 |
completionIdentifier = "zzz"; |
4144 |
"package p;\n" + |
3571 |
expectedReplacedSource = "zzz"; |
4145 |
"public class X {\n" + |
3572 |
expectedUnitDisplayString = |
4146 |
" Object o = new X[]{zzz;\n" + |
3573 |
"package p;\n" + |
|
|
3574 |
"public class X {\n" + |
3575 |
" Object o;\n" + |
3576 |
" {\n" + |
3577 |
" <CompleteOnName:zzz>;\n" + |
3578 |
" }\n" + |
3579 |
" public X() {\n" + |
3580 |
" }\n" + |
3581 |
"}\n"; |
4147 |
"}\n"; |
3582 |
|
4148 |
|
|
|
4149 |
String completeBehind = "zzz"; |
4150 |
int cursorLocation = str.indexOf("zzz") + completeBehind.length() - 1; |
4151 |
|
4152 |
String expectedCompletionNodeToString = "<CompleteOnName:zzz>"; |
4153 |
String expectedParentNodeToString = "<NONE>"; |
4154 |
String completionIdentifier = "zzz"; |
4155 |
String expectedReplacedSource = "zzz"; |
4156 |
String expectedUnitDisplayString = |
4157 |
"package p;\n" + |
4158 |
"public class X {\n" + |
4159 |
" Object o;\n" + |
4160 |
" {\n" + |
4161 |
" <CompleteOnName:zzz>;\n" + |
4162 |
" }\n" + |
4163 |
" public X() {\n" + |
4164 |
" }\n" + |
4165 |
"}\n"; |
4166 |
|
3583 |
checkMethodParse( |
4167 |
checkMethodParse( |
3584 |
str.toCharArray(), |
4168 |
str.toCharArray(), |
3585 |
cursorLocation, |
4169 |
cursorLocation, |
Lines 3591-3597
Link Here
|
3591 |
"full ast"); |
4175 |
"full ast"); |
3592 |
} |
4176 |
} |
3593 |
|
4177 |
|
3594 |
public void test0068(){ |
4178 |
public void test0068_Diet(){ |
3595 |
String str = |
4179 |
String str = |
3596 |
"package p;\n" + |
4180 |
"package p;\n" + |
3597 |
"public class X {\n" + |
4181 |
"public class X {\n" + |
Lines 3625-3644
Link Here
|
3625 |
completionIdentifier, |
4209 |
completionIdentifier, |
3626 |
expectedReplacedSource, |
4210 |
expectedReplacedSource, |
3627 |
"diet ast"); |
4211 |
"diet ast"); |
3628 |
|
4212 |
} |
3629 |
expectedCompletionNodeToString = "<CompleteOnName:zzz>"; |
4213 |
public void test0068_Method(){ |
3630 |
expectedParentNodeToString = "new X[]{<CompleteOnName:zzz>}"; |
4214 |
String str = |
3631 |
completionIdentifier = "zzz"; |
4215 |
"package p;\n" + |
3632 |
expectedReplacedSource = "zzz"; |
4216 |
"public class X {\n" + |
3633 |
expectedUnitDisplayString = |
|
|
3634 |
"package p;\n" + |
3635 |
"public class X {\n" + |
3636 |
" {\n" + |
4217 |
" {\n" + |
3637 |
" Object o = new X[]{<CompleteOnName:zzz>};\n" + |
4218 |
" Object o = new X[]{zzz;\n" + |
3638 |
" }\n" + |
|
|
3639 |
" public X() {\n" + |
3640 |
" }\n" + |
4219 |
" }\n" + |
3641 |
"}\n"; |
4220 |
"}\n"; |
|
|
4221 |
|
4222 |
String completeBehind = "zzz"; |
4223 |
int cursorLocation = str.indexOf("zzz") + completeBehind.length() - 1; |
4224 |
|
4225 |
String expectedCompletionNodeToString = "<CompleteOnName:zzz>"; |
4226 |
String expectedParentNodeToString = "new X[]{<CompleteOnName:zzz>}"; |
4227 |
String completionIdentifier = "zzz"; |
4228 |
String expectedReplacedSource = "zzz"; |
4229 |
String expectedUnitDisplayString = |
4230 |
"package p;\n" + |
4231 |
"public class X {\n" + |
4232 |
" {\n" + |
4233 |
" Object o = new X[]{<CompleteOnName:zzz>};\n" + |
4234 |
" }\n" + |
4235 |
" public X() {\n" + |
4236 |
" }\n" + |
4237 |
"}\n"; |
3642 |
|
4238 |
|
3643 |
checkMethodParse( |
4239 |
checkMethodParse( |
3644 |
str.toCharArray(), |
4240 |
str.toCharArray(), |
Lines 3650-3656
Link Here
|
3650 |
expectedReplacedSource, |
4246 |
expectedReplacedSource, |
3651 |
"full ast"); |
4247 |
"full ast"); |
3652 |
} |
4248 |
} |
3653 |
public void test0069(){ |
4249 |
public void test0069_Diet(){ |
3654 |
String str = |
4250 |
String str = |
3655 |
"package p;\n" + |
4251 |
"package p;\n" + |
3656 |
"public class X {\n" + |
4252 |
"public class X {\n" + |
Lines 3686-3706
Link Here
|
3686 |
expectedUnitDisplayString, |
4282 |
expectedUnitDisplayString, |
3687 |
completionIdentifier, |
4283 |
completionIdentifier, |
3688 |
expectedReplacedSource, |
4284 |
expectedReplacedSource, |
3689 |
"diet ast"); |
4285 |
"diet ast"); |
3690 |
|
4286 |
} |
3691 |
expectedCompletionNodeToString = "<CompleteOnName:zzz>"; |
4287 |
public void test0069_Method(){ |
3692 |
expectedParentNodeToString = "new X[]{<CompleteOnName:zzz>}"; |
4288 |
String str = |
3693 |
completionIdentifier = "zzz"; |
4289 |
"package p;\n" + |
3694 |
expectedReplacedSource = "zzz"; |
4290 |
"public class X {\n" + |
3695 |
expectedUnitDisplayString = |
4291 |
" void foo(){\n" + |
3696 |
"package p;\n" + |
4292 |
" Object o = new X[]{zzz;\n" + |
3697 |
"public class X {\n" + |
|
|
3698 |
" public X() {\n" + |
3699 |
" }\n" + |
3700 |
" void foo() {\n" + |
3701 |
" Object o = new X[]{<CompleteOnName:zzz>};\n" + |
3702 |
" }\n" + |
4293 |
" }\n" + |
3703 |
"}\n"; |
4294 |
"}\n"; |
|
|
4295 |
|
4296 |
String completeBehind = "zzz"; |
4297 |
int cursorLocation = str.indexOf("zzz") + completeBehind.length() - 1; |
4298 |
|
4299 |
String expectedCompletionNodeToString = "<CompleteOnName:zzz>"; |
4300 |
String expectedParentNodeToString = "new X[]{<CompleteOnName:zzz>}"; |
4301 |
String completionIdentifier = "zzz"; |
4302 |
String expectedReplacedSource = "zzz"; |
4303 |
String expectedUnitDisplayString = |
4304 |
"package p;\n" + |
4305 |
"public class X {\n" + |
4306 |
" public X() {\n" + |
4307 |
" }\n" + |
4308 |
" void foo() {\n" + |
4309 |
" Object o = new X[]{<CompleteOnName:zzz>};\n" + |
4310 |
" }\n" + |
4311 |
"}\n"; |
3704 |
|
4312 |
|
3705 |
checkMethodParse( |
4313 |
checkMethodParse( |
3706 |
str.toCharArray(), |
4314 |
str.toCharArray(), |
Lines 3713-3719
Link Here
|
3713 |
"full ast"); |
4321 |
"full ast"); |
3714 |
} |
4322 |
} |
3715 |
|
4323 |
|
3716 |
public void test0070(){ |
4324 |
public void test0070_Diet(){ |
3717 |
String str = |
4325 |
String str = |
3718 |
"package p;\n" + |
4326 |
"package p;\n" + |
3719 |
"public class X {\n" + |
4327 |
"public class X {\n" + |
Lines 3747-3767
Link Here
|
3747 |
completionIdentifier, |
4355 |
completionIdentifier, |
3748 |
expectedReplacedSource, |
4356 |
expectedReplacedSource, |
3749 |
"diet ast"); |
4357 |
"diet ast"); |
3750 |
|
4358 |
} |
3751 |
expectedCompletionNodeToString = "<CompleteOnName:zzz>"; |
4359 |
public void test0070_Method(){ |
3752 |
expectedParentNodeToString = "<NONE>"; |
4360 |
String str = |
3753 |
completionIdentifier = "zzz"; |
4361 |
"package p;\n" + |
3754 |
expectedReplacedSource = "zzz"; |
4362 |
"public class X {\n" + |
3755 |
expectedUnitDisplayString = |
4363 |
" #\n" + |
3756 |
"package p;\n" + |
4364 |
" Object o = new X[]{zzz;\n" + |
3757 |
"public class X {\n" + |
|
|
3758 |
" Object o;\n" + |
3759 |
" {\n" + |
3760 |
" <CompleteOnName:zzz>;\n" + |
3761 |
" }\n" + |
3762 |
" public X() {\n" + |
3763 |
" }\n" + |
3764 |
"}\n"; |
4365 |
"}\n"; |
|
|
4366 |
|
4367 |
String completeBehind = "zzz"; |
4368 |
int cursorLocation = str.indexOf("zzz") + completeBehind.length() - 1; |
4369 |
|
4370 |
String expectedCompletionNodeToString = "<CompleteOnName:zzz>"; |
4371 |
String expectedParentNodeToString = "<NONE>"; |
4372 |
String completionIdentifier = "zzz"; |
4373 |
String expectedReplacedSource = "zzz"; |
4374 |
String expectedUnitDisplayString = |
4375 |
"package p;\n" + |
4376 |
"public class X {\n" + |
4377 |
" Object o;\n" + |
4378 |
" {\n" + |
4379 |
" <CompleteOnName:zzz>;\n" + |
4380 |
" }\n" + |
4381 |
" public X() {\n" + |
4382 |
" }\n" + |
4383 |
"}\n"; |
3765 |
|
4384 |
|
3766 |
checkMethodParse( |
4385 |
checkMethodParse( |
3767 |
str.toCharArray(), |
4386 |
str.toCharArray(), |
Lines 3774-3780
Link Here
|
3774 |
"full ast"); |
4393 |
"full ast"); |
3775 |
} |
4394 |
} |
3776 |
|
4395 |
|
3777 |
public void test0071(){ |
4396 |
public void test0071_Diet(){ |
3778 |
String str = |
4397 |
String str = |
3779 |
"package p;\n" + |
4398 |
"package p;\n" + |
3780 |
"public class X {\n" + |
4399 |
"public class X {\n" + |
Lines 3809-3833
Link Here
|
3809 |
completionIdentifier, |
4428 |
completionIdentifier, |
3810 |
expectedReplacedSource, |
4429 |
expectedReplacedSource, |
3811 |
"diet ast"); |
4430 |
"diet ast"); |
3812 |
|
4431 |
} |
3813 |
expectedCompletionNodeToString = "<CompleteOnName:zzz>"; |
4432 |
public void test0071_Method(){ |
3814 |
expectedParentNodeToString = "<NONE>"; |
4433 |
String str = |
3815 |
completionIdentifier = "zzz"; |
4434 |
"package p;\n" + |
3816 |
expectedReplacedSource = "zzz"; |
4435 |
"public class X {\n" + |
3817 |
expectedUnitDisplayString = |
|
|
3818 |
"package p;\n" + |
3819 |
"public class X {\n" + |
3820 |
" {\n" + |
4436 |
" {\n" + |
3821 |
" {\n" + |
4437 |
" #\n" + |
3822 |
" Object o;\n" + |
4438 |
" Object o = new X[]{zzz;\n" + |
3823 |
" {\n" + |
|
|
3824 |
" <CompleteOnName:zzz>;\n" + |
3825 |
" }\n" + |
3826 |
" }\n" + |
3827 |
" }\n" + |
3828 |
" public X() {\n" + |
3829 |
" }\n" + |
4439 |
" }\n" + |
3830 |
"}\n"; |
4440 |
"}\n"; |
|
|
4441 |
|
4442 |
String completeBehind = "zzz"; |
4443 |
int cursorLocation = str.indexOf("zzz") + completeBehind.length() - 1; |
4444 |
|
4445 |
String expectedCompletionNodeToString = "<CompleteOnName:zzz>"; |
4446 |
String expectedParentNodeToString = "<NONE>"; |
4447 |
String completionIdentifier = "zzz"; |
4448 |
String expectedReplacedSource = "zzz"; |
4449 |
String expectedUnitDisplayString = |
4450 |
"package p;\n" + |
4451 |
"public class X {\n" + |
4452 |
" {\n" + |
4453 |
" {\n" + |
4454 |
" Object o;\n" + |
4455 |
" {\n" + |
4456 |
" <CompleteOnName:zzz>;\n" + |
4457 |
" }\n" + |
4458 |
" }\n" + |
4459 |
" }\n" + |
4460 |
" public X() {\n" + |
4461 |
" }\n" + |
4462 |
"}\n"; |
3831 |
|
4463 |
|
3832 |
checkMethodParse( |
4464 |
checkMethodParse( |
3833 |
str.toCharArray(), |
4465 |
str.toCharArray(), |
Lines 3840-3846
Link Here
|
3840 |
"full ast"); |
4472 |
"full ast"); |
3841 |
} |
4473 |
} |
3842 |
|
4474 |
|
3843 |
public void test0072(){ |
4475 |
public void test0072_Diet(){ |
3844 |
String str = |
4476 |
String str = |
3845 |
"package p;\n" + |
4477 |
"package p;\n" + |
3846 |
"public class X {\n" + |
4478 |
"public class X {\n" + |
Lines 3878-3900
Link Here
|
3878 |
completionIdentifier, |
4510 |
completionIdentifier, |
3879 |
expectedReplacedSource, |
4511 |
expectedReplacedSource, |
3880 |
"diet ast"); |
4512 |
"diet ast"); |
3881 |
|
4513 |
} |
3882 |
expectedCompletionNodeToString = "<CompleteOnName:zzz>"; |
4514 |
public void test0072_Method(){ |
3883 |
expectedParentNodeToString = "<NONE>"; |
4515 |
String str = |
3884 |
completionIdentifier = "zzz"; |
4516 |
"package p;\n" + |
3885 |
expectedReplacedSource = "zzz"; |
4517 |
"public class X {\n" + |
3886 |
expectedUnitDisplayString = |
4518 |
" void foo(){\n" + |
3887 |
"package p;\n" + |
4519 |
" #\n" + |
3888 |
"public class X {\n" + |
4520 |
" Object o = new X[]{zzz;\n" + |
3889 |
" public X() {\n" + |
|
|
3890 |
" }\n" + |
3891 |
" void foo() {\n" + |
3892 |
" Object o;\n" + |
3893 |
" {\n" + |
3894 |
" <CompleteOnName:zzz>;\n" + |
3895 |
" }\n" + |
3896 |
" }\n" + |
4521 |
" }\n" + |
3897 |
"}\n"; |
4522 |
"}\n"; |
|
|
4523 |
|
4524 |
String completeBehind = "zzz"; |
4525 |
int cursorLocation = str.indexOf("zzz") + completeBehind.length() - 1; |
4526 |
|
4527 |
String expectedCompletionNodeToString = "<CompleteOnName:zzz>"; |
4528 |
String expectedParentNodeToString = "<NONE>"; |
4529 |
String completionIdentifier = "zzz"; |
4530 |
String expectedReplacedSource = "zzz"; |
4531 |
String expectedUnitDisplayString = |
4532 |
"package p;\n" + |
4533 |
"public class X {\n" + |
4534 |
" public X() {\n" + |
4535 |
" }\n" + |
4536 |
" void foo() {\n" + |
4537 |
" Object o;\n" + |
4538 |
" {\n" + |
4539 |
" <CompleteOnName:zzz>;\n" + |
4540 |
" }\n" + |
4541 |
" }\n" + |
4542 |
"}\n"; |
3898 |
|
4543 |
|
3899 |
checkMethodParse( |
4544 |
checkMethodParse( |
3900 |
str.toCharArray(), |
4545 |
str.toCharArray(), |
Lines 3940-3946
Link Here
|
3940 |
} |
4585 |
} |
3941 |
|
4586 |
|
3942 |
|
4587 |
|
3943 |
public void test0074(){ |
4588 |
public void test0074_Diet(){ |
3944 |
String str = |
4589 |
String str = |
3945 |
"package p;\n" + |
4590 |
"package p;\n" + |
3946 |
"public class X {\n" + |
4591 |
"public class X {\n" + |
Lines 3974-3993
Link Here
|
3974 |
completionIdentifier, |
4619 |
completionIdentifier, |
3975 |
expectedReplacedSource, |
4620 |
expectedReplacedSource, |
3976 |
"diet ast"); |
4621 |
"diet ast"); |
3977 |
|
4622 |
} |
3978 |
expectedCompletionNodeToString = "<CompleteOnName:zzz>"; |
4623 |
public void test0074_Method(){ |
3979 |
expectedParentNodeToString = "new int[<CompleteOnName:zzz>]"; |
4624 |
String str = |
3980 |
completionIdentifier = "zzz"; |
4625 |
"package p;\n" + |
3981 |
expectedReplacedSource = "zzz"; |
4626 |
"public class X {\n" + |
3982 |
expectedUnitDisplayString = |
|
|
3983 |
"package p;\n" + |
3984 |
"public class X {\n" + |
3985 |
" {\n" + |
4627 |
" {\n" + |
3986 |
" int o = new int[<CompleteOnName:zzz>];\n" + |
4628 |
" int o = new int[zzz;\n" + |
3987 |
" }\n" + |
|
|
3988 |
" public X() {\n" + |
3989 |
" }\n" + |
4629 |
" }\n" + |
3990 |
"}\n"; |
4630 |
"}\n"; |
|
|
4631 |
|
4632 |
String completeBehind = "zzz"; |
4633 |
int cursorLocation = str.indexOf("zzz") + completeBehind.length() - 1; |
4634 |
|
4635 |
String expectedCompletionNodeToString = "<CompleteOnName:zzz>"; |
4636 |
String expectedParentNodeToString = "new int[<CompleteOnName:zzz>]"; |
4637 |
String completionIdentifier = "zzz"; |
4638 |
String expectedReplacedSource = "zzz"; |
4639 |
String expectedUnitDisplayString = |
4640 |
"package p;\n" + |
4641 |
"public class X {\n" + |
4642 |
" {\n" + |
4643 |
" int o = new int[<CompleteOnName:zzz>];\n" + |
4644 |
" }\n" + |
4645 |
" public X() {\n" + |
4646 |
" }\n" + |
4647 |
"}\n"; |
3991 |
|
4648 |
|
3992 |
checkMethodParse( |
4649 |
checkMethodParse( |
3993 |
str.toCharArray(), |
4650 |
str.toCharArray(), |
Lines 4001-4007
Link Here
|
4001 |
} |
4658 |
} |
4002 |
|
4659 |
|
4003 |
|
4660 |
|
4004 |
public void test0075(){ |
4661 |
public void test0075_Diet(){ |
4005 |
String str = |
4662 |
String str = |
4006 |
"package p;\n" + |
4663 |
"package p;\n" + |
4007 |
"public class X {\n" + |
4664 |
"public class X {\n" + |
Lines 4034-4054
Link Here
|
4034 |
expectedUnitDisplayString, |
4691 |
expectedUnitDisplayString, |
4035 |
completionIdentifier, |
4692 |
completionIdentifier, |
4036 |
expectedReplacedSource, |
4693 |
expectedReplacedSource, |
4037 |
"diet ast"); |
4694 |
"diet ast"); |
4038 |
|
4695 |
} |
4039 |
expectedCompletionNodeToString = "<CompleteOnName:zzz>"; |
4696 |
public void test0075_Method(){ |
4040 |
expectedParentNodeToString = "new int[<CompleteOnName:zzz>]"; |
4697 |
String str = |
4041 |
completionIdentifier = "zzz"; |
4698 |
"package p;\n" + |
4042 |
expectedReplacedSource = "zzz"; |
4699 |
"public class X {\n" + |
4043 |
expectedUnitDisplayString = |
4700 |
" void foo(){\n" + |
4044 |
"package p;\n" + |
4701 |
" int o = new int[zzz;\n" + |
4045 |
"public class X {\n" + |
|
|
4046 |
" public X() {\n" + |
4047 |
" }\n" + |
4048 |
" void foo() {\n" + |
4049 |
" int o = new int[<CompleteOnName:zzz>];\n" + |
4050 |
" }\n" + |
4702 |
" }\n" + |
4051 |
"}\n"; |
4703 |
"}\n"; |
|
|
4704 |
|
4705 |
String completeBehind = "zzz"; |
4706 |
int cursorLocation = str.indexOf("zzz") + completeBehind.length() - 1; |
4707 |
|
4708 |
String expectedCompletionNodeToString = "<CompleteOnName:zzz>"; |
4709 |
String expectedParentNodeToString = "new int[<CompleteOnName:zzz>]"; |
4710 |
String completionIdentifier = "zzz"; |
4711 |
String expectedReplacedSource = "zzz"; |
4712 |
String expectedUnitDisplayString = |
4713 |
"package p;\n" + |
4714 |
"public class X {\n" + |
4715 |
" public X() {\n" + |
4716 |
" }\n" + |
4717 |
" void foo() {\n" + |
4718 |
" int o = new int[<CompleteOnName:zzz>];\n" + |
4719 |
" }\n" + |
4720 |
"}\n"; |
4052 |
|
4721 |
|
4053 |
checkMethodParse( |
4722 |
checkMethodParse( |
4054 |
str.toCharArray(), |
4723 |
str.toCharArray(), |
Lines 4097-4103
Link Here
|
4097 |
} |
4766 |
} |
4098 |
|
4767 |
|
4099 |
|
4768 |
|
4100 |
public void test0077(){ |
4769 |
public void test0077_Diet(){ |
4101 |
String str = |
4770 |
String str = |
4102 |
"package p;\n" + |
4771 |
"package p;\n" + |
4103 |
"public class X {\n" + |
4772 |
"public class X {\n" + |
Lines 4132-4153
Link Here
|
4132 |
completionIdentifier, |
4801 |
completionIdentifier, |
4133 |
expectedReplacedSource, |
4802 |
expectedReplacedSource, |
4134 |
"diet ast"); |
4803 |
"diet ast"); |
4135 |
|
4804 |
} |
4136 |
expectedCompletionNodeToString = "<CompleteOnName:zzz>"; |
4805 |
public void test0077_Method(){ |
4137 |
expectedParentNodeToString = "new int[<CompleteOnName:zzz>]"; |
4806 |
String str = |
4138 |
completionIdentifier = "zzz"; |
4807 |
"package p;\n" + |
4139 |
expectedReplacedSource = "zzz"; |
4808 |
"public class X {\n" + |
4140 |
expectedUnitDisplayString = |
|
|
4141 |
"package p;\n" + |
4142 |
"public class X {\n" + |
4143 |
" {\n" + |
4809 |
" {\n" + |
4144 |
" {\n" + |
4810 |
" #\n" + |
4145 |
" int o = new int[<CompleteOnName:zzz>];\n" + |
4811 |
" int o = new int[zzz;\n" + |
4146 |
" }\n" + |
|
|
4147 |
" }\n" + |
4148 |
" public X() {\n" + |
4149 |
" }\n" + |
4812 |
" }\n" + |
4150 |
"}\n"; |
4813 |
"}\n"; |
|
|
4814 |
|
4815 |
String completeBehind = "zzz"; |
4816 |
int cursorLocation = str.indexOf("zzz") + completeBehind.length() - 1; |
4817 |
|
4818 |
String expectedCompletionNodeToString = "<CompleteOnName:zzz>"; |
4819 |
String expectedParentNodeToString = "new int[<CompleteOnName:zzz>]"; |
4820 |
String completionIdentifier = "zzz"; |
4821 |
String expectedReplacedSource = "zzz"; |
4822 |
String expectedUnitDisplayString = |
4823 |
"package p;\n" + |
4824 |
"public class X {\n" + |
4825 |
" {\n" + |
4826 |
" {\n" + |
4827 |
" int o = new int[<CompleteOnName:zzz>];\n" + |
4828 |
" }\n" + |
4829 |
" }\n" + |
4830 |
" public X() {\n" + |
4831 |
" }\n" + |
4832 |
"}\n"; |
4151 |
|
4833 |
|
4152 |
checkMethodParse( |
4834 |
checkMethodParse( |
4153 |
str.toCharArray(), |
4835 |
str.toCharArray(), |
Lines 4161-4167
Link Here
|
4161 |
} |
4843 |
} |
4162 |
|
4844 |
|
4163 |
|
4845 |
|
4164 |
public void test0078(){ |
4846 |
public void test0078_Diet(){ |
4165 |
String str = |
4847 |
String str = |
4166 |
"package p;\n" + |
4848 |
"package p;\n" + |
4167 |
"public class X {\n" + |
4849 |
"public class X {\n" + |
Lines 4196-4215
Link Here
|
4196 |
completionIdentifier, |
4878 |
completionIdentifier, |
4197 |
expectedReplacedSource, |
4879 |
expectedReplacedSource, |
4198 |
"diet ast"); |
4880 |
"diet ast"); |
4199 |
|
4881 |
} |
4200 |
expectedCompletionNodeToString = "<CompleteOnName:zzz>"; |
4882 |
public void test0078_Method(){ |
4201 |
expectedParentNodeToString = "new int[<CompleteOnName:zzz>]"; |
4883 |
String str = |
4202 |
completionIdentifier = "zzz"; |
4884 |
"package p;\n" + |
4203 |
expectedReplacedSource = "zzz"; |
4885 |
"public class X {\n" + |
4204 |
expectedUnitDisplayString = |
4886 |
" void foo(){\n" + |
4205 |
"package p;\n" + |
4887 |
" #\n" + |
4206 |
"public class X {\n" + |
4888 |
" int o = new int[zzz;\n" + |
4207 |
" public X() {\n" + |
|
|
4208 |
" }\n" + |
4209 |
" void foo() {\n" + |
4210 |
" int o = new int[<CompleteOnName:zzz>];\n" + |
4211 |
" }\n" + |
4889 |
" }\n" + |
4212 |
"}\n"; |
4890 |
"}\n"; |
|
|
4891 |
|
4892 |
String completeBehind = "zzz"; |
4893 |
int cursorLocation = str.indexOf("zzz") + completeBehind.length() - 1; |
4894 |
|
4895 |
String expectedCompletionNodeToString = "<CompleteOnName:zzz>"; |
4896 |
String expectedParentNodeToString = "new int[<CompleteOnName:zzz>]"; |
4897 |
String completionIdentifier = "zzz"; |
4898 |
String expectedReplacedSource = "zzz"; |
4899 |
String expectedUnitDisplayString = |
4900 |
"package p;\n" + |
4901 |
"public class X {\n" + |
4902 |
" public X() {\n" + |
4903 |
" }\n" + |
4904 |
" void foo() {\n" + |
4905 |
" int o = new int[<CompleteOnName:zzz>];\n" + |
4906 |
" }\n" + |
4907 |
"}\n"; |
4213 |
|
4908 |
|
4214 |
checkMethodParse( |
4909 |
checkMethodParse( |
4215 |
str.toCharArray(), |
4910 |
str.toCharArray(), |
Lines 4222-4228
Link Here
|
4222 |
"full ast"); |
4917 |
"full ast"); |
4223 |
} |
4918 |
} |
4224 |
|
4919 |
|
4225 |
public void test0079(){ |
4920 |
public void test0079_Diet(){ |
4226 |
String str = |
4921 |
String str = |
4227 |
"package p;\n" + |
4922 |
"package p;\n" + |
4228 |
"public class X {\n" + |
4923 |
"public class X {\n" + |
Lines 4255-4275
Link Here
|
4255 |
completionIdentifier, |
4950 |
completionIdentifier, |
4256 |
expectedReplacedSource, |
4951 |
expectedReplacedSource, |
4257 |
"diet ast"); |
4952 |
"diet ast"); |
4258 |
|
4953 |
} |
4259 |
expectedCompletionNodeToString = "<CompleteOnName:zzz>"; |
4954 |
public void test0079_Method(){ |
4260 |
expectedParentNodeToString = "<NONE>"; |
4955 |
String str = |
4261 |
completionIdentifier = "zzz"; |
4956 |
"package p;\n" + |
4262 |
expectedReplacedSource = "zzz"; |
4957 |
"public class X {\n" + |
4263 |
expectedUnitDisplayString = |
4958 |
" int o = new int[]{zzz;\n" + |
4264 |
"package p;\n" + |
|
|
4265 |
"public class X {\n" + |
4266 |
" int o;\n" + |
4267 |
" {\n" + |
4268 |
" <CompleteOnName:zzz>;\n" + |
4269 |
" }\n" + |
4270 |
" public X() {\n" + |
4271 |
" }\n" + |
4272 |
"}\n"; |
4959 |
"}\n"; |
|
|
4960 |
|
4961 |
String completeBehind = "zzz"; |
4962 |
int cursorLocation = str.indexOf("zzz") + completeBehind.length() - 1; |
4963 |
|
4964 |
String expectedCompletionNodeToString = "<CompleteOnName:zzz>"; |
4965 |
String expectedParentNodeToString = "<NONE>"; |
4966 |
String completionIdentifier = "zzz"; |
4967 |
String expectedReplacedSource = "zzz"; |
4968 |
String expectedUnitDisplayString = |
4969 |
"package p;\n" + |
4970 |
"public class X {\n" + |
4971 |
" int o;\n" + |
4972 |
" {\n" + |
4973 |
" <CompleteOnName:zzz>;\n" + |
4974 |
" }\n" + |
4975 |
" public X() {\n" + |
4976 |
" }\n" + |
4977 |
"}\n"; |
4273 |
|
4978 |
|
4274 |
checkMethodParse( |
4979 |
checkMethodParse( |
4275 |
str.toCharArray(), |
4980 |
str.toCharArray(), |
Lines 4283-4289
Link Here
|
4283 |
} |
4988 |
} |
4284 |
|
4989 |
|
4285 |
|
4990 |
|
4286 |
public void test0080(){ |
4991 |
public void test0080_Diet(){ |
4287 |
String str = |
4992 |
String str = |
4288 |
"package p;\n" + |
4993 |
"package p;\n" + |
4289 |
"public class X {\n" + |
4994 |
"public class X {\n" + |
Lines 4317-4336
Link Here
|
4317 |
completionIdentifier, |
5022 |
completionIdentifier, |
4318 |
expectedReplacedSource, |
5023 |
expectedReplacedSource, |
4319 |
"diet ast"); |
5024 |
"diet ast"); |
4320 |
|
5025 |
} |
4321 |
expectedCompletionNodeToString = "<CompleteOnName:zzz>"; |
5026 |
public void test0080_Method(){ |
4322 |
expectedParentNodeToString = "new int[]{<CompleteOnName:zzz>}"; |
5027 |
String str = |
4323 |
completionIdentifier = "zzz"; |
5028 |
"package p;\n" + |
4324 |
expectedReplacedSource = "zzz"; |
5029 |
"public class X {\n" + |
4325 |
expectedUnitDisplayString = |
5030 |
" {\n" + |
4326 |
"package p;\n" + |
5031 |
" int o = new int[]{zzz;\n" + |
4327 |
"public class X {\n" + |
|
|
4328 |
" {\n" + |
4329 |
" int o = new int[]{<CompleteOnName:zzz>};\n" + |
4330 |
" }\n" + |
4331 |
" public X() {\n" + |
4332 |
" }\n" + |
5032 |
" }\n" + |
4333 |
"}\n"; |
5033 |
"}\n"; |
|
|
5034 |
|
5035 |
String completeBehind = "zzz"; |
5036 |
int cursorLocation = str.indexOf("zzz") + completeBehind.length() - 1; |
5037 |
|
5038 |
String expectedCompletionNodeToString = "<CompleteOnName:zzz>"; |
5039 |
String expectedParentNodeToString = "new int[]{<CompleteOnName:zzz>}"; |
5040 |
String completionIdentifier = "zzz"; |
5041 |
String expectedReplacedSource = "zzz"; |
5042 |
String expectedUnitDisplayString = |
5043 |
"package p;\n" + |
5044 |
"public class X {\n" + |
5045 |
" {\n" + |
5046 |
" int o = new int[]{<CompleteOnName:zzz>};\n" + |
5047 |
" }\n" + |
5048 |
" public X() {\n" + |
5049 |
" }\n" + |
5050 |
"}\n"; |
4334 |
|
5051 |
|
4335 |
checkMethodParse( |
5052 |
checkMethodParse( |
4336 |
str.toCharArray(), |
5053 |
str.toCharArray(), |
Lines 4344-4350
Link Here
|
4344 |
} |
5061 |
} |
4345 |
|
5062 |
|
4346 |
|
5063 |
|
4347 |
public void test0081(){ |
5064 |
public void test0081_Diet(){ |
4348 |
String str = |
5065 |
String str = |
4349 |
"package p;\n" + |
5066 |
"package p;\n" + |
4350 |
"public class X {\n" + |
5067 |
"public class X {\n" + |
Lines 4380-4400
Link Here
|
4380 |
expectedUnitDisplayString, |
5097 |
expectedUnitDisplayString, |
4381 |
completionIdentifier, |
5098 |
completionIdentifier, |
4382 |
expectedReplacedSource, |
5099 |
expectedReplacedSource, |
4383 |
"diet ast"); |
5100 |
"diet ast"); |
4384 |
|
5101 |
} |
4385 |
expectedCompletionNodeToString = "<CompleteOnName:zzz>"; |
5102 |
public void test0081_Method(){ |
4386 |
expectedParentNodeToString = "new int[]{<CompleteOnName:zzz>}"; |
5103 |
String str = |
4387 |
completionIdentifier = "zzz"; |
5104 |
"package p;\n" + |
4388 |
expectedReplacedSource = "zzz"; |
5105 |
"public class X {\n" + |
4389 |
expectedUnitDisplayString = |
5106 |
" void foo(){\n" + |
4390 |
"package p;\n" + |
5107 |
" int o = new int[]{zzz;\n" + |
4391 |
"public class X {\n" + |
|
|
4392 |
" public X() {\n" + |
4393 |
" }\n" + |
4394 |
" void foo() {\n" + |
4395 |
" int o = new int[]{<CompleteOnName:zzz>};\n" + |
4396 |
" }\n" + |
5108 |
" }\n" + |
4397 |
"}\n"; |
5109 |
"}\n"; |
|
|
5110 |
|
5111 |
String completeBehind = "zzz"; |
5112 |
int cursorLocation = str.indexOf("zzz") + completeBehind.length() - 1; |
5113 |
|
5114 |
String expectedCompletionNodeToString = "<CompleteOnName:zzz>"; |
5115 |
String expectedParentNodeToString = "new int[]{<CompleteOnName:zzz>}"; |
5116 |
String completionIdentifier = "zzz"; |
5117 |
String expectedReplacedSource = "zzz"; |
5118 |
String expectedUnitDisplayString = |
5119 |
"package p;\n" + |
5120 |
"public class X {\n" + |
5121 |
" public X() {\n" + |
5122 |
" }\n" + |
5123 |
" void foo() {\n" + |
5124 |
" int o = new int[]{<CompleteOnName:zzz>};\n" + |
5125 |
" }\n" + |
5126 |
"}\n"; |
4398 |
|
5127 |
|
4399 |
checkMethodParse( |
5128 |
checkMethodParse( |
4400 |
str.toCharArray(), |
5129 |
str.toCharArray(), |
Lines 4408-4414
Link Here
|
4408 |
} |
5137 |
} |
4409 |
|
5138 |
|
4410 |
|
5139 |
|
4411 |
public void test0082(){ |
5140 |
public void test0082_Diet(){ |
4412 |
String str = |
5141 |
String str = |
4413 |
"package p;\n" + |
5142 |
"package p;\n" + |
4414 |
"public class X {\n" + |
5143 |
"public class X {\n" + |
Lines 4442-4462
Link Here
|
4442 |
completionIdentifier, |
5171 |
completionIdentifier, |
4443 |
expectedReplacedSource, |
5172 |
expectedReplacedSource, |
4444 |
"diet ast"); |
5173 |
"diet ast"); |
4445 |
|
5174 |
} |
4446 |
expectedCompletionNodeToString = "<CompleteOnName:zzz>"; |
5175 |
public void test0082_Method(){ |
4447 |
expectedParentNodeToString = "<NONE>"; |
5176 |
String str = |
4448 |
completionIdentifier = "zzz"; |
5177 |
"package p;\n" + |
4449 |
expectedReplacedSource = "zzz"; |
5178 |
"public class X {\n" + |
4450 |
expectedUnitDisplayString = |
5179 |
" #\n" + |
4451 |
"package p;\n" + |
5180 |
" int o = new int[]{zzz;\n" + |
4452 |
"public class X {\n" + |
|
|
4453 |
" int o;\n" + |
4454 |
" {\n" + |
4455 |
" <CompleteOnName:zzz>;\n" + |
4456 |
" }\n" + |
4457 |
" public X() {\n" + |
4458 |
" }\n" + |
4459 |
"}\n"; |
5181 |
"}\n"; |
|
|
5182 |
|
5183 |
String completeBehind = "zzz"; |
5184 |
int cursorLocation = str.indexOf("zzz") + completeBehind.length() - 1; |
5185 |
|
5186 |
String expectedCompletionNodeToString = "<CompleteOnName:zzz>"; |
5187 |
String expectedParentNodeToString = "<NONE>"; |
5188 |
String completionIdentifier = "zzz"; |
5189 |
String expectedReplacedSource = "zzz"; |
5190 |
String expectedUnitDisplayString = |
5191 |
"package p;\n" + |
5192 |
"public class X {\n" + |
5193 |
" int o;\n" + |
5194 |
" {\n" + |
5195 |
" <CompleteOnName:zzz>;\n" + |
5196 |
" }\n" + |
5197 |
" public X() {\n" + |
5198 |
" }\n" + |
5199 |
"}\n"; |
4460 |
|
5200 |
|
4461 |
checkMethodParse( |
5201 |
checkMethodParse( |
4462 |
str.toCharArray(), |
5202 |
str.toCharArray(), |
Lines 4470-4476
Link Here
|
4470 |
} |
5210 |
} |
4471 |
|
5211 |
|
4472 |
|
5212 |
|
4473 |
public void test0083(){ |
5213 |
public void test0083_Diet(){ |
4474 |
String str = |
5214 |
String str = |
4475 |
"package p;\n" + |
5215 |
"package p;\n" + |
4476 |
"public class X {\n" + |
5216 |
"public class X {\n" + |
Lines 4505-4529
Link Here
|
4505 |
completionIdentifier, |
5245 |
completionIdentifier, |
4506 |
expectedReplacedSource, |
5246 |
expectedReplacedSource, |
4507 |
"diet ast"); |
5247 |
"diet ast"); |
4508 |
|
5248 |
} |
4509 |
expectedCompletionNodeToString = "<CompleteOnName:zzz>"; |
5249 |
public void test0083_Method(){ |
4510 |
expectedParentNodeToString = "<NONE>"; |
5250 |
String str = |
4511 |
completionIdentifier = "zzz"; |
5251 |
"package p;\n" + |
4512 |
expectedReplacedSource = "zzz"; |
5252 |
"public class X {\n" + |
4513 |
expectedUnitDisplayString = |
|
|
4514 |
"package p;\n" + |
4515 |
"public class X {\n" + |
4516 |
" {\n" + |
5253 |
" {\n" + |
4517 |
" {\n" + |
5254 |
" #\n" + |
4518 |
" int o;\n" + |
5255 |
" int o = new int[]{zzz;\n" + |
4519 |
" {\n" + |
|
|
4520 |
" <CompleteOnName:zzz>;\n" + |
4521 |
" }\n" + |
4522 |
" }\n" + |
4523 |
" }\n" + |
4524 |
" public X() {\n" + |
4525 |
" }\n" + |
5256 |
" }\n" + |
4526 |
"}\n"; |
5257 |
"}\n"; |
|
|
5258 |
|
5259 |
String completeBehind = "zzz"; |
5260 |
int cursorLocation = str.indexOf("zzz") + completeBehind.length() - 1; |
5261 |
|
5262 |
String expectedCompletionNodeToString = "<CompleteOnName:zzz>"; |
5263 |
String expectedParentNodeToString = "<NONE>"; |
5264 |
String completionIdentifier = "zzz"; |
5265 |
String expectedReplacedSource = "zzz"; |
5266 |
String expectedUnitDisplayString = |
5267 |
"package p;\n" + |
5268 |
"public class X {\n" + |
5269 |
" {\n" + |
5270 |
" {\n" + |
5271 |
" int o;\n" + |
5272 |
" {\n" + |
5273 |
" <CompleteOnName:zzz>;\n" + |
5274 |
" }\n" + |
5275 |
" }\n" + |
5276 |
" }\n" + |
5277 |
" public X() {\n" + |
5278 |
" }\n" + |
5279 |
"}\n"; |
4527 |
|
5280 |
|
4528 |
checkMethodParse( |
5281 |
checkMethodParse( |
4529 |
str.toCharArray(), |
5282 |
str.toCharArray(), |
Lines 4535-4541
Link Here
|
4535 |
expectedReplacedSource, |
5288 |
expectedReplacedSource, |
4536 |
"full ast"); |
5289 |
"full ast"); |
4537 |
} |
5290 |
} |
4538 |
public void test0084(){ |
5291 |
public void test0084_Diet(){ |
4539 |
|
5292 |
|
4540 |
|
5293 |
|
4541 |
String str = |
5294 |
String str = |
Lines 4575-4597
Link Here
|
4575 |
completionIdentifier, |
5328 |
completionIdentifier, |
4576 |
expectedReplacedSource, |
5329 |
expectedReplacedSource, |
4577 |
"diet ast"); |
5330 |
"diet ast"); |
4578 |
|
5331 |
} |
4579 |
expectedCompletionNodeToString = "<CompleteOnName:zzz>"; |
5332 |
public void test0084_Method(){ |
4580 |
expectedParentNodeToString = "<NONE>"; |
5333 |
|
4581 |
completionIdentifier = "zzz"; |
5334 |
|
4582 |
expectedReplacedSource = "zzz"; |
5335 |
String str = |
4583 |
expectedUnitDisplayString = |
5336 |
"package p;\n" + |
4584 |
"package p;\n" + |
5337 |
"public class X {\n" + |
4585 |
"public class X {\n" + |
5338 |
" void foo(){\n" + |
4586 |
" public X() {\n" + |
5339 |
" #\n" + |
4587 |
" }\n" + |
5340 |
" int o = new int[]{zzz;\n" + |
4588 |
" void foo() {\n" + |
|
|
4589 |
" int o;\n" + |
4590 |
" {\n" + |
4591 |
" <CompleteOnName:zzz>;\n" + |
4592 |
" }\n" + |
4593 |
" }\n" + |
5341 |
" }\n" + |
4594 |
"}\n"; |
5342 |
"}\n"; |
|
|
5343 |
|
5344 |
String completeBehind = "zzz"; |
5345 |
int cursorLocation = str.indexOf("zzz") + completeBehind.length() - 1; |
5346 |
|
5347 |
String expectedCompletionNodeToString = "<CompleteOnName:zzz>"; |
5348 |
String expectedParentNodeToString = "<NONE>"; |
5349 |
String completionIdentifier = "zzz"; |
5350 |
String expectedReplacedSource = "zzz"; |
5351 |
String expectedUnitDisplayString = |
5352 |
"package p;\n" + |
5353 |
"public class X {\n" + |
5354 |
" public X() {\n" + |
5355 |
" }\n" + |
5356 |
" void foo() {\n" + |
5357 |
" int o;\n" + |
5358 |
" {\n" + |
5359 |
" <CompleteOnName:zzz>;\n" + |
5360 |
" }\n" + |
5361 |
" }\n" + |
5362 |
"}\n"; |
4595 |
|
5363 |
|
4596 |
checkMethodParse( |
5364 |
checkMethodParse( |
4597 |
str.toCharArray(), |
5365 |
str.toCharArray(), |
Lines 4603-4609
Link Here
|
4603 |
expectedReplacedSource, |
5371 |
expectedReplacedSource, |
4604 |
"full ast"); |
5372 |
"full ast"); |
4605 |
} |
5373 |
} |
4606 |
public void test0085(){ |
5374 |
public void test0085_Diet(){ |
4607 |
String str = |
5375 |
String str = |
4608 |
"package p;\n" + |
5376 |
"package p;\n" + |
4609 |
"public class X {\n" + |
5377 |
"public class X {\n" + |
Lines 4636-4656
Link Here
|
4636 |
completionIdentifier, |
5404 |
completionIdentifier, |
4637 |
expectedReplacedSource, |
5405 |
expectedReplacedSource, |
4638 |
"diet ast"); |
5406 |
"diet ast"); |
4639 |
|
5407 |
} |
4640 |
expectedCompletionNodeToString = "<CompleteOnName:zzz>"; |
5408 |
public void test0085_Method(){ |
4641 |
expectedParentNodeToString = "<NONE>"; |
5409 |
String str = |
4642 |
completionIdentifier = "zzz"; |
5410 |
"package p;\n" + |
4643 |
expectedReplacedSource = "zzz"; |
5411 |
"public class X {\n" + |
4644 |
expectedUnitDisplayString = |
5412 |
" X o = new X[]{zzz;\n" + |
4645 |
"package p;\n" + |
|
|
4646 |
"public class X {\n" + |
4647 |
" X o;\n" + |
4648 |
" {\n" + |
4649 |
" <CompleteOnName:zzz>;\n" + |
4650 |
" }\n" + |
4651 |
" public X() {\n" + |
4652 |
" }\n" + |
4653 |
"}\n"; |
5413 |
"}\n"; |
|
|
5414 |
|
5415 |
String completeBehind = "zzz"; |
5416 |
int cursorLocation = str.indexOf("zzz") + completeBehind.length() - 1; |
5417 |
|
5418 |
String expectedCompletionNodeToString = "<CompleteOnName:zzz>"; |
5419 |
String expectedParentNodeToString = "<NONE>"; |
5420 |
String completionIdentifier = "zzz"; |
5421 |
String expectedReplacedSource = "zzz"; |
5422 |
String expectedUnitDisplayString = |
5423 |
"package p;\n" + |
5424 |
"public class X {\n" + |
5425 |
" X o;\n" + |
5426 |
" {\n" + |
5427 |
" <CompleteOnName:zzz>;\n" + |
5428 |
" }\n" + |
5429 |
" public X() {\n" + |
5430 |
" }\n" + |
5431 |
"}\n"; |
4654 |
|
5432 |
|
4655 |
checkMethodParse( |
5433 |
checkMethodParse( |
4656 |
str.toCharArray(), |
5434 |
str.toCharArray(), |
Lines 4664-4670
Link Here
|
4664 |
} |
5442 |
} |
4665 |
|
5443 |
|
4666 |
|
5444 |
|
4667 |
public void test0086(){ |
5445 |
public void test0086_Diet(){ |
4668 |
String str = |
5446 |
String str = |
4669 |
"package p;\n" + |
5447 |
"package p;\n" + |
4670 |
"public class X {\n" + |
5448 |
"public class X {\n" + |
Lines 4698-4717
Link Here
|
4698 |
completionIdentifier, |
5476 |
completionIdentifier, |
4699 |
expectedReplacedSource, |
5477 |
expectedReplacedSource, |
4700 |
"diet ast"); |
5478 |
"diet ast"); |
4701 |
|
5479 |
} |
4702 |
expectedCompletionNodeToString = "<CompleteOnName:zzz>"; |
5480 |
public void test0086_Method(){ |
4703 |
expectedParentNodeToString = "new X[]{<CompleteOnName:zzz>}"; |
5481 |
String str = |
4704 |
completionIdentifier = "zzz"; |
5482 |
"package p;\n" + |
4705 |
expectedReplacedSource = "zzz"; |
5483 |
"public class X {\n" + |
4706 |
expectedUnitDisplayString = |
|
|
4707 |
"package p;\n" + |
4708 |
"public class X {\n" + |
4709 |
" {\n" + |
5484 |
" {\n" + |
4710 |
" X o = new X[]{<CompleteOnName:zzz>};\n" + |
5485 |
" X o = new X[]{zzz;\n" + |
4711 |
" }\n" + |
|
|
4712 |
" public X() {\n" + |
4713 |
" }\n" + |
5486 |
" }\n" + |
4714 |
"}\n"; |
5487 |
"}\n"; |
|
|
5488 |
|
5489 |
String completeBehind = "zzz"; |
5490 |
int cursorLocation = str.indexOf("zzz") + completeBehind.length() - 1; |
5491 |
|
5492 |
String expectedCompletionNodeToString = "<CompleteOnName:zzz>"; |
5493 |
String expectedParentNodeToString = "new X[]{<CompleteOnName:zzz>}"; |
5494 |
String completionIdentifier = "zzz"; |
5495 |
String expectedReplacedSource = "zzz"; |
5496 |
String expectedUnitDisplayString = |
5497 |
"package p;\n" + |
5498 |
"public class X {\n" + |
5499 |
" {\n" + |
5500 |
" X o = new X[]{<CompleteOnName:zzz>};\n" + |
5501 |
" }\n" + |
5502 |
" public X() {\n" + |
5503 |
" }\n" + |
5504 |
"}\n"; |
4715 |
|
5505 |
|
4716 |
checkMethodParse( |
5506 |
checkMethodParse( |
4717 |
str.toCharArray(), |
5507 |
str.toCharArray(), |
Lines 4724-4730
Link Here
|
4724 |
"full ast"); |
5514 |
"full ast"); |
4725 |
} |
5515 |
} |
4726 |
|
5516 |
|
4727 |
public void test0087(){ |
5517 |
public void test0087_Diet(){ |
4728 |
String str = |
5518 |
String str = |
4729 |
"package p;\n" + |
5519 |
"package p;\n" + |
4730 |
"public class X {\n" + |
5520 |
"public class X {\n" + |
Lines 4760-4780
Link Here
|
4760 |
expectedUnitDisplayString, |
5550 |
expectedUnitDisplayString, |
4761 |
completionIdentifier, |
5551 |
completionIdentifier, |
4762 |
expectedReplacedSource, |
5552 |
expectedReplacedSource, |
4763 |
"diet ast"); |
5553 |
"diet ast"); |
4764 |
|
5554 |
} |
4765 |
expectedCompletionNodeToString = "<CompleteOnName:zzz>"; |
5555 |
public void test0087_Method(){ |
4766 |
expectedParentNodeToString = "new X[]{<CompleteOnName:zzz>}"; |
5556 |
String str = |
4767 |
completionIdentifier = "zzz"; |
5557 |
"package p;\n" + |
4768 |
expectedReplacedSource = "zzz"; |
5558 |
"public class X {\n" + |
4769 |
expectedUnitDisplayString = |
5559 |
" void foo(){\n" + |
4770 |
"package p;\n" + |
5560 |
" X o = new X[]{zzz;\n" + |
4771 |
"public class X {\n" + |
|
|
4772 |
" public X() {\n" + |
4773 |
" }\n" + |
4774 |
" void foo() {\n" + |
4775 |
" X o = new X[]{<CompleteOnName:zzz>};\n" + |
4776 |
" }\n" + |
5561 |
" }\n" + |
4777 |
"}\n"; |
5562 |
"}\n"; |
|
|
5563 |
|
5564 |
String completeBehind = "zzz"; |
5565 |
int cursorLocation = str.indexOf("zzz") + completeBehind.length() - 1; |
5566 |
|
5567 |
String expectedCompletionNodeToString = "<CompleteOnName:zzz>"; |
5568 |
String expectedParentNodeToString = "new X[]{<CompleteOnName:zzz>}"; |
5569 |
String completionIdentifier = "zzz"; |
5570 |
String expectedReplacedSource = "zzz"; |
5571 |
String expectedUnitDisplayString = |
5572 |
"package p;\n" + |
5573 |
"public class X {\n" + |
5574 |
" public X() {\n" + |
5575 |
" }\n" + |
5576 |
" void foo() {\n" + |
5577 |
" X o = new X[]{<CompleteOnName:zzz>};\n" + |
5578 |
" }\n" + |
5579 |
"}\n"; |
4778 |
|
5580 |
|
4779 |
checkMethodParse( |
5581 |
checkMethodParse( |
4780 |
str.toCharArray(), |
5582 |
str.toCharArray(), |
Lines 4788-4794
Link Here
|
4788 |
} |
5590 |
} |
4789 |
|
5591 |
|
4790 |
|
5592 |
|
4791 |
public void test0088(){ |
5593 |
public void test0088_Diet(){ |
4792 |
String str = |
5594 |
String str = |
4793 |
"package p;\n" + |
5595 |
"package p;\n" + |
4794 |
"public class X {\n" + |
5596 |
"public class X {\n" + |
Lines 4822-4842
Link Here
|
4822 |
completionIdentifier, |
5624 |
completionIdentifier, |
4823 |
expectedReplacedSource, |
5625 |
expectedReplacedSource, |
4824 |
"diet ast"); |
5626 |
"diet ast"); |
4825 |
|
5627 |
} |
4826 |
expectedCompletionNodeToString = "<CompleteOnName:zzz>"; |
5628 |
public void test0088_Method(){ |
4827 |
expectedParentNodeToString = "<NONE>"; |
5629 |
String str = |
4828 |
completionIdentifier = "zzz"; |
5630 |
"package p;\n" + |
4829 |
expectedReplacedSource = "zzz"; |
5631 |
"public class X {\n" + |
4830 |
expectedUnitDisplayString = |
5632 |
" #\n" + |
4831 |
"package p;\n" + |
5633 |
" X o = new X[]{zzz;\n" + |
4832 |
"public class X {\n" + |
|
|
4833 |
" X o;\n" + |
4834 |
" {\n" + |
4835 |
" <CompleteOnName:zzz>;\n" + |
4836 |
" }\n" + |
4837 |
" public X() {\n" + |
4838 |
" }\n" + |
4839 |
"}\n"; |
5634 |
"}\n"; |
|
|
5635 |
|
5636 |
String completeBehind = "zzz"; |
5637 |
int cursorLocation = str.indexOf("zzz") + completeBehind.length() - 1; |
5638 |
|
5639 |
String expectedCompletionNodeToString = "<CompleteOnName:zzz>"; |
5640 |
String expectedParentNodeToString = "<NONE>"; |
5641 |
String completionIdentifier = "zzz"; |
5642 |
String expectedReplacedSource = "zzz"; |
5643 |
String expectedUnitDisplayString = |
5644 |
"package p;\n" + |
5645 |
"public class X {\n" + |
5646 |
" X o;\n" + |
5647 |
" {\n" + |
5648 |
" <CompleteOnName:zzz>;\n" + |
5649 |
" }\n" + |
5650 |
" public X() {\n" + |
5651 |
" }\n" + |
5652 |
"}\n"; |
4840 |
|
5653 |
|
4841 |
checkMethodParse( |
5654 |
checkMethodParse( |
4842 |
str.toCharArray(), |
5655 |
str.toCharArray(), |
Lines 4850-4856
Link Here
|
4850 |
} |
5663 |
} |
4851 |
|
5664 |
|
4852 |
|
5665 |
|
4853 |
public void test0089(){ |
5666 |
public void test0089_Diet(){ |
4854 |
String str = |
5667 |
String str = |
4855 |
"package p;\n" + |
5668 |
"package p;\n" + |
4856 |
"public class X {\n" + |
5669 |
"public class X {\n" + |
Lines 4885-4909
Link Here
|
4885 |
completionIdentifier, |
5698 |
completionIdentifier, |
4886 |
expectedReplacedSource, |
5699 |
expectedReplacedSource, |
4887 |
"diet ast"); |
5700 |
"diet ast"); |
4888 |
|
5701 |
} |
4889 |
expectedCompletionNodeToString = "<CompleteOnName:zzz>"; |
5702 |
public void test0089_Method(){ |
4890 |
expectedParentNodeToString = "<NONE>"; |
5703 |
String str = |
4891 |
completionIdentifier = "zzz"; |
5704 |
"package p;\n" + |
4892 |
expectedReplacedSource = "zzz"; |
5705 |
"public class X {\n" + |
4893 |
expectedUnitDisplayString = |
|
|
4894 |
"package p;\n" + |
4895 |
"public class X {\n" + |
4896 |
" {\n" + |
5706 |
" {\n" + |
4897 |
" {\n" + |
5707 |
" #\n" + |
4898 |
" X o;\n" + |
5708 |
" X o = new X[]{zzz;\n" + |
4899 |
" {\n" + |
|
|
4900 |
" <CompleteOnName:zzz>;\n" + |
4901 |
" }\n" + |
4902 |
" }\n" + |
4903 |
" }\n" + |
4904 |
" public X() {\n" + |
4905 |
" }\n" + |
5709 |
" }\n" + |
4906 |
"}\n"; |
5710 |
"}\n"; |
|
|
5711 |
|
5712 |
String completeBehind = "zzz"; |
5713 |
int cursorLocation = str.indexOf("zzz") + completeBehind.length() - 1; |
5714 |
|
5715 |
String expectedCompletionNodeToString = "<CompleteOnName:zzz>"; |
5716 |
String expectedParentNodeToString = "<NONE>"; |
5717 |
String completionIdentifier = "zzz"; |
5718 |
String expectedReplacedSource = "zzz"; |
5719 |
String expectedUnitDisplayString = |
5720 |
"package p;\n" + |
5721 |
"public class X {\n" + |
5722 |
" {\n" + |
5723 |
" {\n" + |
5724 |
" X o;\n" + |
5725 |
" {\n" + |
5726 |
" <CompleteOnName:zzz>;\n" + |
5727 |
" }\n" + |
5728 |
" }\n" + |
5729 |
" }\n" + |
5730 |
" public X() {\n" + |
5731 |
" }\n" + |
5732 |
"}\n"; |
4907 |
|
5733 |
|
4908 |
checkMethodParse( |
5734 |
checkMethodParse( |
4909 |
str.toCharArray(), |
5735 |
str.toCharArray(), |
Lines 4917-4923
Link Here
|
4917 |
} |
5743 |
} |
4918 |
|
5744 |
|
4919 |
|
5745 |
|
4920 |
public void test0090(){ |
5746 |
public void test0090_Diet(){ |
4921 |
String str = |
5747 |
String str = |
4922 |
"package p;\n" + |
5748 |
"package p;\n" + |
4923 |
"public class X {\n" + |
5749 |
"public class X {\n" + |
Lines 4955-4977
Link Here
|
4955 |
completionIdentifier, |
5781 |
completionIdentifier, |
4956 |
expectedReplacedSource, |
5782 |
expectedReplacedSource, |
4957 |
"diet ast"); |
5783 |
"diet ast"); |
4958 |
|
5784 |
} |
4959 |
expectedCompletionNodeToString = "<CompleteOnName:zzz>"; |
5785 |
public void test0090_Method(){ |
4960 |
expectedParentNodeToString = "<NONE>"; |
5786 |
String str = |
4961 |
completionIdentifier = "zzz"; |
5787 |
"package p;\n" + |
4962 |
expectedReplacedSource = "zzz"; |
5788 |
"public class X {\n" + |
4963 |
expectedUnitDisplayString = |
5789 |
" void foo(){\n" + |
4964 |
"package p;\n" + |
5790 |
" #\n" + |
4965 |
"public class X {\n" + |
5791 |
" X o = new X[]{zzz;\n" + |
4966 |
" public X() {\n" + |
|
|
4967 |
" }\n" + |
4968 |
" void foo() {\n" + |
4969 |
" X o;\n" + |
4970 |
" {\n" + |
4971 |
" <CompleteOnName:zzz>;\n" + |
4972 |
" }\n" + |
4973 |
" }\n" + |
5792 |
" }\n" + |
4974 |
"}\n"; |
5793 |
"}\n"; |
|
|
5794 |
|
5795 |
String completeBehind = "zzz"; |
5796 |
int cursorLocation = str.indexOf("zzz") + completeBehind.length() - 1; |
5797 |
|
5798 |
String expectedCompletionNodeToString = "<CompleteOnName:zzz>"; |
5799 |
String expectedParentNodeToString = "<NONE>"; |
5800 |
String completionIdentifier = "zzz"; |
5801 |
String expectedReplacedSource = "zzz"; |
5802 |
String expectedUnitDisplayString = |
5803 |
"package p;\n" + |
5804 |
"public class X {\n" + |
5805 |
" public X() {\n" + |
5806 |
" }\n" + |
5807 |
" void foo() {\n" + |
5808 |
" X o;\n" + |
5809 |
" {\n" + |
5810 |
" <CompleteOnName:zzz>;\n" + |
5811 |
" }\n" + |
5812 |
" }\n" + |
5813 |
"}\n"; |
4975 |
|
5814 |
|
4976 |
checkMethodParse( |
5815 |
checkMethodParse( |
4977 |
str.toCharArray(), |
5816 |
str.toCharArray(), |
Lines 5019-5025
Link Here
|
5019 |
} |
5858 |
} |
5020 |
|
5859 |
|
5021 |
|
5860 |
|
5022 |
public void test0092(){ |
5861 |
public void test0092_Diet(){ |
5023 |
String str = |
5862 |
String str = |
5024 |
"package p;\n" + |
5863 |
"package p;\n" + |
5025 |
"public class X {\n" + |
5864 |
"public class X {\n" + |
Lines 5053-5074
Link Here
|
5053 |
expectedUnitDisplayString, |
5892 |
expectedUnitDisplayString, |
5054 |
completionIdentifier, |
5893 |
completionIdentifier, |
5055 |
expectedReplacedSource, |
5894 |
expectedReplacedSource, |
5056 |
"diet ast"); |
5895 |
"diet ast"); |
5057 |
|
5896 |
} |
5058 |
expectedCompletionNodeToString = "<CompleteOnName:zzz>"; |
5897 |
public void test0092_Method(){ |
5059 |
expectedParentNodeToString = "<NONE>"; |
5898 |
String str = |
5060 |
completionIdentifier = "zzz"; |
5899 |
"package p;\n" + |
5061 |
expectedReplacedSource = "zzz"; |
5900 |
"public class X {\n" + |
5062 |
expectedUnitDisplayString = |
|
|
5063 |
"package p;\n" + |
5064 |
"public class X {\n" + |
5065 |
" {\n" + |
5901 |
" {\n" + |
5066 |
" Object o;\n" + |
5902 |
" Object o = \"yyy;\n" + |
5067 |
" <CompleteOnName:zzz>;\n" + |
5903 |
" zzz\n" + |
5068 |
" }\n" + |
|
|
5069 |
" public X() {\n" + |
5070 |
" }\n" + |
5904 |
" }\n" + |
5071 |
"}\n"; |
5905 |
"}\n"; |
|
|
5906 |
|
5907 |
String completeBehind = "zzz"; |
5908 |
int cursorLocation = str.indexOf("zzz") + completeBehind.length() - 1; |
5909 |
|
5910 |
String expectedCompletionNodeToString = "<CompleteOnName:zzz>"; |
5911 |
String expectedParentNodeToString = "<NONE>"; |
5912 |
String completionIdentifier = "zzz"; |
5913 |
String expectedReplacedSource = "zzz"; |
5914 |
String expectedUnitDisplayString = |
5915 |
"package p;\n" + |
5916 |
"public class X {\n" + |
5917 |
" {\n" + |
5918 |
" Object o;\n" + |
5919 |
" <CompleteOnName:zzz>;\n" + |
5920 |
" }\n" + |
5921 |
" public X() {\n" + |
5922 |
" }\n" + |
5923 |
"}\n"; |
5072 |
|
5924 |
|
5073 |
checkMethodParse( |
5925 |
checkMethodParse( |
5074 |
str.toCharArray(), |
5926 |
str.toCharArray(), |
Lines 5082-5088
Link Here
|
5082 |
} |
5934 |
} |
5083 |
|
5935 |
|
5084 |
|
5936 |
|
5085 |
public void test0093(){ |
5937 |
public void test0093_Diet(){ |
5086 |
String str = |
5938 |
String str = |
5087 |
"package p;\n" + |
5939 |
"package p;\n" + |
5088 |
"public class X {\n" + |
5940 |
"public class X {\n" + |
Lines 5116-5137
Link Here
|
5116 |
expectedUnitDisplayString, |
5968 |
expectedUnitDisplayString, |
5117 |
completionIdentifier, |
5969 |
completionIdentifier, |
5118 |
expectedReplacedSource, |
5970 |
expectedReplacedSource, |
5119 |
"diet ast"); |
5971 |
"diet ast"); |
5120 |
|
5972 |
} |
5121 |
expectedCompletionNodeToString = "<CompleteOnName:zzz>"; |
5973 |
public void test0093_Method(){ |
5122 |
expectedParentNodeToString = "<NONE>"; |
5974 |
String str = |
5123 |
completionIdentifier = "zzz"; |
5975 |
"package p;\n" + |
5124 |
expectedReplacedSource = "zzz"; |
5976 |
"public class X {\n" + |
5125 |
expectedUnitDisplayString = |
5977 |
" void foo(){\n" + |
5126 |
"package p;\n" + |
5978 |
" Object o = \"yyy;\n" + |
5127 |
"public class X {\n" + |
5979 |
" zzz\n" + |
5128 |
" public X() {\n" + |
|
|
5129 |
" }\n" + |
5130 |
" void foo() {\n" + |
5131 |
" Object o;\n" + |
5132 |
" <CompleteOnName:zzz>;\n" + |
5133 |
" }\n" + |
5980 |
" }\n" + |
5134 |
"}\n"; |
5981 |
"}\n"; |
|
|
5982 |
|
5983 |
String completeBehind = "zzz"; |
5984 |
int cursorLocation = str.indexOf("zzz") + completeBehind.length() - 1; |
5985 |
|
5986 |
String expectedCompletionNodeToString = "<CompleteOnName:zzz>"; |
5987 |
String expectedParentNodeToString = "<NONE>"; |
5988 |
String completionIdentifier = "zzz"; |
5989 |
String expectedReplacedSource = "zzz"; |
5990 |
String expectedUnitDisplayString = |
5991 |
"package p;\n" + |
5992 |
"public class X {\n" + |
5993 |
" public X() {\n" + |
5994 |
" }\n" + |
5995 |
" void foo() {\n" + |
5996 |
" Object o;\n" + |
5997 |
" <CompleteOnName:zzz>;\n" + |
5998 |
" }\n" + |
5999 |
"}\n"; |
5135 |
|
6000 |
|
5136 |
checkMethodParse( |
6001 |
checkMethodParse( |
5137 |
str.toCharArray(), |
6002 |
str.toCharArray(), |
Lines 5182-5188
Link Here
|
5182 |
} |
6047 |
} |
5183 |
|
6048 |
|
5184 |
|
6049 |
|
5185 |
public void test0095(){ |
6050 |
public void test0095_Diet(){ |
5186 |
String str = |
6051 |
String str = |
5187 |
"package p;\n" + |
6052 |
"package p;\n" + |
5188 |
"public class X {\n" + |
6053 |
"public class X {\n" + |
Lines 5217-5240
Link Here
|
5217 |
expectedUnitDisplayString, |
6082 |
expectedUnitDisplayString, |
5218 |
completionIdentifier, |
6083 |
completionIdentifier, |
5219 |
expectedReplacedSource, |
6084 |
expectedReplacedSource, |
5220 |
"diet ast"); |
6085 |
"diet ast"); |
5221 |
|
6086 |
} |
5222 |
expectedCompletionNodeToString = "<CompleteOnName:zzz>"; |
6087 |
public void test0095_Method(){ |
5223 |
expectedParentNodeToString = "<NONE>"; |
6088 |
String str = |
5224 |
completionIdentifier = "zzz"; |
6089 |
"package p;\n" + |
5225 |
expectedReplacedSource = "zzz"; |
6090 |
"public class X {\n" + |
5226 |
expectedUnitDisplayString = |
|
|
5227 |
"package p;\n" + |
5228 |
"public class X {\n" + |
5229 |
" {\n" + |
6091 |
" {\n" + |
5230 |
" {\n" + |
6092 |
" #\n" + |
5231 |
" Object o;\n" + |
6093 |
" Object o = \"yyy;\n" + |
5232 |
" <CompleteOnName:zzz>;\n" + |
6094 |
" zzz\n" + |
5233 |
" }\n" + |
|
|
5234 |
" }\n" + |
5235 |
" public X() {\n" + |
5236 |
" }\n" + |
6095 |
" }\n" + |
5237 |
"}\n"; |
6096 |
"}\n"; |
|
|
6097 |
|
6098 |
String completeBehind = "zzz"; |
6099 |
int cursorLocation = str.indexOf("zzz") + completeBehind.length() - 1; |
6100 |
|
6101 |
String expectedCompletionNodeToString = "<CompleteOnName:zzz>"; |
6102 |
String expectedParentNodeToString = "<NONE>"; |
6103 |
String completionIdentifier = "zzz"; |
6104 |
String expectedReplacedSource = "zzz"; |
6105 |
String expectedUnitDisplayString = |
6106 |
"package p;\n" + |
6107 |
"public class X {\n" + |
6108 |
" {\n" + |
6109 |
" {\n" + |
6110 |
" Object o;\n" + |
6111 |
" <CompleteOnName:zzz>;\n" + |
6112 |
" }\n" + |
6113 |
" }\n" + |
6114 |
" public X() {\n" + |
6115 |
" }\n" + |
6116 |
"}\n"; |
5238 |
|
6117 |
|
5239 |
checkMethodParse( |
6118 |
checkMethodParse( |
5240 |
str.toCharArray(), |
6119 |
str.toCharArray(), |
Lines 5248-5254
Link Here
|
5248 |
} |
6127 |
} |
5249 |
|
6128 |
|
5250 |
|
6129 |
|
5251 |
public void test0096(){ |
6130 |
public void test0096_Diet(){ |
5252 |
String str = |
6131 |
String str = |
5253 |
"package p;\n" + |
6132 |
"package p;\n" + |
5254 |
"public class X {\n" + |
6133 |
"public class X {\n" + |
Lines 5283-5306
Link Here
|
5283 |
expectedUnitDisplayString, |
6162 |
expectedUnitDisplayString, |
5284 |
completionIdentifier, |
6163 |
completionIdentifier, |
5285 |
expectedReplacedSource, |
6164 |
expectedReplacedSource, |
5286 |
"diet ast"); |
6165 |
"diet ast"); |
5287 |
|
6166 |
} |
5288 |
expectedCompletionNodeToString = "<CompleteOnName:zzz>"; |
6167 |
public void test0096_Method(){ |
5289 |
expectedParentNodeToString = "<NONE>"; |
6168 |
String str = |
5290 |
completionIdentifier = "zzz"; |
6169 |
"package p;\n" + |
5291 |
expectedReplacedSource = "zzz"; |
6170 |
"public class X {\n" + |
5292 |
expectedUnitDisplayString = |
|
|
5293 |
"package p;\n" + |
5294 |
"public class X {\n" + |
5295 |
" {\n" + |
6171 |
" {\n" + |
5296 |
" {\n" + |
6172 |
" #\n" + |
5297 |
" Object o;\n" + |
6173 |
" Object o = \"yyy;\n" + |
5298 |
" <CompleteOnName:zzz>;\n" + |
6174 |
" zzz\n" + |
5299 |
" }\n" + |
|
|
5300 |
" }\n" + |
5301 |
" public X() {\n" + |
5302 |
" }\n" + |
6175 |
" }\n" + |
5303 |
"}\n"; |
6176 |
"}\n"; |
|
|
6177 |
|
6178 |
String completeBehind = "zzz"; |
6179 |
int cursorLocation = str.indexOf("zzz") + completeBehind.length() - 1; |
6180 |
|
6181 |
String expectedCompletionNodeToString = "<CompleteOnName:zzz>"; |
6182 |
String expectedParentNodeToString = "<NONE>"; |
6183 |
String completionIdentifier = "zzz"; |
6184 |
String expectedReplacedSource = "zzz"; |
6185 |
String expectedUnitDisplayString = |
6186 |
"package p;\n" + |
6187 |
"public class X {\n" + |
6188 |
" {\n" + |
6189 |
" {\n" + |
6190 |
" Object o;\n" + |
6191 |
" <CompleteOnName:zzz>;\n" + |
6192 |
" }\n" + |
6193 |
" }\n" + |
6194 |
" public X() {\n" + |
6195 |
" }\n" + |
6196 |
"}\n"; |
5304 |
|
6197 |
|
5305 |
checkMethodParse( |
6198 |
checkMethodParse( |
5306 |
str.toCharArray(), |
6199 |
str.toCharArray(), |
Lines 5312-5318
Link Here
|
5312 |
expectedReplacedSource, |
6205 |
expectedReplacedSource, |
5313 |
"full ast"); |
6206 |
"full ast"); |
5314 |
} |
6207 |
} |
5315 |
public void test0097(){ |
6208 |
public void test0097_Diet(){ |
5316 |
String str = |
6209 |
String str = |
5317 |
"package p;\n" + |
6210 |
"package p;\n" + |
5318 |
"public class X {\n" + |
6211 |
"public class X {\n" + |
Lines 5347-5367
Link Here
|
5347 |
completionIdentifier, |
6240 |
completionIdentifier, |
5348 |
expectedReplacedSource, |
6241 |
expectedReplacedSource, |
5349 |
"diet ast"); |
6242 |
"diet ast"); |
5350 |
|
6243 |
} |
5351 |
expectedCompletionNodeToString = "<CompleteOnName:zzz>"; |
6244 |
public void test0097_Method(){ |
5352 |
expectedParentNodeToString = "o = <CompleteOnName:zzz>"; |
6245 |
String str = |
5353 |
completionIdentifier = "zzz"; |
6246 |
"package p;\n" + |
5354 |
expectedReplacedSource = "zzz"; |
6247 |
"public class X {\n" + |
5355 |
expectedUnitDisplayString = |
6248 |
" void foo(){\n" + |
5356 |
"package p;\n" + |
|
|
5357 |
"public class X {\n" + |
5358 |
" public X() {\n" + |
5359 |
" }\n" + |
5360 |
" void foo() {\n" + |
5361 |
" Object o;\n" + |
6249 |
" Object o;\n" + |
5362 |
" o = <CompleteOnName:zzz>;\n" + |
6250 |
" o = zzz;\n" + |
5363 |
" }\n" + |
6251 |
" }\n" + |
5364 |
"}\n"; |
6252 |
"}\n"; |
|
|
6253 |
|
6254 |
String completeBehind = "zzz"; |
6255 |
int cursorLocation = str.indexOf("zzz") + completeBehind.length() - 1; |
6256 |
|
6257 |
String expectedCompletionNodeToString = "<CompleteOnName:zzz>"; |
6258 |
String expectedParentNodeToString = "o = <CompleteOnName:zzz>"; |
6259 |
String completionIdentifier = "zzz"; |
6260 |
String expectedReplacedSource = "zzz"; |
6261 |
String expectedUnitDisplayString = |
6262 |
"package p;\n" + |
6263 |
"public class X {\n" + |
6264 |
" public X() {\n" + |
6265 |
" }\n" + |
6266 |
" void foo() {\n" + |
6267 |
" Object o;\n" + |
6268 |
" o = <CompleteOnName:zzz>;\n" + |
6269 |
" }\n" + |
6270 |
"}\n"; |
5365 |
|
6271 |
|
5366 |
checkMethodParse( |
6272 |
checkMethodParse( |
5367 |
str.toCharArray(), |
6273 |
str.toCharArray(), |
Lines 5374-5380
Link Here
|
5374 |
"full ast"); |
6280 |
"full ast"); |
5375 |
} |
6281 |
} |
5376 |
|
6282 |
|
5377 |
public void test0098(){ |
6283 |
public void test0098_Diet(){ |
5378 |
String str = |
6284 |
String str = |
5379 |
"package p;\n" + |
6285 |
"package p;\n" + |
5380 |
"public class X {\n" + |
6286 |
"public class X {\n" + |
Lines 5409-5429
Link Here
|
5409 |
completionIdentifier, |
6315 |
completionIdentifier, |
5410 |
expectedReplacedSource, |
6316 |
expectedReplacedSource, |
5411 |
"diet ast"); |
6317 |
"diet ast"); |
5412 |
|
6318 |
} |
5413 |
expectedCompletionNodeToString = "<CompleteOnName:zzz>"; |
6319 |
public void test0098_Method(){ |
5414 |
expectedParentNodeToString = "o = <CompleteOnName:zzz>"; |
6320 |
String str = |
5415 |
completionIdentifier = "zzz"; |
6321 |
"package p;\n" + |
5416 |
expectedReplacedSource = "zzz"; |
6322 |
"public class X {\n" + |
5417 |
expectedUnitDisplayString = |
6323 |
" void foo(){\n" + |
5418 |
"package p;\n" + |
|
|
5419 |
"public class X {\n" + |
5420 |
" public X() {\n" + |
5421 |
" }\n" + |
5422 |
" void foo() {\n" + |
5423 |
" Object o;\n" + |
6324 |
" Object o;\n" + |
5424 |
" o = <CompleteOnName:zzz>;\n" + |
6325 |
" o = zzz;\n" + |
5425 |
" }\n" + |
6326 |
" }\n" + |
5426 |
"}\n"; |
6327 |
"}\n"; |
|
|
6328 |
|
6329 |
String completeBehind = "zzz"; |
6330 |
int cursorLocation = str.indexOf("zzz") + completeBehind.length() - 1; |
6331 |
|
6332 |
String expectedCompletionNodeToString = "<CompleteOnName:zzz>"; |
6333 |
String expectedParentNodeToString = "o = <CompleteOnName:zzz>"; |
6334 |
String completionIdentifier = "zzz"; |
6335 |
String expectedReplacedSource = "zzz"; |
6336 |
String expectedUnitDisplayString = |
6337 |
"package p;\n" + |
6338 |
"public class X {\n" + |
6339 |
" public X() {\n" + |
6340 |
" }\n" + |
6341 |
" void foo() {\n" + |
6342 |
" Object o;\n" + |
6343 |
" o = <CompleteOnName:zzz>;\n" + |
6344 |
" }\n" + |
6345 |
"}\n"; |
5427 |
|
6346 |
|
5428 |
checkMethodParse( |
6347 |
checkMethodParse( |
5429 |
str.toCharArray(), |
6348 |
str.toCharArray(), |
Lines 5435-5441
Link Here
|
5435 |
expectedReplacedSource, |
6354 |
expectedReplacedSource, |
5436 |
"full ast"); |
6355 |
"full ast"); |
5437 |
} |
6356 |
} |
5438 |
public void test0099(){ |
6357 |
public void test0099_Diet(){ |
5439 |
String str = |
6358 |
String str = |
5440 |
"package p;\n" + |
6359 |
"package p;\n" + |
5441 |
"public class X {\n" + |
6360 |
"public class X {\n" + |
Lines 5470-5490
Link Here
|
5470 |
completionIdentifier, |
6389 |
completionIdentifier, |
5471 |
expectedReplacedSource, |
6390 |
expectedReplacedSource, |
5472 |
"diet ast"); |
6391 |
"diet ast"); |
5473 |
|
6392 |
} |
5474 |
expectedCompletionNodeToString = "<CompleteOnType:zzz>"; |
6393 |
public void test0099_Method(){ |
5475 |
expectedParentNodeToString = "o = new <CompleteOnType:zzz>()"; |
6394 |
String str = |
5476 |
completionIdentifier = "zzz"; |
6395 |
"package p;\n" + |
5477 |
expectedReplacedSource = "zzz"; |
6396 |
"public class X {\n" + |
5478 |
expectedUnitDisplayString = |
6397 |
" void foo(){\n" + |
5479 |
"package p;\n" + |
|
|
5480 |
"public class X {\n" + |
5481 |
" public X() {\n" + |
5482 |
" }\n" + |
5483 |
" void foo() {\n" + |
5484 |
" Object o;\n" + |
6398 |
" Object o;\n" + |
5485 |
" o = new <CompleteOnType:zzz>();\n" + |
6399 |
" o = new zzz;\n" + |
5486 |
" }\n" + |
6400 |
" }\n" + |
5487 |
"}\n"; |
6401 |
"}\n"; |
|
|
6402 |
|
6403 |
String completeBehind = "zzz"; |
6404 |
int cursorLocation = str.indexOf("zzz") + completeBehind.length() - 1; |
6405 |
|
6406 |
String expectedCompletionNodeToString = "<CompleteOnType:zzz>"; |
6407 |
String expectedParentNodeToString = "o = new <CompleteOnType:zzz>()"; |
6408 |
String completionIdentifier = "zzz"; |
6409 |
String expectedReplacedSource = "zzz"; |
6410 |
String expectedUnitDisplayString = |
6411 |
"package p;\n" + |
6412 |
"public class X {\n" + |
6413 |
" public X() {\n" + |
6414 |
" }\n" + |
6415 |
" void foo() {\n" + |
6416 |
" Object o;\n" + |
6417 |
" o = new <CompleteOnType:zzz>();\n" + |
6418 |
" }\n" + |
6419 |
"}\n"; |
5488 |
|
6420 |
|
5489 |
checkMethodParse( |
6421 |
checkMethodParse( |
5490 |
str.toCharArray(), |
6422 |
str.toCharArray(), |
Lines 5497-5503
Link Here
|
5497 |
"full ast"); |
6429 |
"full ast"); |
5498 |
} |
6430 |
} |
5499 |
|
6431 |
|
5500 |
public void test0100(){ |
6432 |
public void test0100_Diet(){ |
5501 |
String str = |
6433 |
String str = |
5502 |
"package p;\n" + |
6434 |
"package p;\n" + |
5503 |
"public class X {\n" + |
6435 |
"public class X {\n" + |
Lines 5532-5552
Link Here
|
5532 |
completionIdentifier, |
6464 |
completionIdentifier, |
5533 |
expectedReplacedSource, |
6465 |
expectedReplacedSource, |
5534 |
"diet ast"); |
6466 |
"diet ast"); |
5535 |
|
6467 |
} |
5536 |
expectedCompletionNodeToString = "<CompleteOnType:zzz>"; |
6468 |
public void test0100_Method(){ |
5537 |
expectedParentNodeToString = "o = new <CompleteOnType:zzz>()"; |
6469 |
String str = |
5538 |
completionIdentifier = "zzz"; |
6470 |
"package p;\n" + |
5539 |
expectedReplacedSource = "zzz"; |
6471 |
"public class X {\n" + |
5540 |
expectedUnitDisplayString = |
6472 |
" void foo(){\n" + |
5541 |
"package p;\n" + |
|
|
5542 |
"public class X {\n" + |
5543 |
" public X() {\n" + |
5544 |
" }\n" + |
5545 |
" void foo() {\n" + |
5546 |
" Object o;\n" + |
6473 |
" Object o;\n" + |
5547 |
" o = new <CompleteOnType:zzz>();\n" + |
6474 |
" o = new zzz;\n" + |
5548 |
" }\n" + |
6475 |
" }\n" + |
5549 |
"}\n"; |
6476 |
"}\n"; |
|
|
6477 |
|
6478 |
String completeBehind = "zzz"; |
6479 |
int cursorLocation = str.indexOf("zzz") + completeBehind.length() - 1; |
6480 |
|
6481 |
String expectedCompletionNodeToString = "<CompleteOnType:zzz>"; |
6482 |
String expectedParentNodeToString = "o = new <CompleteOnType:zzz>()"; |
6483 |
String completionIdentifier = "zzz"; |
6484 |
String expectedReplacedSource = "zzz"; |
6485 |
String expectedUnitDisplayString = |
6486 |
"package p;\n" + |
6487 |
"public class X {\n" + |
6488 |
" public X() {\n" + |
6489 |
" }\n" + |
6490 |
" void foo() {\n" + |
6491 |
" Object o;\n" + |
6492 |
" o = new <CompleteOnType:zzz>();\n" + |
6493 |
" }\n" + |
6494 |
"}\n"; |
5550 |
|
6495 |
|
5551 |
checkMethodParse( |
6496 |
checkMethodParse( |
5552 |
str.toCharArray(), |
6497 |
str.toCharArray(), |
Lines 5558-5564
Link Here
|
5558 |
expectedReplacedSource, |
6503 |
expectedReplacedSource, |
5559 |
"full ast"); |
6504 |
"full ast"); |
5560 |
} |
6505 |
} |
5561 |
public void test0101(){ |
6506 |
public void test0101_Diet(){ |
5562 |
String str = |
6507 |
String str = |
5563 |
"package p;\n" + |
6508 |
"package p;\n" + |
5564 |
"public class X {\n" + |
6509 |
"public class X {\n" + |
Lines 5594-5614
Link Here
|
5594 |
completionIdentifier, |
6539 |
completionIdentifier, |
5595 |
expectedReplacedSource, |
6540 |
expectedReplacedSource, |
5596 |
"diet ast"); |
6541 |
"diet ast"); |
5597 |
|
6542 |
} |
5598 |
expectedCompletionNodeToString = "<CompleteOnName:zzz>"; |
6543 |
public void test0101_Method(){ |
5599 |
expectedParentNodeToString = "<NONE>"; |
6544 |
String str = |
5600 |
completionIdentifier = "zzz"; |
6545 |
"package p;\n" + |
5601 |
expectedReplacedSource = "zzz"; |
6546 |
"public class X {\n" + |
5602 |
expectedUnitDisplayString = |
6547 |
" void foo(){\n" + |
5603 |
"package p;\n" + |
|
|
5604 |
"public class X {\n" + |
5605 |
" public X() {\n" + |
5606 |
" }\n" + |
5607 |
" void foo() {\n" + |
5608 |
" Object o;\n" + |
6548 |
" Object o;\n" + |
5609 |
" <CompleteOnName:zzz>;\n" + |
6549 |
" o = yyy;\n" + |
|
|
6550 |
" zzz\n" + |
5610 |
" }\n" + |
6551 |
" }\n" + |
5611 |
"}\n"; |
6552 |
"}\n"; |
|
|
6553 |
|
6554 |
String completeBehind = "zzz"; |
6555 |
int cursorLocation = str.indexOf("zzz") + completeBehind.length() - 1; |
6556 |
|
6557 |
String expectedCompletionNodeToString = "<CompleteOnName:zzz>"; |
6558 |
String expectedParentNodeToString = "<NONE>"; |
6559 |
String completionIdentifier = "zzz"; |
6560 |
String expectedReplacedSource = "zzz"; |
6561 |
String expectedUnitDisplayString = |
6562 |
"package p;\n" + |
6563 |
"public class X {\n" + |
6564 |
" public X() {\n" + |
6565 |
" }\n" + |
6566 |
" void foo() {\n" + |
6567 |
" Object o;\n" + |
6568 |
" <CompleteOnName:zzz>;\n" + |
6569 |
" }\n" + |
6570 |
"}\n"; |
5612 |
|
6571 |
|
5613 |
checkMethodParse( |
6572 |
checkMethodParse( |
5614 |
str.toCharArray(), |
6573 |
str.toCharArray(), |
Lines 5621-5627
Link Here
|
5621 |
"full ast"); |
6580 |
"full ast"); |
5622 |
} |
6581 |
} |
5623 |
|
6582 |
|
5624 |
public void test0102(){ |
6583 |
public void test0102_Diet(){ |
5625 |
String str = |
6584 |
String str = |
5626 |
"package p;\n" + |
6585 |
"package p;\n" + |
5627 |
"public class X {\n" + |
6586 |
"public class X {\n" + |
Lines 5657-5677
Link Here
|
5657 |
completionIdentifier, |
6616 |
completionIdentifier, |
5658 |
expectedReplacedSource, |
6617 |
expectedReplacedSource, |
5659 |
"diet ast"); |
6618 |
"diet ast"); |
5660 |
|
6619 |
} |
5661 |
expectedCompletionNodeToString = "<CompleteOnName:zzz>"; |
6620 |
public void test0102_Method(){ |
5662 |
expectedParentNodeToString = "<NONE>"; |
6621 |
String str = |
5663 |
completionIdentifier = "zzz"; |
6622 |
"package p;\n" + |
5664 |
expectedReplacedSource = "zzz"; |
6623 |
"public class X {\n" + |
5665 |
expectedUnitDisplayString = |
6624 |
" void foo(){\n" + |
5666 |
"package p;\n" + |
|
|
5667 |
"public class X {\n" + |
5668 |
" public X() {\n" + |
5669 |
" }\n" + |
5670 |
" void foo() {\n" + |
5671 |
" Object o;\n" + |
6625 |
" Object o;\n" + |
5672 |
" <CompleteOnName:zzz>;\n" + |
6626 |
" o = yyy;\n" + |
|
|
6627 |
" zzz\n" + |
5673 |
" }\n" + |
6628 |
" }\n" + |
5674 |
"}\n"; |
6629 |
"}\n"; |
|
|
6630 |
|
6631 |
String completeBehind = "zzz"; |
6632 |
int cursorLocation = str.indexOf("zzz") + completeBehind.length() - 1; |
6633 |
|
6634 |
String expectedCompletionNodeToString = "<CompleteOnName:zzz>"; |
6635 |
String expectedParentNodeToString = "<NONE>"; |
6636 |
String completionIdentifier = "zzz"; |
6637 |
String expectedReplacedSource = "zzz"; |
6638 |
String expectedUnitDisplayString = |
6639 |
"package p;\n" + |
6640 |
"public class X {\n" + |
6641 |
" public X() {\n" + |
6642 |
" }\n" + |
6643 |
" void foo() {\n" + |
6644 |
" Object o;\n" + |
6645 |
" <CompleteOnName:zzz>;\n" + |
6646 |
" }\n" + |
6647 |
"}\n"; |
5675 |
|
6648 |
|
5676 |
checkMethodParse( |
6649 |
checkMethodParse( |
5677 |
str.toCharArray(), |
6650 |
str.toCharArray(), |
Lines 5683-5689
Link Here
|
5683 |
expectedReplacedSource, |
6656 |
expectedReplacedSource, |
5684 |
"full ast"); |
6657 |
"full ast"); |
5685 |
} |
6658 |
} |
5686 |
public void test0103(){ |
6659 |
public void test0103_Diet(){ |
5687 |
String str = |
6660 |
String str = |
5688 |
"package p;\n" + |
6661 |
"package p;\n" + |
5689 |
"public class X {\n" + |
6662 |
"public class X {\n" + |
Lines 5719-5739
Link Here
|
5719 |
completionIdentifier, |
6692 |
completionIdentifier, |
5720 |
expectedReplacedSource, |
6693 |
expectedReplacedSource, |
5721 |
"diet ast"); |
6694 |
"diet ast"); |
5722 |
|
6695 |
} |
5723 |
expectedCompletionNodeToString = "<CompleteOnName:zzz>"; |
6696 |
public void test0103_Method(){ |
5724 |
expectedParentNodeToString = "<NONE>"; |
6697 |
String str = |
5725 |
completionIdentifier = "zzz"; |
6698 |
"package p;\n" + |
5726 |
expectedReplacedSource = "zzz"; |
6699 |
"public class X {\n" + |
5727 |
expectedUnitDisplayString = |
6700 |
" void foo(){\n" + |
5728 |
"package p;\n" + |
|
|
5729 |
"public class X {\n" + |
5730 |
" public X() {\n" + |
5731 |
" }\n" + |
5732 |
" void foo() {\n" + |
5733 |
" Object o;\n" + |
6701 |
" Object o;\n" + |
5734 |
" <CompleteOnName:zzz>;\n" + |
6702 |
" o = \"yyy;\n" + |
|
|
6703 |
" zzz\n" + |
5735 |
" }\n" + |
6704 |
" }\n" + |
5736 |
"}\n"; |
6705 |
"}\n"; |
|
|
6706 |
|
6707 |
String completeBehind = "zzz"; |
6708 |
int cursorLocation = str.indexOf("zzz") + completeBehind.length() - 1; |
6709 |
|
6710 |
String expectedCompletionNodeToString = "<CompleteOnName:zzz>"; |
6711 |
String expectedParentNodeToString = "<NONE>"; |
6712 |
String completionIdentifier = "zzz"; |
6713 |
String expectedReplacedSource = "zzz"; |
6714 |
String expectedUnitDisplayString = |
6715 |
"package p;\n" + |
6716 |
"public class X {\n" + |
6717 |
" public X() {\n" + |
6718 |
" }\n" + |
6719 |
" void foo() {\n" + |
6720 |
" Object o;\n" + |
6721 |
" <CompleteOnName:zzz>;\n" + |
6722 |
" }\n" + |
6723 |
"}\n"; |
5737 |
|
6724 |
|
5738 |
checkMethodParse( |
6725 |
checkMethodParse( |
5739 |
str.toCharArray(), |
6726 |
str.toCharArray(), |
Lines 5746-5752
Link Here
|
5746 |
"full ast"); |
6733 |
"full ast"); |
5747 |
} |
6734 |
} |
5748 |
|
6735 |
|
5749 |
public void test0104(){ |
6736 |
public void test0104_Diet(){ |
5750 |
String str = |
6737 |
String str = |
5751 |
"package p;\n" + |
6738 |
"package p;\n" + |
5752 |
"public class X {\n" + |
6739 |
"public class X {\n" + |
Lines 5782-5802
Link Here
|
5782 |
completionIdentifier, |
6769 |
completionIdentifier, |
5783 |
expectedReplacedSource, |
6770 |
expectedReplacedSource, |
5784 |
"diet ast"); |
6771 |
"diet ast"); |
5785 |
|
6772 |
} |
5786 |
expectedCompletionNodeToString = "<CompleteOnName:zzz>"; |
6773 |
public void test0104_Method(){ |
5787 |
expectedParentNodeToString = "<NONE>"; |
6774 |
String str = |
5788 |
completionIdentifier = "zzz"; |
6775 |
"package p;\n" + |
5789 |
expectedReplacedSource = "zzz"; |
6776 |
"public class X {\n" + |
5790 |
expectedUnitDisplayString = |
6777 |
" void foo(){\n" + |
5791 |
"package p;\n" + |
|
|
5792 |
"public class X {\n" + |
5793 |
" public X() {\n" + |
5794 |
" }\n" + |
5795 |
" void foo() {\n" + |
5796 |
" Object o;\n" + |
6778 |
" Object o;\n" + |
5797 |
" <CompleteOnName:zzz>;\n" + |
6779 |
" o = \"yyy;\n" + |
|
|
6780 |
" zzz\n" + |
5798 |
" }\n" + |
6781 |
" }\n" + |
5799 |
"}\n"; |
6782 |
"}\n"; |
|
|
6783 |
|
6784 |
String completeBehind = "zzz"; |
6785 |
int cursorLocation = str.indexOf("zzz") + completeBehind.length() - 1; |
6786 |
|
6787 |
String expectedCompletionNodeToString = "<CompleteOnName:zzz>"; |
6788 |
String expectedParentNodeToString = "<NONE>"; |
6789 |
String completionIdentifier = "zzz"; |
6790 |
String expectedReplacedSource = "zzz"; |
6791 |
String expectedUnitDisplayString = |
6792 |
"package p;\n" + |
6793 |
"public class X {\n" + |
6794 |
" public X() {\n" + |
6795 |
" }\n" + |
6796 |
" void foo() {\n" + |
6797 |
" Object o;\n" + |
6798 |
" <CompleteOnName:zzz>;\n" + |
6799 |
" }\n" + |
6800 |
"}\n"; |
5800 |
|
6801 |
|
5801 |
checkMethodParse( |
6802 |
checkMethodParse( |
5802 |
str.toCharArray(), |
6803 |
str.toCharArray(), |
Lines 5809-5815
Link Here
|
5809 |
"full ast"); |
6810 |
"full ast"); |
5810 |
} |
6811 |
} |
5811 |
|
6812 |
|
5812 |
public void test0105(){ |
6813 |
public void test0105_Diet(){ |
5813 |
String str = |
6814 |
String str = |
5814 |
"package p;\n" + |
6815 |
"package p;\n" + |
5815 |
"public class X {\n" + |
6816 |
"public class X {\n" + |
Lines 5843-5862
Link Here
|
5843 |
completionIdentifier, |
6844 |
completionIdentifier, |
5844 |
expectedReplacedSource, |
6845 |
expectedReplacedSource, |
5845 |
"diet ast"); |
6846 |
"diet ast"); |
5846 |
|
6847 |
} |
5847 |
expectedCompletionNodeToString = "<CompleteOnName:zzz>"; |
6848 |
public void test0105_Method(){ |
5848 |
expectedParentNodeToString = "(1 + <CompleteOnName:zzz>)"; |
6849 |
String str = |
5849 |
completionIdentifier = "zzz"; |
6850 |
"package p;\n" + |
5850 |
expectedReplacedSource = "zzz"; |
6851 |
"public class X {\n" + |
5851 |
expectedUnitDisplayString = |
6852 |
" void foo(){\n" + |
5852 |
"package p;\n" + |
6853 |
" int x = 1 + zzz\n" + |
5853 |
"public class X {\n" + |
|
|
5854 |
" public X() {\n" + |
5855 |
" }\n" + |
5856 |
" void foo() {\n" + |
5857 |
" int x = (1 + <CompleteOnName:zzz>);\n" + |
5858 |
" }\n" + |
6854 |
" }\n" + |
5859 |
"}\n"; |
6855 |
"}\n"; |
|
|
6856 |
|
6857 |
String completeBehind = "zzz"; |
6858 |
int cursorLocation = str.indexOf("zzz") + completeBehind.length() - 1; |
6859 |
|
6860 |
String expectedCompletionNodeToString = "<CompleteOnName:zzz>"; |
6861 |
String expectedParentNodeToString = "(1 + <CompleteOnName:zzz>)"; |
6862 |
String completionIdentifier = "zzz"; |
6863 |
String expectedReplacedSource = "zzz"; |
6864 |
String expectedUnitDisplayString = |
6865 |
"package p;\n" + |
6866 |
"public class X {\n" + |
6867 |
" public X() {\n" + |
6868 |
" }\n" + |
6869 |
" void foo() {\n" + |
6870 |
" int x = (1 + <CompleteOnName:zzz>);\n" + |
6871 |
" }\n" + |
6872 |
"}\n"; |
5860 |
|
6873 |
|
5861 |
checkMethodParse( |
6874 |
checkMethodParse( |
5862 |
str.toCharArray(), |
6875 |
str.toCharArray(), |
Lines 5868-5874
Link Here
|
5868 |
expectedReplacedSource, |
6881 |
expectedReplacedSource, |
5869 |
"full ast"); |
6882 |
"full ast"); |
5870 |
} |
6883 |
} |
5871 |
public void test0106(){ |
6884 |
public void test0106_Diet(){ |
5872 |
String str = |
6885 |
String str = |
5873 |
"package p;\n" + |
6886 |
"package p;\n" + |
5874 |
"public class X {\n" + |
6887 |
"public class X {\n" + |
Lines 5902-5921
Link Here
|
5902 |
completionIdentifier, |
6915 |
completionIdentifier, |
5903 |
expectedReplacedSource, |
6916 |
expectedReplacedSource, |
5904 |
"diet ast"); |
6917 |
"diet ast"); |
5905 |
|
6918 |
} |
5906 |
expectedCompletionNodeToString = "<CompleteOnName:zzz>"; |
6919 |
public void test0106_Method(){ |
5907 |
expectedParentNodeToString = "(1 + <CompleteOnName:zzz>)"; |
6920 |
String str = |
5908 |
completionIdentifier = "zzz"; |
6921 |
"package p;\n" + |
5909 |
expectedReplacedSource = "zzz"; |
6922 |
"public class X {\n" + |
5910 |
expectedUnitDisplayString = |
6923 |
" void foo(){\n" + |
5911 |
"package p;\n" + |
6924 |
" int x = 1 + (zzz\n" + |
5912 |
"public class X {\n" + |
|
|
5913 |
" public X() {\n" + |
5914 |
" }\n" + |
5915 |
" void foo() {\n" + |
5916 |
" int x = (1 + <CompleteOnName:zzz>);\n" + |
5917 |
" }\n" + |
6925 |
" }\n" + |
5918 |
"}\n"; |
6926 |
"}\n"; |
|
|
6927 |
|
6928 |
String completeBehind = "zzz"; |
6929 |
int cursorLocation = str.indexOf("zzz") + completeBehind.length() - 1; |
6930 |
|
6931 |
String expectedCompletionNodeToString = "<CompleteOnName:zzz>"; |
6932 |
String expectedParentNodeToString = "(1 + <CompleteOnName:zzz>)"; |
6933 |
String completionIdentifier = "zzz"; |
6934 |
String expectedReplacedSource = "zzz"; |
6935 |
String expectedUnitDisplayString = |
6936 |
"package p;\n" + |
6937 |
"public class X {\n" + |
6938 |
" public X() {\n" + |
6939 |
" }\n" + |
6940 |
" void foo() {\n" + |
6941 |
" int x = (1 + <CompleteOnName:zzz>);\n" + |
6942 |
" }\n" + |
6943 |
"}\n"; |
5919 |
|
6944 |
|
5920 |
checkMethodParse( |
6945 |
checkMethodParse( |
5921 |
str.toCharArray(), |
6946 |
str.toCharArray(), |
Lines 5927-5933
Link Here
|
5927 |
expectedReplacedSource, |
6952 |
expectedReplacedSource, |
5928 |
"full ast"); |
6953 |
"full ast"); |
5929 |
} |
6954 |
} |
5930 |
public void test0107(){ |
6955 |
public void test0107_Diet(){ |
5931 |
String str = |
6956 |
String str = |
5932 |
"package p;\n" + |
6957 |
"package p;\n" + |
5933 |
"public class X {\n" + |
6958 |
"public class X {\n" + |
Lines 5963-5984
Link Here
|
5963 |
completionIdentifier, |
6988 |
completionIdentifier, |
5964 |
expectedReplacedSource, |
6989 |
expectedReplacedSource, |
5965 |
"diet ast"); |
6990 |
"diet ast"); |
5966 |
|
6991 |
} |
5967 |
expectedCompletionNodeToString = "<CompleteOnName:zzz>"; |
6992 |
public void test0107_Method(){ |
5968 |
expectedParentNodeToString = "<NONE>"; |
6993 |
String str = |
5969 |
completionIdentifier = "zzz"; |
6994 |
"package p;\n" + |
5970 |
expectedReplacedSource = "zzz"; |
6995 |
"public class X {\n" + |
5971 |
expectedUnitDisplayString = |
6996 |
" void foo(){\n" + |
5972 |
"package p;\n" + |
6997 |
" int x = 0;\n" + |
5973 |
"public class X {\n" + |
6998 |
" int y = 1 + x;\n" + |
5974 |
" public X() {\n" + |
6999 |
" zzz;\n" + |
5975 |
" }\n" + |
|
|
5976 |
" void foo() {\n" + |
5977 |
" int x;\n" + |
5978 |
" int y;\n" + |
5979 |
" <CompleteOnName:zzz>;\n" + |
5980 |
" }\n" + |
7000 |
" }\n" + |
5981 |
"}\n"; |
7001 |
"}\n"; |
|
|
7002 |
|
7003 |
String completeBehind = "zzz"; |
7004 |
int cursorLocation = str.indexOf("zzz") + completeBehind.length() - 1; |
7005 |
|
7006 |
String expectedCompletionNodeToString = "<CompleteOnName:zzz>"; |
7007 |
String expectedParentNodeToString = "<NONE>"; |
7008 |
String completionIdentifier = "zzz"; |
7009 |
String expectedReplacedSource = "zzz"; |
7010 |
String expectedUnitDisplayString = |
7011 |
"package p;\n" + |
7012 |
"public class X {\n" + |
7013 |
" public X() {\n" + |
7014 |
" }\n" + |
7015 |
" void foo() {\n" + |
7016 |
" int x;\n" + |
7017 |
" int y;\n" + |
7018 |
" <CompleteOnName:zzz>;\n" + |
7019 |
" }\n" + |
7020 |
"}\n"; |
5982 |
|
7021 |
|
5983 |
checkMethodParse( |
7022 |
checkMethodParse( |
5984 |
str.toCharArray(), |
7023 |
str.toCharArray(), |
Lines 5990-5996
Link Here
|
5990 |
expectedReplacedSource, |
7029 |
expectedReplacedSource, |
5991 |
"full ast"); |
7030 |
"full ast"); |
5992 |
} |
7031 |
} |
5993 |
public void test0108(){ |
7032 |
public void test0108_Diet(){ |
5994 |
String str = |
7033 |
String str = |
5995 |
"package p;\n" + |
7034 |
"package p;\n" + |
5996 |
"public class X {\n" + |
7035 |
"public class X {\n" + |
Lines 6024-6043
Link Here
|
6024 |
completionIdentifier, |
7063 |
completionIdentifier, |
6025 |
expectedReplacedSource, |
7064 |
expectedReplacedSource, |
6026 |
"diet ast"); |
7065 |
"diet ast"); |
6027 |
|
7066 |
} |
6028 |
expectedCompletionNodeToString = "<CompleteOnName:zzz>"; |
7067 |
public void test0108_Method(){ |
6029 |
expectedParentNodeToString = "(- <CompleteOnName:zzz>)"; |
7068 |
String str = |
6030 |
completionIdentifier = "zzz"; |
7069 |
"package p;\n" + |
6031 |
expectedReplacedSource = "zzz"; |
7070 |
"public class X {\n" + |
6032 |
expectedUnitDisplayString = |
7071 |
" void foo(){\n" + |
6033 |
"package p;\n" + |
7072 |
" int x = -zzz;\n" + |
6034 |
"public class X {\n" + |
|
|
6035 |
" public X() {\n" + |
6036 |
" }\n" + |
6037 |
" void foo() {\n" + |
6038 |
" int x = (- <CompleteOnName:zzz>);\n" + |
6039 |
" }\n" + |
7073 |
" }\n" + |
6040 |
"}\n"; |
7074 |
"}\n"; |
|
|
7075 |
|
7076 |
String completeBehind = "zzz"; |
7077 |
int cursorLocation = str.indexOf("zzz") + completeBehind.length() - 1; |
7078 |
|
7079 |
String expectedCompletionNodeToString = "<CompleteOnName:zzz>"; |
7080 |
String expectedParentNodeToString = "(- <CompleteOnName:zzz>)"; |
7081 |
String completionIdentifier = "zzz"; |
7082 |
String expectedReplacedSource = "zzz"; |
7083 |
String expectedUnitDisplayString = |
7084 |
"package p;\n" + |
7085 |
"public class X {\n" + |
7086 |
" public X() {\n" + |
7087 |
" }\n" + |
7088 |
" void foo() {\n" + |
7089 |
" int x = (- <CompleteOnName:zzz>);\n" + |
7090 |
" }\n" + |
7091 |
"}\n"; |
6041 |
|
7092 |
|
6042 |
checkMethodParse( |
7093 |
checkMethodParse( |
6043 |
str.toCharArray(), |
7094 |
str.toCharArray(), |
Lines 6049-6055
Link Here
|
6049 |
expectedReplacedSource, |
7100 |
expectedReplacedSource, |
6050 |
"full ast"); |
7101 |
"full ast"); |
6051 |
} |
7102 |
} |
6052 |
public void test0109(){ |
7103 |
public void test0109_Diet(){ |
6053 |
String str = |
7104 |
String str = |
6054 |
"package p;\n" + |
7105 |
"package p;\n" + |
6055 |
"public class X {\n" + |
7106 |
"public class X {\n" + |
Lines 6083-6102
Link Here
|
6083 |
completionIdentifier, |
7134 |
completionIdentifier, |
6084 |
expectedReplacedSource, |
7135 |
expectedReplacedSource, |
6085 |
"diet ast"); |
7136 |
"diet ast"); |
6086 |
|
7137 |
} |
6087 |
expectedCompletionNodeToString = "<CompleteOnName:zzz>"; |
7138 |
public void test0109_Method(){ |
6088 |
expectedParentNodeToString = "(- <CompleteOnName:zzz>)"; |
7139 |
String str = |
6089 |
completionIdentifier = "zzz"; |
7140 |
"package p;\n" + |
6090 |
expectedReplacedSource = "zzz"; |
7141 |
"public class X {\n" + |
6091 |
expectedUnitDisplayString = |
7142 |
" void foo(){\n" + |
6092 |
"package p;\n" + |
7143 |
" int x = -(zzz;\n" + |
6093 |
"public class X {\n" + |
|
|
6094 |
" public X() {\n" + |
6095 |
" }\n" + |
6096 |
" void foo() {\n" + |
6097 |
" int x = (- <CompleteOnName:zzz>);\n" + |
6098 |
" }\n" + |
7144 |
" }\n" + |
6099 |
"}\n"; |
7145 |
"}\n"; |
|
|
7146 |
|
7147 |
String completeBehind = "zzz"; |
7148 |
int cursorLocation = str.indexOf("zzz") + completeBehind.length() - 1; |
7149 |
|
7150 |
String expectedCompletionNodeToString = "<CompleteOnName:zzz>"; |
7151 |
String expectedParentNodeToString = "(- <CompleteOnName:zzz>)"; |
7152 |
String completionIdentifier = "zzz"; |
7153 |
String expectedReplacedSource = "zzz"; |
7154 |
String expectedUnitDisplayString = |
7155 |
"package p;\n" + |
7156 |
"public class X {\n" + |
7157 |
" public X() {\n" + |
7158 |
" }\n" + |
7159 |
" void foo() {\n" + |
7160 |
" int x = (- <CompleteOnName:zzz>);\n" + |
7161 |
" }\n" + |
7162 |
"}\n"; |
6100 |
|
7163 |
|
6101 |
checkMethodParse( |
7164 |
checkMethodParse( |
6102 |
str.toCharArray(), |
7165 |
str.toCharArray(), |
Lines 6108-6114
Link Here
|
6108 |
expectedReplacedSource, |
7171 |
expectedReplacedSource, |
6109 |
"full ast"); |
7172 |
"full ast"); |
6110 |
} |
7173 |
} |
6111 |
public void test0110(){ |
7174 |
public void test0110_Diet(){ |
6112 |
String str = |
7175 |
String str = |
6113 |
"package p;\n" + |
7176 |
"package p;\n" + |
6114 |
"public class X {\n" + |
7177 |
"public class X {\n" + |
Lines 6144-6165
Link Here
|
6144 |
completionIdentifier, |
7207 |
completionIdentifier, |
6145 |
expectedReplacedSource, |
7208 |
expectedReplacedSource, |
6146 |
"diet ast"); |
7209 |
"diet ast"); |
6147 |
|
7210 |
} |
6148 |
expectedCompletionNodeToString = "<CompleteOnName:zzz>"; |
7211 |
public void test0110_Method(){ |
6149 |
expectedParentNodeToString = "<NONE>"; |
7212 |
String str = |
6150 |
completionIdentifier = "zzz"; |
7213 |
"package p;\n" + |
6151 |
expectedReplacedSource = "zzz"; |
7214 |
"public class X {\n" + |
6152 |
expectedUnitDisplayString = |
7215 |
" void foo(){\n" + |
6153 |
"package p;\n" + |
7216 |
" int x = 0;\n" + |
6154 |
"public class X {\n" + |
7217 |
" int y = -x;\n" + |
6155 |
" public X() {\n" + |
7218 |
" zzz;\n" + |
6156 |
" }\n" + |
|
|
6157 |
" void foo() {\n" + |
6158 |
" int x;\n" + |
6159 |
" int y;\n" + |
6160 |
" <CompleteOnName:zzz>;\n" + |
6161 |
" }\n" + |
7219 |
" }\n" + |
6162 |
"}\n"; |
7220 |
"}\n"; |
|
|
7221 |
|
7222 |
String completeBehind = "zzz"; |
7223 |
int cursorLocation = str.indexOf("zzz") + completeBehind.length() - 1; |
7224 |
|
7225 |
String expectedCompletionNodeToString = "<CompleteOnName:zzz>"; |
7226 |
String expectedParentNodeToString = "<NONE>"; |
7227 |
String completionIdentifier = "zzz"; |
7228 |
String expectedReplacedSource = "zzz"; |
7229 |
String expectedUnitDisplayString = |
7230 |
"package p;\n" + |
7231 |
"public class X {\n" + |
7232 |
" public X() {\n" + |
7233 |
" }\n" + |
7234 |
" void foo() {\n" + |
7235 |
" int x;\n" + |
7236 |
" int y;\n" + |
7237 |
" <CompleteOnName:zzz>;\n" + |
7238 |
" }\n" + |
7239 |
"}\n"; |
6163 |
|
7240 |
|
6164 |
checkMethodParse( |
7241 |
checkMethodParse( |
6165 |
str.toCharArray(), |
7242 |
str.toCharArray(), |
Lines 6171-6177
Link Here
|
6171 |
expectedReplacedSource, |
7248 |
expectedReplacedSource, |
6172 |
"full ast"); |
7249 |
"full ast"); |
6173 |
} |
7250 |
} |
6174 |
public void test0111(){ |
7251 |
public void test0111_Diet(){ |
6175 |
String str = |
7252 |
String str = |
6176 |
"package p;\n" + |
7253 |
"package p;\n" + |
6177 |
"public class X {\n" + |
7254 |
"public class X {\n" + |
Lines 6205-6224
Link Here
|
6205 |
completionIdentifier, |
7282 |
completionIdentifier, |
6206 |
expectedReplacedSource, |
7283 |
expectedReplacedSource, |
6207 |
"diet ast"); |
7284 |
"diet ast"); |
6208 |
|
7285 |
} |
6209 |
expectedCompletionNodeToString = "<CompleteOnName:zzz>"; |
7286 |
public void test0111_Method(){ |
6210 |
expectedParentNodeToString = "(1 == <CompleteOnName:zzz>)"; |
7287 |
String str = |
6211 |
completionIdentifier = "zzz"; |
7288 |
"package p;\n" + |
6212 |
expectedReplacedSource = "zzz"; |
7289 |
"public class X {\n" + |
6213 |
expectedUnitDisplayString = |
7290 |
" void foo(){\n" + |
6214 |
"package p;\n" + |
7291 |
" if(1 == zzz) {}\n" + |
6215 |
"public class X {\n" + |
|
|
6216 |
" public X() {\n" + |
6217 |
" }\n" + |
6218 |
" void foo() {\n" + |
6219 |
" (1 == <CompleteOnName:zzz>);\n" + |
6220 |
" }\n" + |
7292 |
" }\n" + |
6221 |
"}\n"; |
7293 |
"}\n"; |
|
|
7294 |
|
7295 |
String completeBehind = "zzz"; |
7296 |
int cursorLocation = str.indexOf("zzz") + completeBehind.length() - 1; |
7297 |
|
7298 |
String expectedCompletionNodeToString = "<CompleteOnName:zzz>"; |
7299 |
String expectedParentNodeToString = "(1 == <CompleteOnName:zzz>)"; |
7300 |
String completionIdentifier = "zzz"; |
7301 |
String expectedReplacedSource = "zzz"; |
7302 |
String expectedUnitDisplayString = |
7303 |
"package p;\n" + |
7304 |
"public class X {\n" + |
7305 |
" public X() {\n" + |
7306 |
" }\n" + |
7307 |
" void foo() {\n" + |
7308 |
" (1 == <CompleteOnName:zzz>);\n" + |
7309 |
" }\n" + |
7310 |
"}\n"; |
6222 |
|
7311 |
|
6223 |
checkMethodParse( |
7312 |
checkMethodParse( |
6224 |
str.toCharArray(), |
7313 |
str.toCharArray(), |
Lines 6230-6236
Link Here
|
6230 |
expectedReplacedSource, |
7319 |
expectedReplacedSource, |
6231 |
"full ast"); |
7320 |
"full ast"); |
6232 |
} |
7321 |
} |
6233 |
public void test0112(){ |
7322 |
public void test0112_Diet(){ |
6234 |
String str = |
7323 |
String str = |
6235 |
"package p;\n" + |
7324 |
"package p;\n" + |
6236 |
"public class X {\n" + |
7325 |
"public class X {\n" + |
Lines 6264-6283
Link Here
|
6264 |
completionIdentifier, |
7353 |
completionIdentifier, |
6265 |
expectedReplacedSource, |
7354 |
expectedReplacedSource, |
6266 |
"diet ast"); |
7355 |
"diet ast"); |
6267 |
|
7356 |
} |
6268 |
expectedCompletionNodeToString = "<CompleteOnName:zzz>"; |
7357 |
public void test0112_Method(){ |
6269 |
expectedParentNodeToString = "(1 == <CompleteOnName:zzz>)"; |
7358 |
String str = |
6270 |
completionIdentifier = "zzz"; |
7359 |
"package p;\n" + |
6271 |
expectedReplacedSource = "zzz"; |
7360 |
"public class X {\n" + |
6272 |
expectedUnitDisplayString = |
7361 |
" void foo(){\n" + |
6273 |
"package p;\n" + |
7362 |
" if(1 == (zzz)) {}\n" + |
6274 |
"public class X {\n" + |
|
|
6275 |
" public X() {\n" + |
6276 |
" }\n" + |
6277 |
" void foo() {\n" + |
6278 |
" (1 == <CompleteOnName:zzz>);\n" + |
6279 |
" }\n" + |
7363 |
" }\n" + |
6280 |
"}\n"; |
7364 |
"}\n"; |
|
|
7365 |
|
7366 |
String completeBehind = "zzz"; |
7367 |
int cursorLocation = str.indexOf("zzz") + completeBehind.length() - 1; |
7368 |
|
7369 |
String expectedCompletionNodeToString = "<CompleteOnName:zzz>"; |
7370 |
String expectedParentNodeToString = "(1 == <CompleteOnName:zzz>)"; |
7371 |
String completionIdentifier = "zzz"; |
7372 |
String expectedReplacedSource = "zzz"; |
7373 |
String expectedUnitDisplayString = |
7374 |
"package p;\n" + |
7375 |
"public class X {\n" + |
7376 |
" public X() {\n" + |
7377 |
" }\n" + |
7378 |
" void foo() {\n" + |
7379 |
" (1 == <CompleteOnName:zzz>);\n" + |
7380 |
" }\n" + |
7381 |
"}\n"; |
6281 |
|
7382 |
|
6282 |
checkMethodParse( |
7383 |
checkMethodParse( |
6283 |
str.toCharArray(), |
7384 |
str.toCharArray(), |
Lines 6289-6295
Link Here
|
6289 |
expectedReplacedSource, |
7390 |
expectedReplacedSource, |
6290 |
"full ast"); |
7391 |
"full ast"); |
6291 |
} |
7392 |
} |
6292 |
public void test0113(){ |
7393 |
public void test0113_Diet(){ |
6293 |
String str = |
7394 |
String str = |
6294 |
"package p;\n" + |
7395 |
"package p;\n" + |
6295 |
"public class X {\n" + |
7396 |
"public class X {\n" + |
Lines 6323-6342
Link Here
|
6323 |
completionIdentifier, |
7424 |
completionIdentifier, |
6324 |
expectedReplacedSource, |
7425 |
expectedReplacedSource, |
6325 |
"diet ast"); |
7426 |
"diet ast"); |
6326 |
|
7427 |
} |
6327 |
expectedCompletionNodeToString = "<CompleteOnType:ZZZ>"; |
7428 |
public void test0113_Method(){ |
6328 |
expectedParentNodeToString = "(x instanceof <CompleteOnType:ZZZ>)"; |
7429 |
String str = |
6329 |
completionIdentifier = "ZZZ"; |
7430 |
"package p;\n" + |
6330 |
expectedReplacedSource = "ZZZ"; |
7431 |
"public class X {\n" + |
6331 |
expectedUnitDisplayString = |
7432 |
" void foo(Object x){\n" + |
6332 |
"package p;\n" + |
7433 |
" if(x instanceof ZZZ) {}\n" + |
6333 |
"public class X {\n" + |
|
|
6334 |
" public X() {\n" + |
6335 |
" }\n" + |
6336 |
" void foo(Object x) {\n" + |
6337 |
" (x instanceof <CompleteOnType:ZZZ>);\n" + |
6338 |
" }\n" + |
7434 |
" }\n" + |
6339 |
"}\n"; |
7435 |
"}\n"; |
|
|
7436 |
|
7437 |
String completeBehind = "ZZZ"; |
7438 |
int cursorLocation = str.indexOf("ZZZ") + completeBehind.length() - 1; |
7439 |
|
7440 |
String expectedCompletionNodeToString = "<CompleteOnType:ZZZ>"; |
7441 |
String expectedParentNodeToString = "(x instanceof <CompleteOnType:ZZZ>)"; |
7442 |
String completionIdentifier = "ZZZ"; |
7443 |
String expectedReplacedSource = "ZZZ"; |
7444 |
String expectedUnitDisplayString = |
7445 |
"package p;\n" + |
7446 |
"public class X {\n" + |
7447 |
" public X() {\n" + |
7448 |
" }\n" + |
7449 |
" void foo(Object x) {\n" + |
7450 |
" (x instanceof <CompleteOnType:ZZZ>);\n" + |
7451 |
" }\n" + |
7452 |
"}\n"; |
6340 |
|
7453 |
|
6341 |
checkMethodParse( |
7454 |
checkMethodParse( |
6342 |
str.toCharArray(), |
7455 |
str.toCharArray(), |
Lines 6348-6354
Link Here
|
6348 |
expectedReplacedSource, |
7461 |
expectedReplacedSource, |
6349 |
"full ast"); |
7462 |
"full ast"); |
6350 |
} |
7463 |
} |
6351 |
public void test0114(){ |
7464 |
public void test0114_Diet(){ |
6352 |
String str = |
7465 |
String str = |
6353 |
"package p;\n" + |
7466 |
"package p;\n" + |
6354 |
"public class X {\n" + |
7467 |
"public class X {\n" + |
Lines 6383-6406
Link Here
|
6383 |
completionIdentifier, |
7496 |
completionIdentifier, |
6384 |
expectedReplacedSource, |
7497 |
expectedReplacedSource, |
6385 |
"diet ast"); |
7498 |
"diet ast"); |
6386 |
|
7499 |
} |
6387 |
expectedCompletionNodeToString = "<CompleteOnName:zzz>"; |
7500 |
public void test0114_Method(){ |
6388 |
expectedParentNodeToString = "c = <CompleteOnName:zzz>"; |
7501 |
String str = |
6389 |
completionIdentifier = "zzz"; |
|
|
6390 |
expectedReplacedSource = "zzz"; |
6391 |
expectedUnitDisplayString = |
6392 |
"package p;\n" + |
7502 |
"package p;\n" + |
6393 |
"public class X {\n" + |
7503 |
"public class X {\n" + |
6394 |
" public X() {\n" + |
7504 |
" void foo(){\n" + |
6395 |
" }\n" + |
7505 |
" boolean a, b, c;\n" + |
6396 |
" void foo() {\n" + |
7506 |
" c = a == b ? zzz\n" + |
6397 |
" boolean a;\n" + |
|
|
6398 |
" boolean b;\n" + |
6399 |
" boolean c;\n" + |
6400 |
" c = <CompleteOnName:zzz>;\n" + |
6401 |
" }\n" + |
7507 |
" }\n" + |
6402 |
"}\n"; |
7508 |
"}\n"; |
6403 |
|
7509 |
|
|
|
7510 |
String completeBehind = "zzz"; |
7511 |
int cursorLocation = str.indexOf("zzz") + completeBehind.length() - 1; |
7512 |
|
7513 |
String expectedCompletionNodeToString = "<CompleteOnName:zzz>"; |
7514 |
String expectedParentNodeToString = "c = <CompleteOnName:zzz>"; |
7515 |
String completionIdentifier = "zzz"; |
7516 |
String expectedReplacedSource = "zzz"; |
7517 |
String expectedUnitDisplayString = |
7518 |
"package p;\n" + |
7519 |
"public class X {\n" + |
7520 |
" public X() {\n" + |
7521 |
" }\n" + |
7522 |
" void foo() {\n" + |
7523 |
" boolean a;\n" + |
7524 |
" boolean b;\n" + |
7525 |
" boolean c;\n" + |
7526 |
" c = <CompleteOnName:zzz>;\n" + |
7527 |
" }\n" + |
7528 |
"}\n"; |
7529 |
|
6404 |
checkMethodParse( |
7530 |
checkMethodParse( |
6405 |
str.toCharArray(), |
7531 |
str.toCharArray(), |
6406 |
cursorLocation, |
7532 |
cursorLocation, |
Lines 6411-6417
Link Here
|
6411 |
expectedReplacedSource, |
7537 |
expectedReplacedSource, |
6412 |
"full ast"); |
7538 |
"full ast"); |
6413 |
} |
7539 |
} |
6414 |
public void test0115(){ |
7540 |
public void test0115_Diet(){ |
6415 |
String str = |
7541 |
String str = |
6416 |
"package p;\n" + |
7542 |
"package p;\n" + |
6417 |
"public class X {\n" + |
7543 |
"public class X {\n" + |
Lines 6446-6468
Link Here
|
6446 |
completionIdentifier, |
7572 |
completionIdentifier, |
6447 |
expectedReplacedSource, |
7573 |
expectedReplacedSource, |
6448 |
"diet ast"); |
7574 |
"diet ast"); |
6449 |
|
7575 |
} |
6450 |
expectedCompletionNodeToString = "<CompleteOnName:zzz>"; |
7576 |
public void test0115_Method(){ |
6451 |
expectedParentNodeToString = "<NONE>"; |
7577 |
String str = |
6452 |
completionIdentifier = "zzz"; |
|
|
6453 |
expectedReplacedSource = "zzz"; |
6454 |
expectedUnitDisplayString = |
6455 |
"package p;\n" + |
7578 |
"package p;\n" + |
6456 |
"public class X {\n" + |
7579 |
"public class X {\n" + |
6457 |
" public X() {\n" + |
7580 |
" void foo(){\n" + |
6458 |
" }\n" + |
7581 |
" boolean a, b;\n" + |
6459 |
" void foo() {\n" + |
7582 |
" a == b ? zzz\n" + |
6460 |
" boolean a;\n" + |
|
|
6461 |
" boolean b;\n" + |
6462 |
" <CompleteOnName:zzz>;\n" + |
6463 |
" }\n" + |
7583 |
" }\n" + |
6464 |
"}\n"; |
7584 |
"}\n"; |
6465 |
|
7585 |
|
|
|
7586 |
String completeBehind = "zzz"; |
7587 |
int cursorLocation = str.indexOf("zzz") + completeBehind.length() - 1; |
7588 |
|
7589 |
String expectedCompletionNodeToString = "<CompleteOnName:zzz>"; |
7590 |
String expectedParentNodeToString = "<NONE>"; |
7591 |
String completionIdentifier = "zzz"; |
7592 |
String expectedReplacedSource = "zzz"; |
7593 |
String expectedUnitDisplayString = |
7594 |
"package p;\n" + |
7595 |
"public class X {\n" + |
7596 |
" public X() {\n" + |
7597 |
" }\n" + |
7598 |
" void foo() {\n" + |
7599 |
" boolean a;\n" + |
7600 |
" boolean b;\n" + |
7601 |
" <CompleteOnName:zzz>;\n" + |
7602 |
" }\n" + |
7603 |
"}\n"; |
7604 |
|
6466 |
checkMethodParse( |
7605 |
checkMethodParse( |
6467 |
str.toCharArray(), |
7606 |
str.toCharArray(), |
6468 |
cursorLocation, |
7607 |
cursorLocation, |
Lines 6473-6479
Link Here
|
6473 |
expectedReplacedSource, |
7612 |
expectedReplacedSource, |
6474 |
"full ast"); |
7613 |
"full ast"); |
6475 |
} |
7614 |
} |
6476 |
public void test0116(){ |
7615 |
public void test0116_Diet(){ |
6477 |
String str = |
7616 |
String str = |
6478 |
"package p;\n" + |
7617 |
"package p;\n" + |
6479 |
"public class X {\n" + |
7618 |
"public class X {\n" + |
Lines 6508-6531
Link Here
|
6508 |
completionIdentifier, |
7647 |
completionIdentifier, |
6509 |
expectedReplacedSource, |
7648 |
expectedReplacedSource, |
6510 |
"diet ast"); |
7649 |
"diet ast"); |
6511 |
|
7650 |
} |
6512 |
expectedCompletionNodeToString = "<CompleteOnName:zzz>"; |
7651 |
public void test0116_Method(){ |
6513 |
expectedParentNodeToString = "c = ((a == b) ? a : <CompleteOnName:zzz>)"; |
7652 |
String str = |
6514 |
completionIdentifier = "zzz"; |
|
|
6515 |
expectedReplacedSource = "zzz"; |
6516 |
expectedUnitDisplayString = |
6517 |
"package p;\n" + |
7653 |
"package p;\n" + |
6518 |
"public class X {\n" + |
7654 |
"public class X {\n" + |
6519 |
" public X() {\n" + |
7655 |
" void foo(){\n" + |
6520 |
" }\n" + |
7656 |
" boolean a, b, c;\n" + |
6521 |
" void foo() {\n" + |
7657 |
" c = a == b ? a : zzz\n" + |
6522 |
" boolean a;\n" + |
|
|
6523 |
" boolean b;\n" + |
6524 |
" boolean c;\n" + |
6525 |
" c = ((a == b) ? a : <CompleteOnName:zzz>);\n" + |
6526 |
" }\n" + |
7658 |
" }\n" + |
6527 |
"}\n"; |
7659 |
"}\n"; |
6528 |
|
7660 |
|
|
|
7661 |
String completeBehind = "zzz"; |
7662 |
int cursorLocation = str.indexOf("zzz") + completeBehind.length() - 1; |
7663 |
|
7664 |
String expectedCompletionNodeToString = "<CompleteOnName:zzz>"; |
7665 |
String expectedParentNodeToString = "c = ((a == b) ? a : <CompleteOnName:zzz>)"; |
7666 |
String completionIdentifier = "zzz"; |
7667 |
String expectedReplacedSource = "zzz"; |
7668 |
String expectedUnitDisplayString = |
7669 |
"package p;\n" + |
7670 |
"public class X {\n" + |
7671 |
" public X() {\n" + |
7672 |
" }\n" + |
7673 |
" void foo() {\n" + |
7674 |
" boolean a;\n" + |
7675 |
" boolean b;\n" + |
7676 |
" boolean c;\n" + |
7677 |
" c = ((a == b) ? a : <CompleteOnName:zzz>);\n" + |
7678 |
" }\n" + |
7679 |
"}\n"; |
7680 |
|
6529 |
checkMethodParse( |
7681 |
checkMethodParse( |
6530 |
str.toCharArray(), |
7682 |
str.toCharArray(), |
6531 |
cursorLocation, |
7683 |
cursorLocation, |
Lines 6536-6542
Link Here
|
6536 |
expectedReplacedSource, |
7688 |
expectedReplacedSource, |
6537 |
"full ast"); |
7689 |
"full ast"); |
6538 |
} |
7690 |
} |
6539 |
public void test0117(){ |
7691 |
public void test0117_Diet(){ |
6540 |
String str = |
7692 |
String str = |
6541 |
"package p;\n" + |
7693 |
"package p;\n" + |
6542 |
"public class X {\n" + |
7694 |
"public class X {\n" + |
Lines 6571-6594
Link Here
|
6571 |
completionIdentifier, |
7723 |
completionIdentifier, |
6572 |
expectedReplacedSource, |
7724 |
expectedReplacedSource, |
6573 |
"diet ast"); |
7725 |
"diet ast"); |
6574 |
|
7726 |
} |
6575 |
expectedCompletionNodeToString = "<CompleteOnName:zzz>"; |
7727 |
public void test0117_Method(){ |
6576 |
expectedParentNodeToString = "c = <CompleteOnName:zzz>"; |
7728 |
String str = |
6577 |
completionIdentifier = "zzz"; |
|
|
6578 |
expectedReplacedSource = "zzz"; |
6579 |
expectedUnitDisplayString = |
6580 |
"package p;\n" + |
7729 |
"package p;\n" + |
6581 |
"public class X {\n" + |
7730 |
"public class X {\n" + |
6582 |
" public X() {\n" + |
7731 |
" void foo(){\n" + |
6583 |
" }\n" + |
7732 |
" boolean a, b, c;\n" + |
6584 |
" void foo() {\n" + |
7733 |
" c = a == b ? a : (zzz\n" + |
6585 |
" boolean a;\n" + |
|
|
6586 |
" boolean b;\n" + |
6587 |
" boolean c;\n" + |
6588 |
" c = <CompleteOnName:zzz>;\n" + |
6589 |
" }\n" + |
7734 |
" }\n" + |
6590 |
"}\n"; |
7735 |
"}\n"; |
6591 |
|
7736 |
|
|
|
7737 |
String completeBehind = "zzz"; |
7738 |
int cursorLocation = str.indexOf("zzz") + completeBehind.length() - 1; |
7739 |
|
7740 |
String expectedCompletionNodeToString = "<CompleteOnName:zzz>"; |
7741 |
String expectedParentNodeToString = "c = <CompleteOnName:zzz>"; |
7742 |
String completionIdentifier = "zzz"; |
7743 |
String expectedReplacedSource = "zzz"; |
7744 |
String expectedUnitDisplayString = |
7745 |
"package p;\n" + |
7746 |
"public class X {\n" + |
7747 |
" public X() {\n" + |
7748 |
" }\n" + |
7749 |
" void foo() {\n" + |
7750 |
" boolean a;\n" + |
7751 |
" boolean b;\n" + |
7752 |
" boolean c;\n" + |
7753 |
" c = <CompleteOnName:zzz>;\n" + |
7754 |
" }\n" + |
7755 |
"}\n"; |
7756 |
|
6592 |
checkMethodParse( |
7757 |
checkMethodParse( |
6593 |
str.toCharArray(), |
7758 |
str.toCharArray(), |
6594 |
cursorLocation, |
7759 |
cursorLocation, |
Lines 6599-6605
Link Here
|
6599 |
expectedReplacedSource, |
7764 |
expectedReplacedSource, |
6600 |
"full ast"); |
7765 |
"full ast"); |
6601 |
} |
7766 |
} |
6602 |
public void test0118(){ |
7767 |
public void test0118_Diet(){ |
6603 |
String str = |
7768 |
String str = |
6604 |
"package p;\n" + |
7769 |
"package p;\n" + |
6605 |
"public class X {\n" + |
7770 |
"public class X {\n" + |
Lines 6634-6657
Link Here
|
6634 |
completionIdentifier, |
7799 |
completionIdentifier, |
6635 |
expectedReplacedSource, |
7800 |
expectedReplacedSource, |
6636 |
"diet ast"); |
7801 |
"diet ast"); |
6637 |
|
7802 |
} |
6638 |
expectedCompletionNodeToString = "<CompleteOnName:zzz>"; |
7803 |
public void test0118_Method(){ |
6639 |
expectedParentNodeToString = "<NONE>"; |
7804 |
String str = |
6640 |
completionIdentifier = "zzz"; |
|
|
6641 |
expectedReplacedSource = "zzz"; |
6642 |
expectedUnitDisplayString = |
6643 |
"package p;\n" + |
7805 |
"package p;\n" + |
6644 |
"public class X {\n" + |
7806 |
"public class X {\n" + |
6645 |
" public X() {\n" + |
7807 |
" void foo(){\n" + |
6646 |
" }\n" + |
7808 |
" boolean a, b, c;\n" + |
6647 |
" void foo() {\n" + |
7809 |
" c = a# == b ? a : zzz\n" + |
6648 |
" boolean a;\n" + |
|
|
6649 |
" boolean b;\n" + |
6650 |
" boolean c;\n" + |
6651 |
" <CompleteOnName:zzz>;\n" + |
6652 |
" }\n" + |
7810 |
" }\n" + |
6653 |
"}\n"; |
7811 |
"}\n"; |
6654 |
|
7812 |
|
|
|
7813 |
String completeBehind = "zzz"; |
7814 |
int cursorLocation = str.indexOf("zzz") + completeBehind.length() - 1; |
7815 |
|
7816 |
String expectedCompletionNodeToString = "<CompleteOnName:zzz>"; |
7817 |
String expectedParentNodeToString = "<NONE>"; |
7818 |
String completionIdentifier = "zzz"; |
7819 |
String expectedReplacedSource = "zzz"; |
7820 |
String expectedUnitDisplayString = |
7821 |
"package p;\n" + |
7822 |
"public class X {\n" + |
7823 |
" public X() {\n" + |
7824 |
" }\n" + |
7825 |
" void foo() {\n" + |
7826 |
" boolean a;\n" + |
7827 |
" boolean b;\n" + |
7828 |
" boolean c;\n" + |
7829 |
" <CompleteOnName:zzz>;\n" + |
7830 |
" }\n" + |
7831 |
"}\n"; |
7832 |
|
6655 |
checkMethodParse( |
7833 |
checkMethodParse( |
6656 |
str.toCharArray(), |
7834 |
str.toCharArray(), |
6657 |
cursorLocation, |
7835 |
cursorLocation, |
Lines 6662-6668
Link Here
|
6662 |
expectedReplacedSource, |
7840 |
expectedReplacedSource, |
6663 |
"full ast"); |
7841 |
"full ast"); |
6664 |
} |
7842 |
} |
6665 |
public void test0119(){ |
7843 |
public void test0119_Diet(){ |
6666 |
String str = |
7844 |
String str = |
6667 |
"public class X {\n" + |
7845 |
"public class X {\n" + |
6668 |
" void foo(){\n" + |
7846 |
" void foo(){\n" + |
Lines 6696-6722
Link Here
|
6696 |
completionIdentifier, |
7874 |
completionIdentifier, |
6697 |
expectedReplacedSource, |
7875 |
expectedReplacedSource, |
6698 |
"diet ast"); |
7876 |
"diet ast"); |
6699 |
|
7877 |
} |
6700 |
expectedCompletionNodeToString = "<CompleteOnName:zzz>"; |
7878 |
public void test0119_Method(){ |
6701 |
expectedParentNodeToString = |
7879 |
String str = |
6702 |
"switch (1) {\n" + |
7880 |
"public class X {\n" + |
6703 |
"case <CompleteOnName:zzz> : ;\n" + |
7881 |
" void foo(){\n" + |
6704 |
"}"; |
7882 |
" switch(1) {\n" + |
6705 |
completionIdentifier = "zzz"; |
7883 |
" case zzz\n" + |
6706 |
expectedReplacedSource = "zzz"; |
7884 |
" }\n" + |
6707 |
expectedUnitDisplayString = |
7885 |
" }\n" + |
6708 |
"public class X {\n" + |
|
|
6709 |
" public X() {\n" + |
6710 |
" }\n" + |
6711 |
" void foo() {\n" + |
6712 |
" {\n" + |
6713 |
" switch (1) {\n" + |
6714 |
" case <CompleteOnName:zzz> : ;\n" + |
6715 |
" }\n" + |
6716 |
" }\n" + |
6717 |
" }\n" + |
6718 |
"}\n"; |
7886 |
"}\n"; |
6719 |
|
7887 |
|
|
|
7888 |
String completeBehind = "zzz"; |
7889 |
int cursorLocation = str.indexOf("zzz") + completeBehind.length() - 1; |
7890 |
|
7891 |
String expectedCompletionNodeToString = "<CompleteOnName:zzz>"; |
7892 |
String expectedParentNodeToString = |
7893 |
"switch (1) {\n" + |
7894 |
"case <CompleteOnName:zzz> : ;\n" + |
7895 |
"}"; |
7896 |
String completionIdentifier = "zzz"; |
7897 |
String expectedReplacedSource = "zzz"; |
7898 |
String expectedUnitDisplayString = |
7899 |
"public class X {\n" + |
7900 |
" public X() {\n" + |
7901 |
" }\n" + |
7902 |
" void foo() {\n" + |
7903 |
" {\n" + |
7904 |
" switch (1) {\n" + |
7905 |
" case <CompleteOnName:zzz> : ;\n" + |
7906 |
" }\n" + |
7907 |
" }\n" + |
7908 |
" }\n" + |
7909 |
"}\n"; |
7910 |
|
6720 |
checkMethodParse( |
7911 |
checkMethodParse( |
6721 |
str.toCharArray(), |
7912 |
str.toCharArray(), |
6722 |
cursorLocation, |
7913 |
cursorLocation, |
Lines 6727-6733
Link Here
|
6727 |
expectedReplacedSource, |
7918 |
expectedReplacedSource, |
6728 |
"full ast"); |
7919 |
"full ast"); |
6729 |
} |
7920 |
} |
6730 |
public void test0120(){ |
7921 |
public void test0120_Diet(){ |
6731 |
String str = |
7922 |
String str = |
6732 |
"public class X {\n" + |
7923 |
"public class X {\n" + |
6733 |
" void foo(){\n" + |
7924 |
" void foo(){\n" + |
Lines 6762-6790
Link Here
|
6762 |
completionIdentifier, |
7953 |
completionIdentifier, |
6763 |
expectedReplacedSource, |
7954 |
expectedReplacedSource, |
6764 |
"diet ast"); |
7955 |
"diet ast"); |
6765 |
|
7956 |
} |
6766 |
expectedCompletionNodeToString = "<CompleteOnName:zzz>"; |
7957 |
public void test0120_Method(){ |
6767 |
expectedParentNodeToString = |
7958 |
String str = |
6768 |
"switch (1) {\n" + |
7959 |
"public class X {\n" + |
6769 |
"case Something : ;\n" + |
7960 |
" void foo(){\n" + |
6770 |
"case <CompleteOnName:zzz> : ;\n" + |
7961 |
" switch(1) {\n" + |
6771 |
"}"; |
7962 |
" case Something :\n" + |
6772 |
completionIdentifier = "zzz"; |
7963 |
" case zzz\n" + |
6773 |
expectedReplacedSource = "zzz"; |
7964 |
" }\n" + |
6774 |
expectedUnitDisplayString = |
7965 |
" }\n" + |
6775 |
"public class X {\n" + |
|
|
6776 |
" public X() {\n" + |
6777 |
" }\n" + |
6778 |
" void foo() {\n" + |
6779 |
" {\n" + |
6780 |
" switch (1) {\n" + |
6781 |
" case Something : ;\n" + |
6782 |
" case <CompleteOnName:zzz> : ;\n" + |
6783 |
" }\n" + |
6784 |
" }\n" + |
6785 |
" }\n" + |
6786 |
"}\n"; |
7966 |
"}\n"; |
6787 |
|
7967 |
|
|
|
7968 |
String completeBehind = "zzz"; |
7969 |
int cursorLocation = str.indexOf("zzz") + completeBehind.length() - 1; |
7970 |
|
7971 |
String expectedCompletionNodeToString = "<CompleteOnName:zzz>"; |
7972 |
String expectedParentNodeToString = |
7973 |
"switch (1) {\n" + |
7974 |
"case Something : ;\n" + |
7975 |
"case <CompleteOnName:zzz> : ;\n" + |
7976 |
"}"; |
7977 |
String completionIdentifier = "zzz"; |
7978 |
String expectedReplacedSource = "zzz"; |
7979 |
String expectedUnitDisplayString = |
7980 |
"public class X {\n" + |
7981 |
" public X() {\n" + |
7982 |
" }\n" + |
7983 |
" void foo() {\n" + |
7984 |
" {\n" + |
7985 |
" switch (1) {\n" + |
7986 |
" case Something : ;\n" + |
7987 |
" case <CompleteOnName:zzz> : ;\n" + |
7988 |
" }\n" + |
7989 |
" }\n" + |
7990 |
" }\n" + |
7991 |
"}\n"; |
7992 |
|
6788 |
checkMethodParse( |
7993 |
checkMethodParse( |
6789 |
str.toCharArray(), |
7994 |
str.toCharArray(), |
6790 |
cursorLocation, |
7995 |
cursorLocation, |
Lines 6795-6801
Link Here
|
6795 |
expectedReplacedSource, |
8000 |
expectedReplacedSource, |
6796 |
"full ast"); |
8001 |
"full ast"); |
6797 |
} |
8002 |
} |
6798 |
public void test0121(){ |
8003 |
public void test0121_Diet(){ |
6799 |
String str = |
8004 |
String str = |
6800 |
"public class X {\n" + |
8005 |
"public class X {\n" + |
6801 |
" void foo(){\n" + |
8006 |
" void foo(){\n" + |
Lines 6827-6846
Link Here
|
6827 |
completionIdentifier, |
8032 |
completionIdentifier, |
6828 |
expectedReplacedSource, |
8033 |
expectedReplacedSource, |
6829 |
"diet ast"); |
8034 |
"diet ast"); |
6830 |
|
8035 |
} |
6831 |
expectedCompletionNodeToString = "<CompleteOnName:zzz>"; |
8036 |
public void test0121_Method(){ |
6832 |
expectedParentNodeToString = "tab[<CompleteOnName:zzz>]"; |
8037 |
String str = |
6833 |
completionIdentifier = "zzz"; |
|
|
6834 |
expectedReplacedSource = "zzz"; |
6835 |
expectedUnitDisplayString = |
6836 |
"public class X {\n" + |
8038 |
"public class X {\n" + |
6837 |
" public X() {\n" + |
8039 |
" void foo(){\n" + |
6838 |
" }\n" + |
8040 |
" tab[zzz]\n" + |
6839 |
" void foo() {\n" + |
|
|
6840 |
" tab[<CompleteOnName:zzz>];\n" + |
6841 |
" }\n" + |
8041 |
" }\n" + |
6842 |
"}\n"; |
8042 |
"}\n"; |
6843 |
|
8043 |
|
|
|
8044 |
String completeBehind = "zzz"; |
8045 |
int cursorLocation = str.indexOf("zzz") + completeBehind.length() - 1; |
8046 |
|
8047 |
String expectedCompletionNodeToString = "<CompleteOnName:zzz>"; |
8048 |
String expectedParentNodeToString = "tab[<CompleteOnName:zzz>]"; |
8049 |
String completionIdentifier = "zzz"; |
8050 |
String expectedReplacedSource = "zzz"; |
8051 |
String expectedUnitDisplayString = |
8052 |
"public class X {\n" + |
8053 |
" public X() {\n" + |
8054 |
" }\n" + |
8055 |
" void foo() {\n" + |
8056 |
" tab[<CompleteOnName:zzz>];\n" + |
8057 |
" }\n" + |
8058 |
"}\n"; |
8059 |
|
6844 |
checkMethodParse( |
8060 |
checkMethodParse( |
6845 |
str.toCharArray(), |
8061 |
str.toCharArray(), |
6846 |
cursorLocation, |
8062 |
cursorLocation, |
Lines 6851-6857
Link Here
|
6851 |
expectedReplacedSource, |
8067 |
expectedReplacedSource, |
6852 |
"full ast"); |
8068 |
"full ast"); |
6853 |
} |
8069 |
} |
6854 |
public void test0122(){ |
8070 |
public void test0122_Diet(){ |
6855 |
String str = |
8071 |
String str = |
6856 |
"public class X {\n" + |
8072 |
"public class X {\n" + |
6857 |
" void foo(){\n" + |
8073 |
" void foo(){\n" + |
Lines 6883-6902
Link Here
|
6883 |
completionIdentifier, |
8099 |
completionIdentifier, |
6884 |
expectedReplacedSource, |
8100 |
expectedReplacedSource, |
6885 |
"diet ast"); |
8101 |
"diet ast"); |
6886 |
|
8102 |
} |
6887 |
expectedCompletionNodeToString = "<CompleteOnClassLiteralAccess:tab[].zzz>"; |
8103 |
public void test0122_Method(){ |
6888 |
expectedParentNodeToString = "<NONE>"; |
8104 |
String str = |
6889 |
completionIdentifier = "zzz"; |
|
|
6890 |
expectedReplacedSource = "tab[].zzz"; |
6891 |
expectedUnitDisplayString = |
6892 |
"public class X {\n" + |
8105 |
"public class X {\n" + |
6893 |
" public X() {\n" + |
8106 |
" void foo(){\n" + |
6894 |
" }\n" + |
8107 |
" tab[].zzz\n" + |
6895 |
" void foo() {\n" + |
|
|
6896 |
" <CompleteOnClassLiteralAccess:tab[].zzz>;\n" + |
6897 |
" }\n" + |
8108 |
" }\n" + |
6898 |
"}\n"; |
8109 |
"}\n"; |
6899 |
|
8110 |
|
|
|
8111 |
String completeBehind = "zzz"; |
8112 |
int cursorLocation = str.indexOf("zzz") + completeBehind.length() - 1; |
8113 |
|
8114 |
String expectedCompletionNodeToString = "<CompleteOnClassLiteralAccess:tab[].zzz>"; |
8115 |
String expectedParentNodeToString = "<NONE>"; |
8116 |
String completionIdentifier = "zzz"; |
8117 |
String expectedReplacedSource = "tab[].zzz"; |
8118 |
String expectedUnitDisplayString = |
8119 |
"public class X {\n" + |
8120 |
" public X() {\n" + |
8121 |
" }\n" + |
8122 |
" void foo() {\n" + |
8123 |
" <CompleteOnClassLiteralAccess:tab[].zzz>;\n" + |
8124 |
" }\n" + |
8125 |
"}\n"; |
8126 |
|
6900 |
checkMethodParse( |
8127 |
checkMethodParse( |
6901 |
str.toCharArray(), |
8128 |
str.toCharArray(), |
6902 |
cursorLocation, |
8129 |
cursorLocation, |
Lines 6907-6913
Link Here
|
6907 |
expectedReplacedSource, |
8134 |
expectedReplacedSource, |
6908 |
"full ast"); |
8135 |
"full ast"); |
6909 |
} |
8136 |
} |
6910 |
public void test0123(){ |
8137 |
public void test0123_Diet(){ |
6911 |
String str = |
8138 |
String str = |
6912 |
"public class X {\n" + |
8139 |
"public class X {\n" + |
6913 |
" void foo(){\n" + |
8140 |
" void foo(){\n" + |
Lines 6939-6958
Link Here
|
6939 |
completionIdentifier, |
8166 |
completionIdentifier, |
6940 |
expectedReplacedSource, |
8167 |
expectedReplacedSource, |
6941 |
"diet ast"); |
8168 |
"diet ast"); |
6942 |
|
8169 |
} |
6943 |
expectedCompletionNodeToString = "<CompleteOnMemberAccess:tab[0].zzz>"; |
8170 |
public void test0123_Method(){ |
6944 |
expectedParentNodeToString = "<NONE>"; |
8171 |
String str = |
6945 |
completionIdentifier = "zzz"; |
|
|
6946 |
expectedReplacedSource = "zzz"; |
6947 |
expectedUnitDisplayString = |
6948 |
"public class X {\n" + |
8172 |
"public class X {\n" + |
6949 |
" public X() {\n" + |
8173 |
" void foo(){\n" + |
6950 |
" }\n" + |
8174 |
" tab[0].zzz\n" + |
6951 |
" void foo() {\n" + |
|
|
6952 |
" <CompleteOnMemberAccess:tab[0].zzz>;\n" + |
6953 |
" }\n" + |
8175 |
" }\n" + |
6954 |
"}\n"; |
8176 |
"}\n"; |
6955 |
|
8177 |
|
|
|
8178 |
String completeBehind = "zzz"; |
8179 |
int cursorLocation = str.indexOf("zzz") + completeBehind.length() - 1; |
8180 |
|
8181 |
String expectedCompletionNodeToString = "<CompleteOnMemberAccess:tab[0].zzz>"; |
8182 |
String expectedParentNodeToString = "<NONE>"; |
8183 |
String completionIdentifier = "zzz"; |
8184 |
String expectedReplacedSource = "zzz"; |
8185 |
String expectedUnitDisplayString = |
8186 |
"public class X {\n" + |
8187 |
" public X() {\n" + |
8188 |
" }\n" + |
8189 |
" void foo() {\n" + |
8190 |
" <CompleteOnMemberAccess:tab[0].zzz>;\n" + |
8191 |
" }\n" + |
8192 |
"}\n"; |
8193 |
|
6956 |
checkMethodParse( |
8194 |
checkMethodParse( |
6957 |
str.toCharArray(), |
8195 |
str.toCharArray(), |
6958 |
cursorLocation, |
8196 |
cursorLocation, |
Lines 6963-6969
Link Here
|
6963 |
expectedReplacedSource, |
8201 |
expectedReplacedSource, |
6964 |
"full ast"); |
8202 |
"full ast"); |
6965 |
} |
8203 |
} |
6966 |
public void test0124(){ |
8204 |
public void test0124_Diet(){ |
6967 |
String str = |
8205 |
String str = |
6968 |
"public class X {\n" + |
8206 |
"public class X {\n" + |
6969 |
" void foo(){\n" + |
8207 |
" void foo(){\n" + |
Lines 6995-7014
Link Here
|
6995 |
completionIdentifier, |
8233 |
completionIdentifier, |
6996 |
expectedReplacedSource, |
8234 |
expectedReplacedSource, |
6997 |
"diet ast"); |
8235 |
"diet ast"); |
6998 |
|
8236 |
} |
6999 |
expectedCompletionNodeToString = "<CompleteOnName:zzz>"; |
8237 |
public void test0124_Method(){ |
7000 |
expectedParentNodeToString = "foo()[<CompleteOnName:zzz>]"; |
8238 |
String str = |
7001 |
completionIdentifier = "zzz"; |
|
|
7002 |
expectedReplacedSource = "zzz"; |
7003 |
expectedUnitDisplayString = |
7004 |
"public class X {\n" + |
8239 |
"public class X {\n" + |
7005 |
" public X() {\n" + |
8240 |
" void foo(){\n" + |
7006 |
" }\n" + |
8241 |
" foo()[zzz]\n" + |
7007 |
" void foo() {\n" + |
|
|
7008 |
" foo()[<CompleteOnName:zzz>];\n" + |
7009 |
" }\n" + |
8242 |
" }\n" + |
7010 |
"}\n"; |
8243 |
"}\n"; |
7011 |
|
8244 |
|
|
|
8245 |
String completeBehind = "zzz"; |
8246 |
int cursorLocation = str.indexOf("zzz") + completeBehind.length() - 1; |
8247 |
|
8248 |
String expectedCompletionNodeToString = "<CompleteOnName:zzz>"; |
8249 |
String expectedParentNodeToString = "foo()[<CompleteOnName:zzz>]"; |
8250 |
String completionIdentifier = "zzz"; |
8251 |
String expectedReplacedSource = "zzz"; |
8252 |
String expectedUnitDisplayString = |
8253 |
"public class X {\n" + |
8254 |
" public X() {\n" + |
8255 |
" }\n" + |
8256 |
" void foo() {\n" + |
8257 |
" foo()[<CompleteOnName:zzz>];\n" + |
8258 |
" }\n" + |
8259 |
"}\n"; |
8260 |
|
7012 |
checkMethodParse( |
8261 |
checkMethodParse( |
7013 |
str.toCharArray(), |
8262 |
str.toCharArray(), |
7014 |
cursorLocation, |
8263 |
cursorLocation, |
Lines 7019-7025
Link Here
|
7019 |
expectedReplacedSource, |
8268 |
expectedReplacedSource, |
7020 |
"full ast"); |
8269 |
"full ast"); |
7021 |
} |
8270 |
} |
7022 |
public void test0125(){ |
8271 |
public void test0125_Diet(){ |
7023 |
String str = |
8272 |
String str = |
7024 |
"public class X {\n" + |
8273 |
"public class X {\n" + |
7025 |
" void foo(){\n" + |
8274 |
" void foo(){\n" + |
Lines 7051-7070
Link Here
|
7051 |
completionIdentifier, |
8300 |
completionIdentifier, |
7052 |
expectedReplacedSource, |
8301 |
expectedReplacedSource, |
7053 |
"diet ast"); |
8302 |
"diet ast"); |
7054 |
|
8303 |
} |
7055 |
expectedCompletionNodeToString = "<CompleteOnName:zzz>"; |
8304 |
public void test0125_Method(){ |
7056 |
expectedParentNodeToString = "<NONE>"; |
8305 |
String str = |
7057 |
completionIdentifier = "zzz"; |
|
|
7058 |
expectedReplacedSource = "zzz"; |
7059 |
expectedUnitDisplayString = |
7060 |
"public class X {\n" + |
8306 |
"public class X {\n" + |
7061 |
" public X() {\n" + |
8307 |
" void foo(){\n" + |
7062 |
" }\n" + |
8308 |
" foo()[].zzz\n" + |
7063 |
" void foo() {\n" + |
|
|
7064 |
" <CompleteOnName:zzz>;\n" + |
7065 |
" }\n" + |
8309 |
" }\n" + |
7066 |
"}\n"; |
8310 |
"}\n"; |
7067 |
|
8311 |
|
|
|
8312 |
String completeBehind = "zzz"; |
8313 |
int cursorLocation = str.indexOf("zzz") + completeBehind.length() - 1; |
8314 |
|
8315 |
String expectedCompletionNodeToString = "<CompleteOnName:zzz>"; |
8316 |
String expectedParentNodeToString = "<NONE>"; |
8317 |
String completionIdentifier = "zzz"; |
8318 |
String expectedReplacedSource = "zzz"; |
8319 |
String expectedUnitDisplayString = |
8320 |
"public class X {\n" + |
8321 |
" public X() {\n" + |
8322 |
" }\n" + |
8323 |
" void foo() {\n" + |
8324 |
" <CompleteOnName:zzz>;\n" + |
8325 |
" }\n" + |
8326 |
"}\n"; |
8327 |
|
7068 |
checkMethodParse( |
8328 |
checkMethodParse( |
7069 |
str.toCharArray(), |
8329 |
str.toCharArray(), |
7070 |
cursorLocation, |
8330 |
cursorLocation, |
Lines 7075-7081
Link Here
|
7075 |
expectedReplacedSource, |
8335 |
expectedReplacedSource, |
7076 |
"full ast"); |
8336 |
"full ast"); |
7077 |
} |
8337 |
} |
7078 |
public void test0126(){ |
8338 |
public void test0126_Diet(){ |
7079 |
String str = |
8339 |
String str = |
7080 |
"public class X {\n" + |
8340 |
"public class X {\n" + |
7081 |
" void foo(){\n" + |
8341 |
" void foo(){\n" + |
Lines 7107-7126
Link Here
|
7107 |
completionIdentifier, |
8367 |
completionIdentifier, |
7108 |
expectedReplacedSource, |
8368 |
expectedReplacedSource, |
7109 |
"diet ast"); |
8369 |
"diet ast"); |
7110 |
|
8370 |
} |
7111 |
expectedCompletionNodeToString = "<CompleteOnMemberAccess:foo()[1].zzz>"; |
8371 |
public void test0126_Method(){ |
7112 |
expectedParentNodeToString = "<NONE>"; |
8372 |
String str = |
7113 |
completionIdentifier = "zzz"; |
|
|
7114 |
expectedReplacedSource = "zzz"; |
7115 |
expectedUnitDisplayString = |
7116 |
"public class X {\n" + |
8373 |
"public class X {\n" + |
7117 |
" public X() {\n" + |
8374 |
" void foo(){\n" + |
7118 |
" }\n" + |
8375 |
" foo()[1].zzz\n" + |
7119 |
" void foo() {\n" + |
|
|
7120 |
" <CompleteOnMemberAccess:foo()[1].zzz>;\n" + |
7121 |
" }\n" + |
8376 |
" }\n" + |
7122 |
"}\n"; |
8377 |
"}\n"; |
7123 |
|
8378 |
|
|
|
8379 |
String completeBehind = "zzz"; |
8380 |
int cursorLocation = str.indexOf("zzz") + completeBehind.length() - 1; |
8381 |
|
8382 |
String expectedCompletionNodeToString = "<CompleteOnMemberAccess:foo()[1].zzz>"; |
8383 |
String expectedParentNodeToString = "<NONE>"; |
8384 |
String completionIdentifier = "zzz"; |
8385 |
String expectedReplacedSource = "zzz"; |
8386 |
String expectedUnitDisplayString = |
8387 |
"public class X {\n" + |
8388 |
" public X() {\n" + |
8389 |
" }\n" + |
8390 |
" void foo() {\n" + |
8391 |
" <CompleteOnMemberAccess:foo()[1].zzz>;\n" + |
8392 |
" }\n" + |
8393 |
"}\n"; |
8394 |
|
7124 |
checkMethodParse( |
8395 |
checkMethodParse( |
7125 |
str.toCharArray(), |
8396 |
str.toCharArray(), |
7126 |
cursorLocation, |
8397 |
cursorLocation, |
Lines 7166-7172
Link Here
|
7166 |
expectedReplacedSource, |
8437 |
expectedReplacedSource, |
7167 |
"diet ast"); |
8438 |
"diet ast"); |
7168 |
} |
8439 |
} |
7169 |
public void test0128(){ |
8440 |
public void test0128_Diet(){ |
7170 |
String str = |
8441 |
String str = |
7171 |
"public class X {\n" + |
8442 |
"public class X {\n" + |
7172 |
" void foo(){\n" + |
8443 |
" void foo(){\n" + |
Lines 7202-7225
Link Here
|
7202 |
completionIdentifier, |
8473 |
completionIdentifier, |
7203 |
expectedReplacedSource, |
8474 |
expectedReplacedSource, |
7204 |
"diet ast"); |
8475 |
"diet ast"); |
7205 |
|
8476 |
} |
7206 |
expectedCompletionNodeToString = "<CompleteOnName:zzz>"; |
8477 |
public void test0128_Method(){ |
7207 |
expectedParentNodeToString = "a[<CompleteOnName:zzz>]"; |
8478 |
String str = |
7208 |
completionIdentifier = "zzz"; |
|
|
7209 |
expectedReplacedSource = "zzz"; |
7210 |
expectedUnitDisplayString = |
7211 |
"public class X {\n" + |
8479 |
"public class X {\n" + |
7212 |
" public X() {\n" + |
8480 |
" void foo(){\n" + |
7213 |
" }\n" + |
|
|
7214 |
" void foo() {\n" + |
7215 |
" new Object() {\n" + |
8481 |
" new Object() {\n" + |
7216 |
" void bar() {\n" + |
8482 |
" void bar() {\n" + |
7217 |
" a[<CompleteOnName:zzz>];\n" + |
8483 |
" a[zzz\n" + |
7218 |
" }\n" + |
8484 |
" }\n" + |
7219 |
" };\n" + |
8485 |
" }\n" + |
7220 |
" }\n" + |
8486 |
" }\n" + |
7221 |
"}\n"; |
8487 |
"}\n"; |
7222 |
|
8488 |
|
|
|
8489 |
String completeBehind = "zzz"; |
8490 |
int cursorLocation = str.indexOf("zzz") + completeBehind.length() - 1; |
8491 |
|
8492 |
String expectedCompletionNodeToString = "<CompleteOnName:zzz>"; |
8493 |
String expectedParentNodeToString = "a[<CompleteOnName:zzz>]"; |
8494 |
String completionIdentifier = "zzz"; |
8495 |
String expectedReplacedSource = "zzz"; |
8496 |
String expectedUnitDisplayString = |
8497 |
"public class X {\n" + |
8498 |
" public X() {\n" + |
8499 |
" }\n" + |
8500 |
" void foo() {\n" + |
8501 |
" new Object() {\n" + |
8502 |
" void bar() {\n" + |
8503 |
" a[<CompleteOnName:zzz>];\n" + |
8504 |
" }\n" + |
8505 |
" };\n" + |
8506 |
" }\n" + |
8507 |
"}\n"; |
8508 |
|
7223 |
checkMethodParse( |
8509 |
checkMethodParse( |
7224 |
str.toCharArray(), |
8510 |
str.toCharArray(), |
7225 |
cursorLocation, |
8511 |
cursorLocation, |
Lines 7230-7236
Link Here
|
7230 |
expectedReplacedSource, |
8516 |
expectedReplacedSource, |
7231 |
"full ast"); |
8517 |
"full ast"); |
7232 |
} |
8518 |
} |
7233 |
public void test0129(){ |
8519 |
public void test0129_Diet(){ |
7234 |
String str = |
8520 |
String str = |
7235 |
"public class X {\n" + |
8521 |
"public class X {\n" + |
7236 |
" void foo(){\n" + |
8522 |
" void foo(){\n" + |
Lines 7267-7288
Link Here
|
7267 |
completionIdentifier, |
8553 |
completionIdentifier, |
7268 |
expectedReplacedSource, |
8554 |
expectedReplacedSource, |
7269 |
"diet ast"); |
8555 |
"diet ast"); |
7270 |
|
8556 |
} |
7271 |
expectedCompletionNodeToString = "<CompleteOnName:zzz>"; |
8557 |
public void test0129_Method(){ |
7272 |
expectedParentNodeToString = "<NONE>"; |
8558 |
String str = |
7273 |
completionIdentifier = "zzz"; |
|
|
7274 |
expectedReplacedSource = "zzz"; |
7275 |
expectedUnitDisplayString = |
7276 |
"public class X {\n" + |
8559 |
"public class X {\n" + |
7277 |
" public X() {\n" + |
8560 |
" void foo(){\n" + |
7278 |
" }\n" + |
|
|
7279 |
" void foo() {\n" + |
7280 |
" Object local;\n" + |
8561 |
" Object local;\n" + |
7281 |
" double bar;\n" + |
8562 |
" double bar;\n" + |
7282 |
" <CompleteOnName:zzz>;\n" + |
8563 |
" for(;;) {\n" + |
|
|
8564 |
" bar = (double)0;\n" + |
8565 |
" }\n" + |
8566 |
" zzz\n" + |
7283 |
" }\n" + |
8567 |
" }\n" + |
7284 |
"}\n"; |
8568 |
"}\n"; |
7285 |
|
8569 |
|
|
|
8570 |
String completeBehind = "zzz"; |
8571 |
int cursorLocation = str.indexOf("zzz") + completeBehind.length() - 1; |
8572 |
|
8573 |
String expectedCompletionNodeToString = "<CompleteOnName:zzz>"; |
8574 |
String expectedParentNodeToString = "<NONE>"; |
8575 |
String completionIdentifier = "zzz"; |
8576 |
String expectedReplacedSource = "zzz"; |
8577 |
String expectedUnitDisplayString = |
8578 |
"public class X {\n" + |
8579 |
" public X() {\n" + |
8580 |
" }\n" + |
8581 |
" void foo() {\n" + |
8582 |
" Object local;\n" + |
8583 |
" double bar;\n" + |
8584 |
" <CompleteOnName:zzz>;\n" + |
8585 |
" }\n" + |
8586 |
"}\n"; |
8587 |
|
7286 |
checkMethodParse( |
8588 |
checkMethodParse( |
7287 |
str.toCharArray(), |
8589 |
str.toCharArray(), |
7288 |
cursorLocation, |
8590 |
cursorLocation, |
Lines 7296-7302
Link Here
|
7296 |
/* |
8598 |
/* |
7297 |
* https://bugs.eclipse.org/bugs/show_bug.cgi?id=42856 |
8599 |
* https://bugs.eclipse.org/bugs/show_bug.cgi?id=42856 |
7298 |
*/ |
8600 |
*/ |
7299 |
public void test0130(){ |
8601 |
public void test0130_Diet(){ |
7300 |
String str = |
8602 |
String str = |
7301 |
"public class X {\n" + |
8603 |
"public class X {\n" + |
7302 |
" void foo(){\n" + |
8604 |
" void foo(){\n" + |
Lines 7329-7349
Link Here
|
7329 |
completionIdentifier, |
8631 |
completionIdentifier, |
7330 |
expectedReplacedSource, |
8632 |
expectedReplacedSource, |
7331 |
"diet ast"); |
8633 |
"diet ast"); |
7332 |
|
8634 |
} |
7333 |
expectedCompletionNodeToString = "<CompleteOnMessageSend:zzz()>"; |
8635 |
/* |
7334 |
expectedParentNodeToString = "<NONE>"; |
8636 |
* https://bugs.eclipse.org/bugs/show_bug.cgi?id=42856 |
7335 |
completionIdentifier = ""; |
8637 |
*/ |
7336 |
expectedReplacedSource = "zzz("; |
8638 |
public void test0130_Method(){ |
7337 |
expectedUnitDisplayString = |
8639 |
String str = |
7338 |
"public class X {\n" + |
8640 |
"public class X {\n" + |
7339 |
" public X() {\n" + |
8641 |
" void foo(){\n" + |
7340 |
" }\n" + |
8642 |
" A.B c = null;\n" + |
7341 |
" void foo() {\n" + |
8643 |
" zzz();\n" + |
7342 |
" A.B c;\n" + |
8644 |
" }\n" + |
7343 |
" <CompleteOnMessageSend:zzz()>;\n" + |
|
|
7344 |
" }\n" + |
7345 |
"}\n"; |
8645 |
"}\n"; |
7346 |
|
8646 |
|
|
|
8647 |
String completeBehind = "zzz("; |
8648 |
int cursorLocation = str.indexOf("zzz(") + completeBehind.length() - 1; |
8649 |
|
8650 |
String expectedCompletionNodeToString = "<CompleteOnMessageSend:zzz()>"; |
8651 |
String expectedParentNodeToString = "<NONE>"; |
8652 |
String completionIdentifier = ""; |
8653 |
String expectedReplacedSource = "zzz("; |
8654 |
String expectedUnitDisplayString = |
8655 |
"public class X {\n" + |
8656 |
" public X() {\n" + |
8657 |
" }\n" + |
8658 |
" void foo() {\n" + |
8659 |
" A.B c;\n" + |
8660 |
" <CompleteOnMessageSend:zzz()>;\n" + |
8661 |
" }\n" + |
8662 |
"}\n"; |
8663 |
|
7347 |
checkMethodParse( |
8664 |
checkMethodParse( |
7348 |
str.toCharArray(), |
8665 |
str.toCharArray(), |
7349 |
cursorLocation, |
8666 |
cursorLocation, |
Lines 7357-7363
Link Here
|
7357 |
/* |
8674 |
/* |
7358 |
* https://bugs.eclipse.org/bugs/show_bug.cgi?id=42856 |
8675 |
* https://bugs.eclipse.org/bugs/show_bug.cgi?id=42856 |
7359 |
*/ |
8676 |
*/ |
7360 |
public void test0131(){ |
8677 |
public void test0131_Diet(){ |
7361 |
String str = |
8678 |
String str = |
7362 |
"public class X {\n" + |
8679 |
"public class X {\n" + |
7363 |
" void foo(){\n" + |
8680 |
" void foo(){\n" + |
Lines 7392-7414
Link Here
|
7392 |
completionIdentifier, |
8709 |
completionIdentifier, |
7393 |
expectedReplacedSource, |
8710 |
expectedReplacedSource, |
7394 |
"diet ast"); |
8711 |
"diet ast"); |
7395 |
|
8712 |
} |
7396 |
expectedCompletionNodeToString = "<CompleteOnMessageSend:zzz()>"; |
8713 |
/* |
7397 |
expectedParentNodeToString = "<NONE>"; |
8714 |
* https://bugs.eclipse.org/bugs/show_bug.cgi?id=42856 |
7398 |
completionIdentifier = ""; |
8715 |
*/ |
7399 |
expectedReplacedSource = "zzz("; |
8716 |
public void test0131_Method(){ |
7400 |
expectedUnitDisplayString = |
8717 |
String str = |
7401 |
"public class X {\n" + |
8718 |
"public class X {\n" + |
7402 |
" public X() {\n" + |
8719 |
" void foo(){\n" + |
7403 |
" }\n" + |
8720 |
" try {\n" + |
7404 |
" void foo() {\n" + |
8721 |
" } catch(A.B e) {\n" + |
7405 |
" {\n" + |
8722 |
" zzz();\n" + |
7406 |
" A.B e;\n" + |
8723 |
" }\n" + |
7407 |
" <CompleteOnMessageSend:zzz()>;\n" + |
8724 |
" }\n" + |
7408 |
" }\n" + |
|
|
7409 |
" }\n" + |
7410 |
"}\n"; |
8725 |
"}\n"; |
7411 |
|
8726 |
|
|
|
8727 |
String completeBehind = "zzz("; |
8728 |
int cursorLocation = str.indexOf("zzz(") + completeBehind.length() - 1; |
8729 |
|
8730 |
String expectedCompletionNodeToString = "<CompleteOnMessageSend:zzz()>"; |
8731 |
String expectedParentNodeToString = "<NONE>"; |
8732 |
String completionIdentifier = ""; |
8733 |
String expectedReplacedSource = "zzz("; |
8734 |
String expectedUnitDisplayString = |
8735 |
"public class X {\n" + |
8736 |
" public X() {\n" + |
8737 |
" }\n" + |
8738 |
" void foo() {\n" + |
8739 |
" {\n" + |
8740 |
" A.B e;\n" + |
8741 |
" <CompleteOnMessageSend:zzz()>;\n" + |
8742 |
" }\n" + |
8743 |
" }\n" + |
8744 |
"}\n"; |
8745 |
|
7412 |
checkMethodParse( |
8746 |
checkMethodParse( |
7413 |
str.toCharArray(), |
8747 |
str.toCharArray(), |
7414 |
cursorLocation, |
8748 |
cursorLocation, |
Lines 7422-7428
Link Here
|
7422 |
/* |
8756 |
/* |
7423 |
* https://bugs.eclipse.org/bugs/show_bug.cgi?id=44647 |
8757 |
* https://bugs.eclipse.org/bugs/show_bug.cgi?id=44647 |
7424 |
*/ |
8758 |
*/ |
7425 |
public void test0132(){ |
8759 |
public void test0132_Diet(){ |
7426 |
String str = |
8760 |
String str = |
7427 |
"public class A\n" + |
8761 |
"public class A\n" + |
7428 |
"{\n" + |
8762 |
"{\n" + |
Lines 7472-7495
Link Here
|
7472 |
completionIdentifier, |
8806 |
completionIdentifier, |
7473 |
expectedReplacedSource, |
8807 |
expectedReplacedSource, |
7474 |
"diet ast"); |
8808 |
"diet ast"); |
7475 |
|
8809 |
} |
7476 |
expectedCompletionNodeToString = "<CompleteOnName:>"; |
8810 |
/* |
7477 |
expectedParentNodeToString = "<NONE>"; |
8811 |
* https://bugs.eclipse.org/bugs/show_bug.cgi?id=44647 |
7478 |
completionIdentifier = ""; |
8812 |
*/ |
7479 |
expectedReplacedSource = ""; |
8813 |
public void test0132_Method(){ |
7480 |
expectedUnitDisplayString = |
8814 |
String str = |
7481 |
"public class A {\n" + |
8815 |
"public class A\n" + |
7482 |
" public A(final String str1, final String str2) {\n" + |
8816 |
"{\n" + |
7483 |
" }\n" + |
8817 |
" public A(final String str1, final String str2)\n" + |
7484 |
" private A[] methodA(final String str1, final String str2) {\n" + |
8818 |
" {\n" + |
7485 |
" new A(str1, str2) {\n" + |
8819 |
" \n" + |
7486 |
" {\n" + |
8820 |
" }\n" + |
7487 |
" <CompleteOnName:>;\n" + |
8821 |
" \n" + |
7488 |
" }\n" + |
8822 |
" private A[] methodA(final String str1, final String str2)\n" + |
7489 |
" };\n" + |
8823 |
" {\n" + |
7490 |
" }\n" + |
8824 |
" return new A[]\n" + |
|
|
8825 |
" {\n" + |
8826 |
" new A(str1, str2)\n" + |
8827 |
" {\n" + |
8828 |
" //initialiser!\n" + |
8829 |
" {\n" + |
8830 |
" methodA(\"1\", \"2\");\n" + |
8831 |
" }\n" + |
8832 |
" },\n" + |
8833 |
" new A(\"hello\".c) //<--------code complete to \"hello\".concat()\n" + |
8834 |
" };\n" + |
8835 |
" \n" + |
8836 |
" }\n" + |
7491 |
"}\n"; |
8837 |
"}\n"; |
7492 |
|
8838 |
|
|
|
8839 |
|
8840 |
String completeBehind = "\"2\");"; |
8841 |
int cursorLocation = str.indexOf("\"2\");") + completeBehind.length() - 1; |
8842 |
String expectedCompletionNodeToString = "<CompleteOnName:>"; |
8843 |
String expectedParentNodeToString = "<NONE>"; |
8844 |
String completionIdentifier = ""; |
8845 |
String expectedReplacedSource = ""; |
8846 |
String expectedUnitDisplayString = |
8847 |
"public class A {\n" + |
8848 |
" public A(final String str1, final String str2) {\n" + |
8849 |
" }\n" + |
8850 |
" private A[] methodA(final String str1, final String str2) {\n" + |
8851 |
" new A(str1, str2) {\n" + |
8852 |
" {\n" + |
8853 |
" <CompleteOnName:>;\n" + |
8854 |
" }\n" + |
8855 |
" };\n" + |
8856 |
" }\n" + |
8857 |
"}\n"; |
8858 |
|
7493 |
checkMethodParse( |
8859 |
checkMethodParse( |
7494 |
str.toCharArray(), |
8860 |
str.toCharArray(), |
7495 |
cursorLocation, |
8861 |
cursorLocation, |
Lines 7503-7509
Link Here
|
7503 |
/* |
8869 |
/* |
7504 |
* https://bugs.eclipse.org/bugs/show_bug.cgi?id=46470 |
8870 |
* https://bugs.eclipse.org/bugs/show_bug.cgi?id=46470 |
7505 |
*/ |
8871 |
*/ |
7506 |
public void test0133(){ |
8872 |
public void test0133_Diet(){ |
7507 |
String str = |
8873 |
String str = |
7508 |
"public class X {\n" + |
8874 |
"public class X {\n" + |
7509 |
" int x;\n" + |
8875 |
" int x;\n" + |
Lines 7541-7560
Link Here
|
7541 |
completionIdentifier, |
8907 |
completionIdentifier, |
7542 |
expectedReplacedSource, |
8908 |
expectedReplacedSource, |
7543 |
"diet ast"); |
8909 |
"diet ast"); |
|
|
8910 |
} |
8911 |
/* |
8912 |
* https://bugs.eclipse.org/bugs/show_bug.cgi?id=46470 |
8913 |
*/ |
8914 |
public void test0133_Method(){ |
8915 |
String str = |
8916 |
"public class X {\n" + |
8917 |
" int x;\n" + |
8918 |
" void foo() {\n" + |
8919 |
" switch(x){\n" + |
8920 |
" case 0:\n" + |
8921 |
" break;\n" + |
8922 |
" }\n" + |
8923 |
" bar\n" + |
8924 |
" }\n" + |
8925 |
"}\n"; |
7544 |
|
8926 |
|
7545 |
expectedCompletionNodeToString = "<CompleteOnName:bar>"; |
8927 |
|
7546 |
expectedParentNodeToString = "<NONE>"; |
8928 |
String completeBehind = "bar"; |
7547 |
completionIdentifier = "bar"; |
8929 |
int cursorLocation = str.indexOf("bar") + completeBehind.length() - 1; |
7548 |
expectedReplacedSource = "bar"; |
8930 |
String expectedCompletionNodeToString = "<CompleteOnName:bar>"; |
7549 |
expectedUnitDisplayString = |
8931 |
String expectedParentNodeToString = "<NONE>"; |
7550 |
"public class X {\n" + |
8932 |
String completionIdentifier = "bar"; |
7551 |
" int x;\n" + |
8933 |
String expectedReplacedSource = "bar"; |
7552 |
" public X() {\n" + |
8934 |
String expectedUnitDisplayString = |
7553 |
" }\n" + |
8935 |
"public class X {\n" + |
7554 |
" void foo() {\n" + |
8936 |
" int x;\n" + |
7555 |
" <CompleteOnName:bar>;\n" + |
8937 |
" public X() {\n" + |
7556 |
" }\n" + |
8938 |
" }\n" + |
7557 |
"}\n"; |
8939 |
" void foo() {\n" + |
|
|
8940 |
" <CompleteOnName:bar>;\n" + |
8941 |
" }\n" + |
8942 |
"}\n"; |
7558 |
|
8943 |
|
7559 |
checkMethodParse( |
8944 |
checkMethodParse( |
7560 |
str.toCharArray(), |
8945 |
str.toCharArray(), |
Lines 7616-7622
Link Here
|
7616 |
/* |
9001 |
/* |
7617 |
* https://bugs.eclipse.org/bugs/show_bug.cgi?id=43212 |
9002 |
* https://bugs.eclipse.org/bugs/show_bug.cgi?id=43212 |
7618 |
*/ |
9003 |
*/ |
7619 |
public void test0135(){ |
9004 |
public void test0135_Diet(){ |
7620 |
String str = |
9005 |
String str = |
7621 |
"public class X {\n" + |
9006 |
"public class X {\n" + |
7622 |
" void bar(){\n" + |
9007 |
" void bar(){\n" + |
Lines 7656-7683
Link Here
|
7656 |
completionIdentifier, |
9041 |
completionIdentifier, |
7657 |
expectedReplacedSource, |
9042 |
expectedReplacedSource, |
7658 |
"diet ast"); |
9043 |
"diet ast"); |
|
|
9044 |
} |
9045 |
/* |
9046 |
* https://bugs.eclipse.org/bugs/show_bug.cgi?id=43212 |
9047 |
*/ |
9048 |
public void test0135_Method(){ |
9049 |
String str = |
9050 |
"public class X {\n" + |
9051 |
" void bar(){\n" + |
9052 |
" #\n" + |
9053 |
" class Inner {\n" + |
9054 |
" void foo() {\n" + |
9055 |
" try {\n" + |
9056 |
" } catch(Exception e) {\n" + |
9057 |
" e.\n" + |
9058 |
" }\n" + |
9059 |
" }\n" + |
9060 |
" }\n" + |
9061 |
" }\n" + |
9062 |
"}\n"; |
7659 |
|
9063 |
|
7660 |
expectedCompletionNodeToString = "<CompleteOnName:e.>"; |
9064 |
|
7661 |
expectedParentNodeToString = "<NONE>"; |
9065 |
String completeBehind = "e."; |
7662 |
completionIdentifier = ""; |
9066 |
int cursorLocation = str.indexOf("e.") + completeBehind.length() - 1; |
7663 |
expectedReplacedSource = "e."; |
9067 |
String expectedCompletionNodeToString = "<CompleteOnName:e.>"; |
7664 |
expectedUnitDisplayString = |
9068 |
String expectedParentNodeToString = "<NONE>"; |
7665 |
"public class X {\n" + |
9069 |
String completionIdentifier = ""; |
7666 |
" public X() {\n" + |
9070 |
String expectedReplacedSource = "e."; |
7667 |
" }\n" + |
9071 |
String expectedUnitDisplayString = |
7668 |
" void bar() {\n" + |
9072 |
"public class X {\n" + |
7669 |
" class Inner {\n" + |
9073 |
" public X() {\n" + |
7670 |
" Inner() {\n" + |
9074 |
" }\n" + |
7671 |
" }\n" + |
9075 |
" void bar() {\n" + |
7672 |
" void foo() {\n" + |
9076 |
" class Inner {\n" + |
7673 |
" {\n" + |
9077 |
" Inner() {\n" + |
7674 |
" Exception e;\n" + |
9078 |
" }\n" + |
7675 |
" <CompleteOnName:e.>;\n" + |
9079 |
" void foo() {\n" + |
7676 |
" }\n" + |
9080 |
" {\n" + |
7677 |
" }\n" + |
9081 |
" Exception e;\n" + |
7678 |
" }\n" + |
9082 |
" <CompleteOnName:e.>;\n" + |
7679 |
" }\n" + |
9083 |
" }\n" + |
7680 |
"}\n"; |
9084 |
" }\n" + |
|
|
9085 |
" }\n" + |
9086 |
" }\n" + |
9087 |
"}\n"; |
7681 |
|
9088 |
|
7682 |
checkMethodParse( |
9089 |
checkMethodParse( |
7683 |
str.toCharArray(), |
9090 |
str.toCharArray(), |
Lines 7726-7732
Link Here
|
7726 |
/* |
9133 |
/* |
7727 |
* https://bugs.eclipse.org/bugs/show_bug.cgi?id=53624 |
9134 |
* https://bugs.eclipse.org/bugs/show_bug.cgi?id=53624 |
7728 |
*/ |
9135 |
*/ |
7729 |
public void test0137(){ |
9136 |
public void test0137_Diet(){ |
7730 |
String str = |
9137 |
String str = |
7731 |
"public class X {\n" + |
9138 |
"public class X {\n" + |
7732 |
" void foo(){\n" + |
9139 |
" void foo(){\n" + |
Lines 7762-7785
Link Here
|
7762 |
completionIdentifier, |
9169 |
completionIdentifier, |
7763 |
expectedReplacedSource, |
9170 |
expectedReplacedSource, |
7764 |
"diet ast"); |
9171 |
"diet ast"); |
7765 |
|
9172 |
} |
7766 |
expectedCompletionNodeToString = "<CompleteOnMessageSend:super.zzz()>"; |
9173 |
/* |
7767 |
expectedParentNodeToString = "<NONE>"; |
9174 |
* https://bugs.eclipse.org/bugs/show_bug.cgi?id=53624 |
7768 |
completionIdentifier = ""; |
9175 |
*/ |
7769 |
expectedReplacedSource = "zzz("; |
9176 |
public void test0137_Method(){ |
7770 |
expectedUnitDisplayString = |
9177 |
String str = |
7771 |
"public class X {\n" + |
9178 |
"public class X {\n" + |
7772 |
" public X() {\n" + |
9179 |
" void foo(){\n" + |
7773 |
" }\n" + |
9180 |
" new Object(){\n" + |
7774 |
" void foo() {\n" + |
9181 |
" void bar(){\n" + |
7775 |
" new Object() {\n" + |
9182 |
" super.zzz();\n" + |
7776 |
" void bar() {\n" + |
9183 |
" }\n" + |
7777 |
" <CompleteOnMessageSend:super.zzz()>;\n" + |
9184 |
" };\n" + |
7778 |
" }\n" + |
9185 |
" }\n" + |
7779 |
" };\n" + |
|
|
7780 |
" }\n" + |
7781 |
"}\n"; |
9186 |
"}\n"; |
7782 |
|
9187 |
|
|
|
9188 |
|
9189 |
String completeBehind = "zzz("; |
9190 |
int cursorLocation = str.indexOf("zzz(") + completeBehind.length() - 1; |
9191 |
String expectedCompletionNodeToString = "<CompleteOnMessageSend:super.zzz()>"; |
9192 |
String expectedParentNodeToString = "<NONE>"; |
9193 |
String completionIdentifier = ""; |
9194 |
String expectedReplacedSource = "zzz("; |
9195 |
String expectedUnitDisplayString = |
9196 |
"public class X {\n" + |
9197 |
" public X() {\n" + |
9198 |
" }\n" + |
9199 |
" void foo() {\n" + |
9200 |
" new Object() {\n" + |
9201 |
" void bar() {\n" + |
9202 |
" <CompleteOnMessageSend:super.zzz()>;\n" + |
9203 |
" }\n" + |
9204 |
" };\n" + |
9205 |
" }\n" + |
9206 |
"}\n"; |
9207 |
|
7783 |
checkMethodParse( |
9208 |
checkMethodParse( |
7784 |
str.toCharArray(), |
9209 |
str.toCharArray(), |
7785 |
cursorLocation, |
9210 |
cursorLocation, |
Lines 7793-7799
Link Here
|
7793 |
/* |
9218 |
/* |
7794 |
* https://bugs.eclipse.org/bugs/show_bug.cgi?id=41395 |
9219 |
* https://bugs.eclipse.org/bugs/show_bug.cgi?id=41395 |
7795 |
*/ |
9220 |
*/ |
7796 |
public void test0138(){ |
9221 |
public void test0138_Diet(){ |
7797 |
String str = |
9222 |
String str = |
7798 |
"public class X{\n" + |
9223 |
"public class X{\n" + |
7799 |
" public void foo() {\n" + |
9224 |
" public void foo() {\n" + |
Lines 7836-7862
Link Here
|
7836 |
completionIdentifier, |
9261 |
completionIdentifier, |
7837 |
expectedReplacedSource, |
9262 |
expectedReplacedSource, |
7838 |
"diet ast"); |
9263 |
"diet ast"); |
7839 |
|
9264 |
} |
7840 |
expectedCompletionNodeToString = "<CompleteOnFieldName:void to>;"; |
9265 |
/* |
7841 |
expectedParentNodeToString = "<NONE>"; |
9266 |
* https://bugs.eclipse.org/bugs/show_bug.cgi?id=41395 |
7842 |
completionIdentifier = "to"; |
9267 |
*/ |
7843 |
expectedReplacedSource = "toto"; |
9268 |
public void test0138_Method(){ |
7844 |
expectedUnitDisplayString = |
9269 |
String str = |
7845 |
"public class X {\n" + |
9270 |
"public class X{\n" + |
7846 |
" public X() {\n" + |
|
|
7847 |
" }\n" + |
7848 |
" public void foo() {\n" + |
9271 |
" public void foo() {\n" + |
7849 |
" new Y() {\n" + |
9272 |
" new Y() {\n" + |
7850 |
" public void bar() {\n" + |
9273 |
" public void bar() {\n" + |
|
|
9274 |
" switch (zzz){\n" + |
9275 |
" case 1 :\n" + |
9276 |
" };\n" + |
9277 |
" }\n" + |
7851 |
" new Z() {\n" + |
9278 |
" new Z() {\n" + |
7852 |
" <CompleteOnFieldName:void to>;\n" + |
9279 |
" public void toto() { \n" + |
7853 |
" {\n" + |
9280 |
" }\n" + |
7854 |
" }\n" + |
9281 |
" });\n" + |
7855 |
" };\n" + |
9282 |
" });\n" + |
7856 |
" }\n" + |
|
|
7857 |
" };\n" + |
7858 |
" }\n" + |
9283 |
" }\n" + |
7859 |
"}\n"; |
9284 |
"}\n" + |
|
|
9285 |
"\n"; |
9286 |
|
9287 |
|
9288 |
String completeBehind = "to"; |
9289 |
int cursorLocation = str.indexOf("to") + completeBehind.length() - 1; |
9290 |
String expectedCompletionNodeToString = "<CompleteOnFieldName:void to>;"; |
9291 |
String expectedParentNodeToString = "<NONE>"; |
9292 |
String completionIdentifier = "to"; |
9293 |
String expectedReplacedSource = "toto"; |
9294 |
String expectedUnitDisplayString = |
9295 |
"public class X {\n" + |
9296 |
" public X() {\n" + |
9297 |
" }\n" + |
9298 |
" public void foo() {\n" + |
9299 |
" new Y() {\n" + |
9300 |
" public void bar() {\n" + |
9301 |
" new Z() {\n" + |
9302 |
" <CompleteOnFieldName:void to>;\n" + |
9303 |
" {\n" + |
9304 |
" }\n" + |
9305 |
" };\n" + |
9306 |
" }\n" + |
9307 |
" };\n" + |
9308 |
" }\n" + |
9309 |
"}\n"; |
7860 |
|
9310 |
|
7861 |
checkMethodParse( |
9311 |
checkMethodParse( |
7862 |
str.toCharArray(), |
9312 |
str.toCharArray(), |
Lines 7992-7998
Link Here
|
7992 |
/* |
9442 |
/* |
7993 |
* https://bugs.eclipse.org/bugs/show_bug.cgi?id=39499 |
9443 |
* https://bugs.eclipse.org/bugs/show_bug.cgi?id=39499 |
7994 |
*/ |
9444 |
*/ |
7995 |
public void test0142(){ |
9445 |
public void test0142_Diet(){ |
7996 |
String str = |
9446 |
String str = |
7997 |
"public class X{\n" + |
9447 |
"public class X{\n" + |
7998 |
" public void foo() {\n" + |
9448 |
" public void foo() {\n" + |
Lines 8029-8051
Link Here
|
8029 |
completionIdentifier, |
9479 |
completionIdentifier, |
8030 |
expectedReplacedSource, |
9480 |
expectedReplacedSource, |
8031 |
"diet ast"); |
9481 |
"diet ast"); |
8032 |
|
9482 |
} |
8033 |
expectedCompletionNodeToString = "<CompleteOnKeyword:instanceof>"; |
9483 |
/* |
8034 |
expectedParentNodeToString = "<NONE>"; |
9484 |
* https://bugs.eclipse.org/bugs/show_bug.cgi?id=39499 |
8035 |
completionIdentifier = "instanceof"; |
9485 |
*/ |
8036 |
expectedReplacedSource = "instanceof"; |
9486 |
public void test0142_Method(){ |
8037 |
expectedUnitDisplayString = |
9487 |
String str = |
8038 |
"public class X {\n" + |
9488 |
"public class X{\n" + |
8039 |
" public X() {\n" + |
|
|
8040 |
" }\n" + |
8041 |
" public void foo() {\n" + |
9489 |
" public void foo() {\n" + |
8042 |
" new Object() {\n" + |
9490 |
" bar(new Object(){\n" + |
8043 |
" public void toto() {\n" + |
9491 |
" public void toto() {\n" + |
8044 |
" <CompleteOnKeyword:instanceof>;\n" + |
9492 |
" if(a instanceof Object) {}\n" + |
8045 |
" }\n" + |
9493 |
" }\n" + |
8046 |
" };\n" + |
9494 |
" });\n" + |
8047 |
" }\n" + |
9495 |
" }\n" + |
8048 |
"}\n"; |
9496 |
"}\n" + |
|
|
9497 |
"\n"; |
9498 |
|
9499 |
|
9500 |
String completeBehind = "instanceof"; |
9501 |
int cursorLocation = str.indexOf("instanceof") + completeBehind.length() - 1; |
9502 |
String expectedCompletionNodeToString = "<CompleteOnKeyword:instanceof>"; |
9503 |
String expectedParentNodeToString = "<NONE>"; |
9504 |
String completionIdentifier = "instanceof"; |
9505 |
String expectedReplacedSource = "instanceof"; |
9506 |
String expectedUnitDisplayString = |
9507 |
"public class X {\n" + |
9508 |
" public X() {\n" + |
9509 |
" }\n" + |
9510 |
" public void foo() {\n" + |
9511 |
" new Object() {\n" + |
9512 |
" public void toto() {\n" + |
9513 |
" <CompleteOnKeyword:instanceof>;\n" + |
9514 |
" }\n" + |
9515 |
" };\n" + |
9516 |
" }\n" + |
9517 |
"}\n"; |
8049 |
|
9518 |
|
8050 |
checkMethodParse( |
9519 |
checkMethodParse( |
8051 |
str.toCharArray(), |
9520 |
str.toCharArray(), |
Lines 8060-8066
Link Here
|
8060 |
/* |
9529 |
/* |
8061 |
* https://bugs.eclipse.org/bugs/show_bug.cgi?id=71702 |
9530 |
* https://bugs.eclipse.org/bugs/show_bug.cgi?id=71702 |
8062 |
*/ |
9531 |
*/ |
8063 |
public void test0143(){ |
9532 |
public void test0143_Diet(){ |
8064 |
String str = |
9533 |
String str = |
8065 |
"public class X{\n" + |
9534 |
"public class X{\n" + |
8066 |
" public void foo() {\n" + |
9535 |
" public void foo() {\n" + |
Lines 8094-8113
Link Here
|
8094 |
completionIdentifier, |
9563 |
completionIdentifier, |
8095 |
expectedReplacedSource, |
9564 |
expectedReplacedSource, |
8096 |
"diet ast"); |
9565 |
"diet ast"); |
8097 |
|
9566 |
} |
8098 |
expectedCompletionNodeToString = "<CompleteOnName:bar>"; |
9567 |
/* |
8099 |
expectedParentNodeToString = "<NONE>"; |
9568 |
* https://bugs.eclipse.org/bugs/show_bug.cgi?id=71702 |
8100 |
completionIdentifier = "bar"; |
9569 |
*/ |
8101 |
expectedReplacedSource = "bar"; |
9570 |
public void test0143_Method(){ |
8102 |
expectedUnitDisplayString = |
9571 |
String str = |
8103 |
"public class X {\n" + |
9572 |
"public class X{\n" + |
8104 |
" public X() {\n" + |
|
|
8105 |
" }\n" + |
8106 |
" public void foo() {\n" + |
9573 |
" public void foo() {\n" + |
8107 |
" Object o;\n" + |
9574 |
" Object o =(int) tmp;\n" + |
8108 |
" <CompleteOnName:bar>;\n" + |
9575 |
" bar\n" + |
8109 |
" }\n" + |
9576 |
" }\n" + |
8110 |
"}\n"; |
9577 |
"}\n" + |
|
|
9578 |
"\n"; |
9579 |
|
9580 |
|
9581 |
String completeBehind = "bar"; |
9582 |
int cursorLocation = str.indexOf("bar") + completeBehind.length() - 1; |
9583 |
String expectedCompletionNodeToString = "<CompleteOnName:bar>"; |
9584 |
String expectedParentNodeToString = "<NONE>"; |
9585 |
String completionIdentifier = "bar"; |
9586 |
String expectedReplacedSource = "bar"; |
9587 |
String expectedUnitDisplayString = |
9588 |
"public class X {\n" + |
9589 |
" public X() {\n" + |
9590 |
" }\n" + |
9591 |
" public void foo() {\n" + |
9592 |
" Object o;\n" + |
9593 |
" <CompleteOnName:bar>;\n" + |
9594 |
" }\n" + |
9595 |
"}\n"; |
8111 |
|
9596 |
|
8112 |
checkMethodParse( |
9597 |
checkMethodParse( |
8113 |
str.toCharArray(), |
9598 |
str.toCharArray(), |
Lines 8122-8128
Link Here
|
8122 |
/* |
9607 |
/* |
8123 |
* https://bugs.eclipse.org/bugs/show_bug.cgi?id=71702 |
9608 |
* https://bugs.eclipse.org/bugs/show_bug.cgi?id=71702 |
8124 |
*/ |
9609 |
*/ |
8125 |
public void test0144(){ |
9610 |
public void test0144_Diet(){ |
8126 |
String str = |
9611 |
String str = |
8127 |
"public class X{\n" + |
9612 |
"public class X{\n" + |
8128 |
" public void foo() {\n" + |
9613 |
" public void foo() {\n" + |
Lines 8156-8175
Link Here
|
8156 |
completionIdentifier, |
9641 |
completionIdentifier, |
8157 |
expectedReplacedSource, |
9642 |
expectedReplacedSource, |
8158 |
"diet ast"); |
9643 |
"diet ast"); |
8159 |
|
9644 |
} |
8160 |
expectedCompletionNodeToString = "<CompleteOnName:bar>"; |
9645 |
/* |
8161 |
expectedParentNodeToString = "<NONE>"; |
9646 |
* https://bugs.eclipse.org/bugs/show_bug.cgi?id=71702 |
8162 |
completionIdentifier = "bar"; |
9647 |
*/ |
8163 |
expectedReplacedSource = "bar"; |
9648 |
public void test0144_Method(){ |
8164 |
expectedUnitDisplayString = |
9649 |
String str = |
8165 |
"public class X {\n" + |
9650 |
"public class X{\n" + |
8166 |
" public X() {\n" + |
|
|
8167 |
" }\n" + |
8168 |
" public void foo() {\n" + |
9651 |
" public void foo() {\n" + |
8169 |
" Object o;\n" + |
9652 |
" Object o =(int[]) tmp;\n" + |
8170 |
" <CompleteOnName:bar>;\n" + |
9653 |
" bar\n" + |
8171 |
" }\n" + |
9654 |
" }\n" + |
8172 |
"}\n"; |
9655 |
"}\n" + |
|
|
9656 |
"\n"; |
9657 |
|
9658 |
|
9659 |
String completeBehind = "bar"; |
9660 |
int cursorLocation = str.indexOf("bar") + completeBehind.length() - 1; |
9661 |
String expectedCompletionNodeToString = "<CompleteOnName:bar>"; |
9662 |
String expectedParentNodeToString = "<NONE>"; |
9663 |
String completionIdentifier = "bar"; |
9664 |
String expectedReplacedSource = "bar"; |
9665 |
String expectedUnitDisplayString = |
9666 |
"public class X {\n" + |
9667 |
" public X() {\n" + |
9668 |
" }\n" + |
9669 |
" public void foo() {\n" + |
9670 |
" Object o;\n" + |
9671 |
" <CompleteOnName:bar>;\n" + |
9672 |
" }\n" + |
9673 |
"}\n"; |
8173 |
|
9674 |
|
8174 |
checkMethodParse( |
9675 |
checkMethodParse( |
8175 |
str.toCharArray(), |
9676 |
str.toCharArray(), |
Lines 8184-8190
Link Here
|
8184 |
/* |
9685 |
/* |
8185 |
* https://bugs.eclipse.org/bugs/show_bug.cgi?id=71702 |
9686 |
* https://bugs.eclipse.org/bugs/show_bug.cgi?id=71702 |
8186 |
*/ |
9687 |
*/ |
8187 |
public void test0145(){ |
9688 |
public void test0145_Diet(){ |
8188 |
String str = |
9689 |
String str = |
8189 |
"public class X{\n" + |
9690 |
"public class X{\n" + |
8190 |
" public void foo() {\n" + |
9691 |
" public void foo() {\n" + |
Lines 8218-8237
Link Here
|
8218 |
completionIdentifier, |
9719 |
completionIdentifier, |
8219 |
expectedReplacedSource, |
9720 |
expectedReplacedSource, |
8220 |
"diet ast"); |
9721 |
"diet ast"); |
8221 |
|
9722 |
} |
8222 |
expectedCompletionNodeToString = "<CompleteOnName:bar>"; |
9723 |
/* |
8223 |
expectedParentNodeToString = "<NONE>"; |
9724 |
* https://bugs.eclipse.org/bugs/show_bug.cgi?id=71702 |
8224 |
completionIdentifier = "bar"; |
9725 |
*/ |
8225 |
expectedReplacedSource = "bar"; |
9726 |
public void test0145_Method(){ |
8226 |
expectedUnitDisplayString = |
9727 |
String str = |
8227 |
"public class X {\n" + |
9728 |
"public class X{\n" + |
8228 |
" public X() {\n" + |
|
|
8229 |
" }\n" + |
8230 |
" public void foo() {\n" + |
9729 |
" public void foo() {\n" + |
8231 |
" Object o;\n" + |
9730 |
" Object o =(X) tmp;\n" + |
8232 |
" <CompleteOnName:bar>;\n" + |
9731 |
" bar\n" + |
8233 |
" }\n" + |
9732 |
" }\n" + |
8234 |
"}\n"; |
9733 |
"}\n" + |
|
|
9734 |
"\n"; |
9735 |
|
9736 |
|
9737 |
String completeBehind = "bar"; |
9738 |
int cursorLocation = str.indexOf("bar") + completeBehind.length() - 1; |
9739 |
String expectedCompletionNodeToString = "<CompleteOnName:bar>"; |
9740 |
String expectedParentNodeToString = "<NONE>"; |
9741 |
String completionIdentifier = "bar"; |
9742 |
String expectedReplacedSource = "bar"; |
9743 |
String expectedUnitDisplayString = |
9744 |
"public class X {\n" + |
9745 |
" public X() {\n" + |
9746 |
" }\n" + |
9747 |
" public void foo() {\n" + |
9748 |
" Object o;\n" + |
9749 |
" <CompleteOnName:bar>;\n" + |
9750 |
" }\n" + |
9751 |
"}\n"; |
8235 |
|
9752 |
|
8236 |
checkMethodParse( |
9753 |
checkMethodParse( |
8237 |
str.toCharArray(), |
9754 |
str.toCharArray(), |
Lines 8246-8252
Link Here
|
8246 |
/* |
9763 |
/* |
8247 |
* https://bugs.eclipse.org/bugs/show_bug.cgi?id=71702 |
9764 |
* https://bugs.eclipse.org/bugs/show_bug.cgi?id=71702 |
8248 |
*/ |
9765 |
*/ |
8249 |
public void test0146(){ |
9766 |
public void test0146_Diet(){ |
8250 |
String str = |
9767 |
String str = |
8251 |
"public class X{\n" + |
9768 |
"public class X{\n" + |
8252 |
" public void foo() {\n" + |
9769 |
" public void foo() {\n" + |
Lines 8280-8299
Link Here
|
8280 |
completionIdentifier, |
9797 |
completionIdentifier, |
8281 |
expectedReplacedSource, |
9798 |
expectedReplacedSource, |
8282 |
"diet ast"); |
9799 |
"diet ast"); |
8283 |
|
9800 |
} |
8284 |
expectedCompletionNodeToString = "<CompleteOnName:bar>"; |
9801 |
/* |
8285 |
expectedParentNodeToString = "<NONE>"; |
9802 |
* https://bugs.eclipse.org/bugs/show_bug.cgi?id=71702 |
8286 |
completionIdentifier = "bar"; |
9803 |
*/ |
8287 |
expectedReplacedSource = "bar"; |
9804 |
public void test0146_Method(){ |
8288 |
expectedUnitDisplayString = |
9805 |
String str = |
8289 |
"public class X {\n" + |
9806 |
"public class X{\n" + |
8290 |
" public X() {\n" + |
|
|
8291 |
" }\n" + |
8292 |
" public void foo() {\n" + |
9807 |
" public void foo() {\n" + |
8293 |
" Object o;\n" + |
9808 |
" Object o =(X[]) tmp;\n" + |
8294 |
" <CompleteOnName:bar>;\n" + |
9809 |
" bar\n" + |
8295 |
" }\n" + |
9810 |
" }\n" + |
8296 |
"}\n"; |
9811 |
"}\n" + |
|
|
9812 |
"\n"; |
9813 |
|
9814 |
|
9815 |
String completeBehind = "bar"; |
9816 |
int cursorLocation = str.indexOf("bar") + completeBehind.length() - 1; |
9817 |
String expectedCompletionNodeToString = "<CompleteOnName:bar>"; |
9818 |
String expectedParentNodeToString = "<NONE>"; |
9819 |
String completionIdentifier = "bar"; |
9820 |
String expectedReplacedSource = "bar"; |
9821 |
String expectedUnitDisplayString = |
9822 |
"public class X {\n" + |
9823 |
" public X() {\n" + |
9824 |
" }\n" + |
9825 |
" public void foo() {\n" + |
9826 |
" Object o;\n" + |
9827 |
" <CompleteOnName:bar>;\n" + |
9828 |
" }\n" + |
9829 |
"}\n"; |
8297 |
|
9830 |
|
8298 |
checkMethodParse( |
9831 |
checkMethodParse( |
8299 |
str.toCharArray(), |
9832 |
str.toCharArray(), |
Lines 8384-8390
Link Here
|
8384 |
/* |
9917 |
/* |
8385 |
* https://bugs.eclipse.org/bugs/show_bug.cgi?id=91371 |
9918 |
* https://bugs.eclipse.org/bugs/show_bug.cgi?id=91371 |
8386 |
*/ |
9919 |
*/ |
8387 |
public void test0149(){ |
9920 |
public void test0149_Diet(){ |
8388 |
String str = |
9921 |
String str = |
8389 |
"public class X{\n" + |
9922 |
"public class X{\n" + |
8390 |
" public void foo() {\n" + |
9923 |
" public void foo() {\n" + |
Lines 8418-8440
Link Here
|
8418 |
completionIdentifier, |
9951 |
completionIdentifier, |
8419 |
expectedReplacedSource, |
9952 |
expectedReplacedSource, |
8420 |
"diet ast"); |
9953 |
"diet ast"); |
8421 |
|
9954 |
} |
8422 |
expectedCompletionNodeToString = "<CompleteOnName:ZZ>"; |
9955 |
/* |
8423 |
expectedParentNodeToString = "(titi & <CompleteOnName:ZZ>)"; |
9956 |
* https://bugs.eclipse.org/bugs/show_bug.cgi?id=91371 |
8424 |
completionIdentifier = "ZZ"; |
9957 |
*/ |
8425 |
expectedReplacedSource = "ZZ"; |
9958 |
public void test0149_Method(){ |
8426 |
expectedUnitDisplayString = |
9959 |
String str = |
8427 |
"public class X {\n" + |
9960 |
"public class X{\n" + |
8428 |
" public X() {\n" + |
|
|
8429 |
" }\n" + |
8430 |
" public void foo() {\n" + |
9961 |
" public void foo() {\n" + |
8431 |
" new Object() {\n" + |
9962 |
" new Object(){\n" + |
8432 |
" void bar() {\n" + |
9963 |
" void bar(){\n" + |
8433 |
" (titi & <CompleteOnName:ZZ>);\n" + |
9964 |
" if((titi & (ZZ\n" + |
8434 |
" }\n" + |
9965 |
"}\n" + |
8435 |
" };\n" + |
9966 |
"\n"; |
8436 |
" }\n" + |
9967 |
|
8437 |
"}\n"; |
9968 |
|
|
|
9969 |
String completeBehind = "ZZ"; |
9970 |
int cursorLocation = str.indexOf("ZZ") + completeBehind.length() - 1; |
9971 |
String expectedCompletionNodeToString = "<CompleteOnName:ZZ>"; |
9972 |
String expectedParentNodeToString = "(titi & <CompleteOnName:ZZ>)"; |
9973 |
String completionIdentifier = "ZZ"; |
9974 |
String expectedReplacedSource = "ZZ"; |
9975 |
String expectedUnitDisplayString = |
9976 |
"public class X {\n" + |
9977 |
" public X() {\n" + |
9978 |
" }\n" + |
9979 |
" public void foo() {\n" + |
9980 |
" new Object() {\n" + |
9981 |
" void bar() {\n" + |
9982 |
" (titi & <CompleteOnName:ZZ>);\n" + |
9983 |
" }\n" + |
9984 |
" };\n" + |
9985 |
" }\n" + |
9986 |
"}\n"; |
8438 |
|
9987 |
|
8439 |
checkMethodParse( |
9988 |
checkMethodParse( |
8440 |
str.toCharArray(), |
9989 |
str.toCharArray(), |
Lines 8449-8455
Link Here
|
8449 |
/* |
9998 |
/* |
8450 |
* https://bugs.eclipse.org/bugs/show_bug.cgi?id=91371 |
9999 |
* https://bugs.eclipse.org/bugs/show_bug.cgi?id=91371 |
8451 |
*/ |
10000 |
*/ |
8452 |
public void test0150(){ |
10001 |
public void test0150_Diet(){ |
8453 |
String str = |
10002 |
String str = |
8454 |
"public class X{\n" + |
10003 |
"public class X{\n" + |
8455 |
" public void foo() {\n" + |
10004 |
" public void foo() {\n" + |
Lines 8481-8499
Link Here
|
8481 |
completionIdentifier, |
10030 |
completionIdentifier, |
8482 |
expectedReplacedSource, |
10031 |
expectedReplacedSource, |
8483 |
"diet ast"); |
10032 |
"diet ast"); |
8484 |
|
10033 |
} |
8485 |
expectedCompletionNodeToString = "<CompleteOnName:ZZ>"; |
10034 |
/* |
8486 |
expectedParentNodeToString = "(titi & <CompleteOnName:ZZ>)"; |
10035 |
* https://bugs.eclipse.org/bugs/show_bug.cgi?id=91371 |
8487 |
completionIdentifier = "ZZ"; |
10036 |
*/ |
8488 |
expectedReplacedSource = "ZZ"; |
10037 |
public void test0150_Method(){ |
8489 |
expectedUnitDisplayString = |
10038 |
String str = |
8490 |
"public class X {\n" + |
10039 |
"public class X{\n" + |
8491 |
" public X() {\n" + |
|
|
8492 |
" }\n" + |
8493 |
" public void foo() {\n" + |
10040 |
" public void foo() {\n" + |
8494 |
" (titi & <CompleteOnName:ZZ>);\n" + |
10041 |
" if((titi & (ZZ\n" + |
8495 |
" }\n" + |
10042 |
"}\n" + |
8496 |
"}\n"; |
10043 |
"\n"; |
|
|
10044 |
|
10045 |
|
10046 |
String completeBehind = "ZZ"; |
10047 |
int cursorLocation = str.indexOf("ZZ") + completeBehind.length() - 1; |
10048 |
String expectedCompletionNodeToString = "<CompleteOnName:ZZ>"; |
10049 |
String expectedParentNodeToString = "(titi & <CompleteOnName:ZZ>)"; |
10050 |
String completionIdentifier = "ZZ"; |
10051 |
String expectedReplacedSource = "ZZ"; |
10052 |
String expectedUnitDisplayString = |
10053 |
"public class X {\n" + |
10054 |
" public X() {\n" + |
10055 |
" }\n" + |
10056 |
" public void foo() {\n" + |
10057 |
" (titi & <CompleteOnName:ZZ>);\n" + |
10058 |
" }\n" + |
10059 |
"}\n"; |
8497 |
|
10060 |
|
8498 |
checkMethodParse( |
10061 |
checkMethodParse( |
8499 |
str.toCharArray(), |
10062 |
str.toCharArray(), |
Lines 8508-8514
Link Here
|
8508 |
/* |
10071 |
/* |
8509 |
* https://bugs.eclipse.org/bugs/show_bug.cgi?id=92451 |
10072 |
* https://bugs.eclipse.org/bugs/show_bug.cgi?id=92451 |
8510 |
*/ |
10073 |
*/ |
8511 |
public void test0151(){ |
10074 |
public void test0151_Diet(){ |
8512 |
String str = |
10075 |
String str = |
8513 |
"public class X {\n" + |
10076 |
"public class X {\n" + |
8514 |
" public static void main(String[] args) {\n" + |
10077 |
" public static void main(String[] args) {\n" + |
Lines 8542-8562
Link Here
|
8542 |
completionIdentifier, |
10105 |
completionIdentifier, |
8543 |
expectedReplacedSource, |
10106 |
expectedReplacedSource, |
8544 |
"diet ast"); |
10107 |
"diet ast"); |
8545 |
|
10108 |
} |
8546 |
expectedCompletionNodeToString = "<CompleteOnName:>"; |
10109 |
/* |
8547 |
expectedParentNodeToString = "<NONE>"; |
10110 |
* https://bugs.eclipse.org/bugs/show_bug.cgi?id=92451 |
8548 |
completionIdentifier = ""; |
10111 |
*/ |
8549 |
expectedReplacedSource = ""; |
10112 |
public void test0151_Method(){ |
8550 |
expectedUnitDisplayString = |
10113 |
String str = |
8551 |
"public class X {\n" + |
10114 |
"public class X {\n" + |
8552 |
" public X() {\n" + |
|
|
8553 |
" }\n" + |
8554 |
" public static void main(String[] args) {\n" + |
10115 |
" public static void main(String[] args) {\n" + |
8555 |
" java.util.List elements;\n" + |
10116 |
" java.util.List elements = null;\n" + |
8556 |
" <CompleteOnName:>;\n" + |
10117 |
" new Test(Test.toStrings((Test[])elements.toArray(new Test[0])));\n" + |
|
|
10118 |
" //code assist fails on this line\n" + |
8557 |
" }\n" + |
10119 |
" }\n" + |
8558 |
"}\n"; |
10120 |
"}\n"; |
8559 |
|
10121 |
|
|
|
10122 |
|
10123 |
String completeBehind = ""; |
10124 |
int cursorLocation = str.indexOf(" //code assis") + completeBehind.length() - 1; |
10125 |
String expectedCompletionNodeToString = "<CompleteOnName:>"; |
10126 |
String expectedParentNodeToString = "<NONE>"; |
10127 |
String completionIdentifier = ""; |
10128 |
String expectedReplacedSource = ""; |
10129 |
String expectedUnitDisplayString = |
10130 |
"public class X {\n" + |
10131 |
" public X() {\n" + |
10132 |
" }\n" + |
10133 |
" public static void main(String[] args) {\n" + |
10134 |
" java.util.List elements;\n" + |
10135 |
" <CompleteOnName:>;\n" + |
10136 |
" }\n" + |
10137 |
"}\n"; |
10138 |
|
8560 |
checkMethodParse( |
10139 |
checkMethodParse( |
8561 |
str.toCharArray(), |
10140 |
str.toCharArray(), |
8562 |
cursorLocation, |
10141 |
cursorLocation, |
Lines 8616-8622
Link Here
|
8616 |
/* |
10195 |
/* |
8617 |
* https://bugs.eclipse.org/bugs/show_bug.cgi?id=22072 |
10196 |
* https://bugs.eclipse.org/bugs/show_bug.cgi?id=22072 |
8618 |
*/ |
10197 |
*/ |
8619 |
public void test0153(){ |
10198 |
public void test0153_Diet(){ |
8620 |
String str = |
10199 |
String str = |
8621 |
"public class X {\n" + |
10200 |
"public class X {\n" + |
8622 |
" void foo() {\n" + |
10201 |
" void foo() {\n" + |
Lines 8650-8669
Link Here
|
8650 |
completionIdentifier, |
10229 |
completionIdentifier, |
8651 |
expectedReplacedSource, |
10230 |
expectedReplacedSource, |
8652 |
"diet ast"); |
10231 |
"diet ast"); |
8653 |
|
10232 |
} |
8654 |
expectedCompletionNodeToString = "break <CompleteOnLabel:lab>;"; |
10233 |
/* |
8655 |
expectedParentNodeToString = "<NONE>"; |
10234 |
* https://bugs.eclipse.org/bugs/show_bug.cgi?id=22072 |
8656 |
completionIdentifier = "lab"; |
10235 |
*/ |
8657 |
expectedReplacedSource = "lab"; |
10236 |
public void test0153_Method(){ |
8658 |
expectedUnitDisplayString = |
10237 |
String str = |
8659 |
"public class X {\n" + |
10238 |
"public class X {\n" + |
8660 |
" public X() {\n" + |
|
|
8661 |
" }\n" + |
8662 |
" void foo() {\n" + |
10239 |
" void foo() {\n" + |
8663 |
" break <CompleteOnLabel:lab>;\n" + |
10240 |
" label1 : for(;;) {\n" + |
|
|
10241 |
" break lab\n" + |
10242 |
" }\n" + |
8664 |
" }\n" + |
10243 |
" }\n" + |
8665 |
"}\n"; |
10244 |
"}\n"; |
8666 |
|
10245 |
|
|
|
10246 |
|
10247 |
String completeBehind = "lab"; |
10248 |
int cursorLocation = str.lastIndexOf("lab") + completeBehind.length() - 1; |
10249 |
String expectedCompletionNodeToString = "break <CompleteOnLabel:lab>;"; |
10250 |
String expectedParentNodeToString = "<NONE>"; |
10251 |
String completionIdentifier = "lab"; |
10252 |
String expectedReplacedSource = "lab"; |
10253 |
String expectedUnitDisplayString = |
10254 |
"public class X {\n" + |
10255 |
" public X() {\n" + |
10256 |
" }\n" + |
10257 |
" void foo() {\n" + |
10258 |
" break <CompleteOnLabel:lab>;\n" + |
10259 |
" }\n" + |
10260 |
"}\n"; |
10261 |
|
8667 |
checkMethodParse( |
10262 |
checkMethodParse( |
8668 |
str.toCharArray(), |
10263 |
str.toCharArray(), |
8669 |
cursorLocation, |
10264 |
cursorLocation, |
Lines 8677-8683
Link Here
|
8677 |
/* |
10272 |
/* |
8678 |
* https://bugs.eclipse.org/bugs/show_bug.cgi?id=22072 |
10273 |
* https://bugs.eclipse.org/bugs/show_bug.cgi?id=22072 |
8679 |
*/ |
10274 |
*/ |
8680 |
public void test0154(){ |
10275 |
public void test0154_Diet(){ |
8681 |
String str = |
10276 |
String str = |
8682 |
"public class X {\n" + |
10277 |
"public class X {\n" + |
8683 |
" void foo() {\n" + |
10278 |
" void foo() {\n" + |
Lines 8712-8733
Link Here
|
8712 |
completionIdentifier, |
10307 |
completionIdentifier, |
8713 |
expectedReplacedSource, |
10308 |
expectedReplacedSource, |
8714 |
"diet ast"); |
10309 |
"diet ast"); |
8715 |
|
10310 |
} |
8716 |
expectedCompletionNodeToString = "break <CompleteOnLabel:lab>;"; |
10311 |
/* |
8717 |
expectedParentNodeToString = "<NONE>"; |
10312 |
* https://bugs.eclipse.org/bugs/show_bug.cgi?id=22072 |
8718 |
completionIdentifier = "lab"; |
10313 |
*/ |
8719 |
expectedReplacedSource = "lab"; |
10314 |
public void test0154_Method(){ |
8720 |
expectedUnitDisplayString = |
10315 |
String str = |
8721 |
"public class X {\n" + |
10316 |
"public class X {\n" + |
8722 |
" public X() {\n" + |
|
|
8723 |
" }\n" + |
8724 |
" void foo() {\n" + |
10317 |
" void foo() {\n" + |
8725 |
" {\n" + |
10318 |
" #\n" + |
8726 |
" break <CompleteOnLabel:lab>;\n" + |
10319 |
" label1 : for(;;) {\n" + |
8727 |
" }\n" + |
10320 |
" break lab\n" + |
|
|
10321 |
" }\n" + |
8728 |
" }\n" + |
10322 |
" }\n" + |
8729 |
"}\n"; |
10323 |
"}\n"; |
8730 |
|
10324 |
|
|
|
10325 |
|
10326 |
String completeBehind = "lab"; |
10327 |
int cursorLocation = str.lastIndexOf("lab") + completeBehind.length() - 1; |
10328 |
String expectedCompletionNodeToString = "break <CompleteOnLabel:lab>;"; |
10329 |
String expectedParentNodeToString = "<NONE>"; |
10330 |
String completionIdentifier = "lab"; |
10331 |
String expectedReplacedSource = "lab"; |
10332 |
String expectedUnitDisplayString = |
10333 |
"public class X {\n" + |
10334 |
" public X() {\n" + |
10335 |
" }\n" + |
10336 |
" void foo() {\n" + |
10337 |
" {\n" + |
10338 |
" break <CompleteOnLabel:lab>;\n" + |
10339 |
" }\n" + |
10340 |
" }\n" + |
10341 |
"}\n"; |
10342 |
|
8731 |
checkMethodParse( |
10343 |
checkMethodParse( |
8732 |
str.toCharArray(), |
10344 |
str.toCharArray(), |
8733 |
cursorLocation, |
10345 |
cursorLocation, |
Lines 8741-8747
Link Here
|
8741 |
/* |
10353 |
/* |
8742 |
* https://bugs.eclipse.org/bugs/show_bug.cgi?id=22072 |
10354 |
* https://bugs.eclipse.org/bugs/show_bug.cgi?id=22072 |
8743 |
*/ |
10355 |
*/ |
8744 |
public void test0155(){ |
10356 |
public void test0155_Diet(){ |
8745 |
String str = |
10357 |
String str = |
8746 |
"public class X {\n" + |
10358 |
"public class X {\n" + |
8747 |
" void foo() {\n" + |
10359 |
" void foo() {\n" + |
Lines 8775-8794
Link Here
|
8775 |
completionIdentifier, |
10387 |
completionIdentifier, |
8776 |
expectedReplacedSource, |
10388 |
expectedReplacedSource, |
8777 |
"diet ast"); |
10389 |
"diet ast"); |
8778 |
|
10390 |
} |
8779 |
expectedCompletionNodeToString = "continue <CompleteOnLabel:lab>;"; |
10391 |
/* |
8780 |
expectedParentNodeToString = "<NONE>"; |
10392 |
* https://bugs.eclipse.org/bugs/show_bug.cgi?id=22072 |
8781 |
completionIdentifier = "lab"; |
10393 |
*/ |
8782 |
expectedReplacedSource = "lab"; |
10394 |
public void test0155_Method(){ |
8783 |
expectedUnitDisplayString = |
10395 |
String str = |
8784 |
"public class X {\n" + |
10396 |
"public class X {\n" + |
8785 |
" public X() {\n" + |
|
|
8786 |
" }\n" + |
8787 |
" void foo() {\n" + |
10397 |
" void foo() {\n" + |
8788 |
" continue <CompleteOnLabel:lab>;\n" + |
10398 |
" label1 : for(;;) {\n" + |
|
|
10399 |
" continue lab\n" + |
10400 |
" }\n" + |
8789 |
" }\n" + |
10401 |
" }\n" + |
8790 |
"}\n"; |
10402 |
"}\n"; |
8791 |
|
10403 |
|
|
|
10404 |
|
10405 |
String completeBehind = "lab"; |
10406 |
int cursorLocation = str.lastIndexOf("lab") + completeBehind.length() - 1; |
10407 |
String expectedCompletionNodeToString = "continue <CompleteOnLabel:lab>;"; |
10408 |
String expectedParentNodeToString = "<NONE>"; |
10409 |
String completionIdentifier = "lab"; |
10410 |
String expectedReplacedSource = "lab"; |
10411 |
String expectedUnitDisplayString = |
10412 |
"public class X {\n" + |
10413 |
" public X() {\n" + |
10414 |
" }\n" + |
10415 |
" void foo() {\n" + |
10416 |
" continue <CompleteOnLabel:lab>;\n" + |
10417 |
" }\n" + |
10418 |
"}\n"; |
10419 |
|
8792 |
checkMethodParse( |
10420 |
checkMethodParse( |
8793 |
str.toCharArray(), |
10421 |
str.toCharArray(), |
8794 |
cursorLocation, |
10422 |
cursorLocation, |
Lines 8802-8808
Link Here
|
8802 |
/* |
10430 |
/* |
8803 |
* https://bugs.eclipse.org/bugs/show_bug.cgi?id=22072 |
10431 |
* https://bugs.eclipse.org/bugs/show_bug.cgi?id=22072 |
8804 |
*/ |
10432 |
*/ |
8805 |
public void test0156(){ |
10433 |
public void test0156_Diet(){ |
8806 |
String str = |
10434 |
String str = |
8807 |
"public class X {\n" + |
10435 |
"public class X {\n" + |
8808 |
" void foo() {\n" + |
10436 |
" void foo() {\n" + |
Lines 8837-8858
Link Here
|
8837 |
completionIdentifier, |
10465 |
completionIdentifier, |
8838 |
expectedReplacedSource, |
10466 |
expectedReplacedSource, |
8839 |
"diet ast"); |
10467 |
"diet ast"); |
8840 |
|
10468 |
} |
8841 |
expectedCompletionNodeToString = "continue <CompleteOnLabel:lab>;"; |
10469 |
/* |
8842 |
expectedParentNodeToString = "<NONE>"; |
10470 |
* https://bugs.eclipse.org/bugs/show_bug.cgi?id=22072 |
8843 |
completionIdentifier = "lab"; |
10471 |
*/ |
8844 |
expectedReplacedSource = "lab"; |
10472 |
public void test0156_Method(){ |
8845 |
expectedUnitDisplayString = |
10473 |
String str = |
8846 |
"public class X {\n" + |
10474 |
"public class X {\n" + |
8847 |
" public X() {\n" + |
|
|
8848 |
" }\n" + |
8849 |
" void foo() {\n" + |
10475 |
" void foo() {\n" + |
8850 |
" {\n" + |
10476 |
" #\n" + |
8851 |
" continue <CompleteOnLabel:lab>;\n" + |
10477 |
" label1 : for(;;) {\n" + |
8852 |
" }\n" + |
10478 |
" continue lab\n" + |
|
|
10479 |
" }\n" + |
8853 |
" }\n" + |
10480 |
" }\n" + |
8854 |
"}\n"; |
10481 |
"}\n"; |
8855 |
|
10482 |
|
|
|
10483 |
|
10484 |
String completeBehind = "lab"; |
10485 |
int cursorLocation = str.lastIndexOf("lab") + completeBehind.length() - 1; |
10486 |
String expectedCompletionNodeToString = "continue <CompleteOnLabel:lab>;"; |
10487 |
String expectedParentNodeToString = "<NONE>"; |
10488 |
String completionIdentifier = "lab"; |
10489 |
String expectedReplacedSource = "lab"; |
10490 |
String expectedUnitDisplayString = |
10491 |
"public class X {\n" + |
10492 |
" public X() {\n" + |
10493 |
" }\n" + |
10494 |
" void foo() {\n" + |
10495 |
" {\n" + |
10496 |
" continue <CompleteOnLabel:lab>;\n" + |
10497 |
" }\n" + |
10498 |
" }\n" + |
10499 |
"}\n"; |
10500 |
|
8856 |
checkMethodParse( |
10501 |
checkMethodParse( |
8857 |
str.toCharArray(), |
10502 |
str.toCharArray(), |
8858 |
cursorLocation, |
10503 |
cursorLocation, |
Lines 8866-8872
Link Here
|
8866 |
/* |
10511 |
/* |
8867 |
* https://bugs.eclipse.org/bugs/show_bug.cgi?id=22072 |
10512 |
* https://bugs.eclipse.org/bugs/show_bug.cgi?id=22072 |
8868 |
*/ |
10513 |
*/ |
8869 |
public void test0157(){ |
10514 |
public void test0157_Diet(){ |
8870 |
String str = |
10515 |
String str = |
8871 |
"public class X {\n" + |
10516 |
"public class X {\n" + |
8872 |
" void foo() {\n" + |
10517 |
" void foo() {\n" + |
Lines 8906-8934
Link Here
|
8906 |
completionIdentifier, |
10551 |
completionIdentifier, |
8907 |
expectedReplacedSource, |
10552 |
expectedReplacedSource, |
8908 |
"diet ast"); |
10553 |
"diet ast"); |
8909 |
|
10554 |
} |
8910 |
expectedCompletionNodeToString = "continue <CompleteOnLabel:lab>;"; |
10555 |
/* |
8911 |
expectedParentNodeToString = "<NONE>"; |
10556 |
* https://bugs.eclipse.org/bugs/show_bug.cgi?id=22072 |
8912 |
completionIdentifier = "lab"; |
10557 |
*/ |
8913 |
expectedReplacedSource = "lab"; |
10558 |
public void test0157_Method(){ |
8914 |
expectedUnitDisplayString = |
10559 |
String str = |
8915 |
"public class X {\n" + |
10560 |
"public class X {\n" + |
8916 |
" public X() {\n" + |
|
|
8917 |
" }\n" + |
8918 |
" void foo() {\n" + |
10561 |
" void foo() {\n" + |
8919 |
" {\n" + |
10562 |
" #\n" + |
8920 |
" class X {\n" + |
10563 |
" label1 : for(;;) {\n" + |
8921 |
" X() {\n" + |
10564 |
" class X {\n" + |
8922 |
" super();\n" + |
10565 |
" void foo() {\n" + |
8923 |
" }\n" + |
10566 |
" label2 : for(;;) foo();\n" + |
8924 |
" void foo() {\n" + |
10567 |
" }\n" + |
8925 |
" }\n" + |
10568 |
" }\n" + |
8926 |
" }\n" + |
10569 |
" continue lab\n" + |
8927 |
" continue <CompleteOnLabel:lab>;\n" + |
10570 |
" }\n" + |
8928 |
" }\n" + |
|
|
8929 |
" }\n" + |
10571 |
" }\n" + |
8930 |
"}\n"; |
10572 |
"}\n"; |
8931 |
|
10573 |
|
|
|
10574 |
|
10575 |
String completeBehind = "lab"; |
10576 |
int cursorLocation = str.lastIndexOf("lab") + completeBehind.length() - 1; |
10577 |
String expectedCompletionNodeToString = "continue <CompleteOnLabel:lab>;"; |
10578 |
String expectedParentNodeToString = "<NONE>"; |
10579 |
String completionIdentifier = "lab"; |
10580 |
String expectedReplacedSource = "lab"; |
10581 |
String expectedUnitDisplayString = |
10582 |
"public class X {\n" + |
10583 |
" public X() {\n" + |
10584 |
" }\n" + |
10585 |
" void foo() {\n" + |
10586 |
" {\n" + |
10587 |
" class X {\n" + |
10588 |
" X() {\n" + |
10589 |
" super();\n" + |
10590 |
" }\n" + |
10591 |
" void foo() {\n" + |
10592 |
" }\n" + |
10593 |
" }\n" + |
10594 |
" continue <CompleteOnLabel:lab>;\n" + |
10595 |
" }\n" + |
10596 |
" }\n" + |
10597 |
"}\n"; |
10598 |
|
8932 |
checkMethodParse( |
10599 |
checkMethodParse( |
8933 |
str.toCharArray(), |
10600 |
str.toCharArray(), |
8934 |
cursorLocation, |
10601 |
cursorLocation, |
Lines 8942-8948
Link Here
|
8942 |
/* |
10609 |
/* |
8943 |
* https://bugs.eclipse.org/bugs/show_bug.cgi?id=22072 |
10610 |
* https://bugs.eclipse.org/bugs/show_bug.cgi?id=22072 |
8944 |
*/ |
10611 |
*/ |
8945 |
public void test0158(){ |
10612 |
public void test0158_Diet(){ |
8946 |
String str = |
10613 |
String str = |
8947 |
"public class X {\n" + |
10614 |
"public class X {\n" + |
8948 |
" void foo() {\n" + |
10615 |
" void foo() {\n" + |
Lines 8983-9012
Link Here
|
8983 |
completionIdentifier, |
10650 |
completionIdentifier, |
8984 |
expectedReplacedSource, |
10651 |
expectedReplacedSource, |
8985 |
"diet ast"); |
10652 |
"diet ast"); |
8986 |
|
10653 |
} |
8987 |
expectedCompletionNodeToString = "continue <CompleteOnLabel:lab>;"; |
10654 |
/* |
8988 |
expectedParentNodeToString = "<NONE>"; |
10655 |
* https://bugs.eclipse.org/bugs/show_bug.cgi?id=22072 |
8989 |
completionIdentifier = "lab"; |
10656 |
*/ |
8990 |
expectedReplacedSource = "lab"; |
10657 |
public void test0158_Method(){ |
8991 |
expectedUnitDisplayString = |
10658 |
String str = |
8992 |
"public class X {\n" + |
10659 |
"public class X {\n" + |
8993 |
" public X() {\n" + |
|
|
8994 |
" }\n" + |
8995 |
" void foo() {\n" + |
10660 |
" void foo() {\n" + |
8996 |
" {\n" + |
10661 |
" #\n" + |
8997 |
" class X {\n" + |
10662 |
" label1 : for(;;) {\n" + |
8998 |
" X() {\n" + |
10663 |
" class X {\n" + |
8999 |
" }\n" + |
10664 |
" void foo() {\n" + |
9000 |
" void foo() {\n" + |
10665 |
" label2 : for(;;) {\n" + |
9001 |
" {\n" + |
10666 |
" continue lab\n" + |
9002 |
" continue <CompleteOnLabel:lab>;\n" + |
10667 |
" }\n" + |
9003 |
" }\n" + |
10668 |
" }\n" + |
9004 |
" }\n" + |
10669 |
" }\n" + |
9005 |
" }\n" + |
10670 |
" }\n" + |
9006 |
" }\n" + |
|
|
9007 |
" }\n" + |
10671 |
" }\n" + |
9008 |
"}\n"; |
10672 |
"}\n"; |
9009 |
|
10673 |
|
|
|
10674 |
|
10675 |
String completeBehind = "lab"; |
10676 |
int cursorLocation = str.lastIndexOf("lab") + completeBehind.length() - 1; |
10677 |
String expectedCompletionNodeToString = "continue <CompleteOnLabel:lab>;"; |
10678 |
String expectedParentNodeToString = "<NONE>"; |
10679 |
String completionIdentifier = "lab"; |
10680 |
String expectedReplacedSource = "lab"; |
10681 |
String expectedUnitDisplayString = |
10682 |
"public class X {\n" + |
10683 |
" public X() {\n" + |
10684 |
" }\n" + |
10685 |
" void foo() {\n" + |
10686 |
" {\n" + |
10687 |
" class X {\n" + |
10688 |
" X() {\n" + |
10689 |
" }\n" + |
10690 |
" void foo() {\n" + |
10691 |
" {\n" + |
10692 |
" continue <CompleteOnLabel:lab>;\n" + |
10693 |
" }\n" + |
10694 |
" }\n" + |
10695 |
" }\n" + |
10696 |
" }\n" + |
10697 |
" }\n" + |
10698 |
"}\n"; |
10699 |
|
9010 |
checkMethodParse( |
10700 |
checkMethodParse( |
9011 |
str.toCharArray(), |
10701 |
str.toCharArray(), |
9012 |
cursorLocation, |
10702 |
cursorLocation, |
Lines 9191-9197
Link Here
|
9191 |
testName); |
10881 |
testName); |
9192 |
} |
10882 |
} |
9193 |
// https://bugs.eclipse.org/bugs/show_bug.cgi?id=122755 |
10883 |
// https://bugs.eclipse.org/bugs/show_bug.cgi?id=122755 |
9194 |
public void test0165() { |
10884 |
public void test0165_Diet() { |
9195 |
|
10885 |
|
9196 |
String str = |
10886 |
String str = |
9197 |
"public class X {\n" + |
10887 |
"public class X {\n" + |
Lines 9225-9243
Link Here
|
9225 |
completionIdentifier, |
10915 |
completionIdentifier, |
9226 |
expectedReplacedSource, |
10916 |
expectedReplacedSource, |
9227 |
"diet ast"); |
10917 |
"diet ast"); |
9228 |
|
10918 |
} |
9229 |
expectedCompletionNodeToString = "<CompleteOnName:>"; |
10919 |
// https://bugs.eclipse.org/bugs/show_bug.cgi?id=122755 |
9230 |
expectedParentNodeToString = "<NONE>"; |
10920 |
public void test0165_Method() { |
9231 |
completionIdentifier = ""; |
10921 |
|
9232 |
expectedReplacedSource = ""; |
10922 |
String str = |
9233 |
expectedUnitDisplayString = |
10923 |
"public class X {\n" + |
9234 |
"public class X {\n" + |
10924 |
" void foo() {" + |
9235 |
" public X() {\n" + |
10925 |
" /**" + |
9236 |
" }\n" + |
10926 |
" *" + |
9237 |
" void foo() {\n" + |
10927 |
" */." + |
9238 |
" <CompleteOnName:>;\n" + |
10928 |
" }" + |
9239 |
" }\n" + |
10929 |
"}\n"; |
9240 |
"}\n"; |
10930 |
|
|
|
10931 |
String completeBehind = "/."; |
10932 |
int cursorLocation = str.lastIndexOf("/.") + completeBehind.length() - 1; |
10933 |
String expectedCompletionNodeToString = "<CompleteOnName:>"; |
10934 |
String expectedParentNodeToString = "<NONE>"; |
10935 |
String completionIdentifier = ""; |
10936 |
String expectedReplacedSource = ""; |
10937 |
String expectedUnitDisplayString = |
10938 |
"public class X {\n" + |
10939 |
" public X() {\n" + |
10940 |
" }\n" + |
10941 |
" void foo() {\n" + |
10942 |
" <CompleteOnName:>;\n" + |
10943 |
" }\n" + |
10944 |
"}\n"; |
9241 |
|
10945 |
|
9242 |
checkMethodParse( |
10946 |
checkMethodParse( |
9243 |
str.toCharArray(), |
10947 |
str.toCharArray(), |
Lines 9250-9256
Link Here
|
9250 |
"full ast"); |
10954 |
"full ast"); |
9251 |
} |
10955 |
} |
9252 |
// https://bugs.eclipse.org/bugs/show_bug.cgi?id=137623 |
10956 |
// https://bugs.eclipse.org/bugs/show_bug.cgi?id=137623 |
9253 |
public void test0166() { |
10957 |
public void test0166_Diet() { |
9254 |
|
10958 |
|
9255 |
String str = |
10959 |
String str = |
9256 |
"public class X {\n" + |
10960 |
"public class X {\n" + |
Lines 9285-9303
Link Here
|
9285 |
completionIdentifier, |
10989 |
completionIdentifier, |
9286 |
expectedReplacedSource, |
10990 |
expectedReplacedSource, |
9287 |
"diet ast"); |
10991 |
"diet ast"); |
9288 |
|
10992 |
} |
9289 |
expectedCompletionNodeToString = "<CompleteOnClassLiteralAccess:int.>"; |
10993 |
// https://bugs.eclipse.org/bugs/show_bug.cgi?id=137623 |
9290 |
expectedParentNodeToString = "<NONE>"; |
10994 |
public void test0166_Method() { |
9291 |
completionIdentifier = ""; |
10995 |
|
9292 |
expectedReplacedSource = "int."; |
10996 |
String str = |
9293 |
expectedUnitDisplayString = |
10997 |
"public class X {\n" + |
9294 |
"public class X {\n" + |
10998 |
" public boolean foo() {\n" + |
9295 |
" public X() {\n" + |
10999 |
" if(this.equals(null))\n" + |
9296 |
" }\n" + |
11000 |
" {\n" + |
9297 |
" public boolean foo() {\n" + |
11001 |
" (zzz==int.\n" + |
9298 |
" <CompleteOnClassLiteralAccess:int.>;\n" + |
11002 |
" }\n" + |
9299 |
" }\n" + |
11003 |
" }" + |
9300 |
"}\n"; |
11004 |
"}\n"; |
|
|
11005 |
|
11006 |
String completeBehind = "int."; |
11007 |
int cursorLocation = str.lastIndexOf("int.") + completeBehind.length() - 1; |
11008 |
String expectedCompletionNodeToString = "<CompleteOnClassLiteralAccess:int.>"; |
11009 |
String expectedParentNodeToString = "<NONE>"; |
11010 |
String completionIdentifier = ""; |
11011 |
String expectedReplacedSource = "int."; |
11012 |
String expectedUnitDisplayString = |
11013 |
"public class X {\n" + |
11014 |
" public X() {\n" + |
11015 |
" }\n" + |
11016 |
" public boolean foo() {\n" + |
11017 |
" <CompleteOnClassLiteralAccess:int.>;\n" + |
11018 |
" }\n" + |
11019 |
"}\n"; |
9301 |
|
11020 |
|
9302 |
checkMethodParse( |
11021 |
checkMethodParse( |
9303 |
str.toCharArray(), |
11022 |
str.toCharArray(), |
Lines 9310-9316
Link Here
|
9310 |
"full ast"); |
11029 |
"full ast"); |
9311 |
} |
11030 |
} |
9312 |
//https://bugs.eclipse.org/bugs/show_bug.cgi?id=157584 |
11031 |
//https://bugs.eclipse.org/bugs/show_bug.cgi?id=157584 |
9313 |
public void test0167() { |
11032 |
public void test0167_Diet() { |
9314 |
|
11033 |
|
9315 |
String str = |
11034 |
String str = |
9316 |
"public class X {\n" + |
11035 |
"public class X {\n" + |
Lines 9349-9382
Link Here
|
9349 |
completionIdentifier, |
11068 |
completionIdentifier, |
9350 |
expectedReplacedSource, |
11069 |
expectedReplacedSource, |
9351 |
"diet ast"); |
11070 |
"diet ast"); |
9352 |
|
11071 |
} |
9353 |
expectedCompletionNodeToString = "<CompleteOnException:IZZ>"; |
11072 |
//https://bugs.eclipse.org/bugs/show_bug.cgi?id=157584 |
9354 |
expectedParentNodeToString = |
11073 |
public void test0167_Method() { |
9355 |
"try \n" + |
11074 |
|
9356 |
" {\n" + |
11075 |
String str = |
9357 |
" throwing();\n" + |
11076 |
"public class X {\n" + |
9358 |
" }\n" + |
11077 |
" public boolean foo() {\n" + |
9359 |
"catch (IllegalAccessException e) {\n" + |
11078 |
" try {\n" + |
9360 |
" }\n" + |
11079 |
" throwing();\n" + |
9361 |
"catch (<CompleteOnException:IZZ> ) {\n" + |
11080 |
" }\n" + |
9362 |
" }"; |
11081 |
" catch (IllegalAccessException e) {\n" + |
9363 |
completionIdentifier = "IZZ"; |
11082 |
" bar();\n" + |
9364 |
expectedReplacedSource = "IZZ"; |
11083 |
" }\n" + |
9365 |
expectedUnitDisplayString = |
11084 |
" catch (IZZ) {\n" + |
9366 |
"public class X {\n" + |
11085 |
" }\n" + |
9367 |
" public X() {\n" + |
11086 |
" }" + |
9368 |
" }\n" + |
11087 |
"}\n"; |
9369 |
" public boolean foo() {\n" + |
11088 |
|
9370 |
" try \n" + |
11089 |
String completeBehind = "IZZ"; |
9371 |
" {\n" + |
11090 |
int cursorLocation = str.lastIndexOf("IZZ") + completeBehind.length() - 1; |
9372 |
" throwing();\n" + |
11091 |
String expectedCompletionNodeToString = "<CompleteOnException:IZZ>"; |
9373 |
" }\n" + |
11092 |
String expectedParentNodeToString = |
9374 |
" catch (IllegalAccessException e) {\n" + |
11093 |
"try \n" + |
9375 |
" }\n" + |
11094 |
" {\n" + |
9376 |
" catch (<CompleteOnException:IZZ> ) {\n" + |
11095 |
" throwing();\n" + |
9377 |
" }\n" + |
11096 |
" }\n" + |
9378 |
" }\n" + |
11097 |
"catch (IllegalAccessException e) {\n" + |
9379 |
"}\n"; |
11098 |
" }\n" + |
|
|
11099 |
"catch (<CompleteOnException:IZZ> ) {\n" + |
11100 |
" }"; |
11101 |
String completionIdentifier = "IZZ"; |
11102 |
String expectedReplacedSource = "IZZ"; |
11103 |
String expectedUnitDisplayString = |
11104 |
"public class X {\n" + |
11105 |
" public X() {\n" + |
11106 |
" }\n" + |
11107 |
" public boolean foo() {\n" + |
11108 |
" try \n" + |
11109 |
" {\n" + |
11110 |
" throwing();\n" + |
11111 |
" }\n" + |
11112 |
" catch (IllegalAccessException e) {\n" + |
11113 |
" }\n" + |
11114 |
" catch (<CompleteOnException:IZZ> ) {\n" + |
11115 |
" }\n" + |
11116 |
" }\n" + |
11117 |
"}\n"; |
9380 |
|
11118 |
|
9381 |
checkMethodParse( |
11119 |
checkMethodParse( |
9382 |
str.toCharArray(), |
11120 |
str.toCharArray(), |
Lines 9389-9395
Link Here
|
9389 |
"full ast"); |
11127 |
"full ast"); |
9390 |
} |
11128 |
} |
9391 |
//https://bugs.eclipse.org/bugs/show_bug.cgi?id=157584 |
11129 |
//https://bugs.eclipse.org/bugs/show_bug.cgi?id=157584 |
9392 |
public void test0168() { |
11130 |
public void test0168_Diet() { |
9393 |
|
11131 |
|
9394 |
String str = |
11132 |
String str = |
9395 |
"public class X {\n" + |
11133 |
"public class X {\n" + |
Lines 9427-9460
Link Here
|
9427 |
completionIdentifier, |
11165 |
completionIdentifier, |
9428 |
expectedReplacedSource, |
11166 |
expectedReplacedSource, |
9429 |
"diet ast"); |
11167 |
"diet ast"); |
9430 |
|
11168 |
} |
9431 |
expectedCompletionNodeToString = "<CompleteOnException:IZZ>"; |
11169 |
//https://bugs.eclipse.org/bugs/show_bug.cgi?id=157584 |
9432 |
expectedParentNodeToString = |
11170 |
public void test0168_Method() { |
9433 |
"try \n" + |
11171 |
|
9434 |
" {\n" + |
11172 |
String str = |
9435 |
" throwing();\n" + |
11173 |
"public class X {\n" + |
9436 |
" }\n" + |
11174 |
" public boolean foo() {\n" + |
9437 |
"catch (IllegalAccessException e) {\n" + |
11175 |
" try {\n" + |
9438 |
" }\n" + |
11176 |
" throwing();\n" + |
9439 |
"catch (<CompleteOnException:IZZ> ) {\n" + |
11177 |
" }\n" + |
9440 |
" }"; |
11178 |
" catch (IllegalAccessException e) {\n" + |
9441 |
completionIdentifier = "IZZ"; |
11179 |
" bar();\n" + |
9442 |
expectedReplacedSource = "IZZ"; |
11180 |
" }\n" + |
9443 |
expectedUnitDisplayString = |
11181 |
" catch (IZZ\n" + |
9444 |
"public class X {\n" + |
11182 |
" }" + |
9445 |
" public X() {\n" + |
11183 |
"}\n"; |
9446 |
" }\n" + |
11184 |
|
9447 |
" public boolean foo() {\n" + |
11185 |
String completeBehind = "IZZ"; |
9448 |
" try \n" + |
11186 |
int cursorLocation = str.lastIndexOf("IZZ") + completeBehind.length() - 1; |
9449 |
" {\n" + |
11187 |
String expectedCompletionNodeToString = "<CompleteOnException:IZZ>"; |
9450 |
" throwing();\n" + |
11188 |
String expectedParentNodeToString = |
9451 |
" }\n" + |
11189 |
"try \n" + |
9452 |
" catch (IllegalAccessException e) {\n" + |
11190 |
" {\n" + |
9453 |
" }\n" + |
11191 |
" throwing();\n" + |
9454 |
" catch (<CompleteOnException:IZZ> ) {\n" + |
11192 |
" }\n" + |
9455 |
" }\n" + |
11193 |
"catch (IllegalAccessException e) {\n" + |
9456 |
" }\n" + |
11194 |
" }\n" + |
9457 |
"}\n"; |
11195 |
"catch (<CompleteOnException:IZZ> ) {\n" + |
|
|
11196 |
" }"; |
11197 |
String completionIdentifier = "IZZ"; |
11198 |
String expectedReplacedSource = "IZZ"; |
11199 |
String expectedUnitDisplayString = |
11200 |
"public class X {\n" + |
11201 |
" public X() {\n" + |
11202 |
" }\n" + |
11203 |
" public boolean foo() {\n" + |
11204 |
" try \n" + |
11205 |
" {\n" + |
11206 |
" throwing();\n" + |
11207 |
" }\n" + |
11208 |
" catch (IllegalAccessException e) {\n" + |
11209 |
" }\n" + |
11210 |
" catch (<CompleteOnException:IZZ> ) {\n" + |
11211 |
" }\n" + |
11212 |
" }\n" + |
11213 |
"}\n"; |
9458 |
|
11214 |
|
9459 |
checkMethodParse( |
11215 |
checkMethodParse( |
9460 |
str.toCharArray(), |
11216 |
str.toCharArray(), |
Lines 9467-9473
Link Here
|
9467 |
"full ast"); |
11223 |
"full ast"); |
9468 |
} |
11224 |
} |
9469 |
//https://bugs.eclipse.org/bugs/show_bug.cgi?id=157584 |
11225 |
//https://bugs.eclipse.org/bugs/show_bug.cgi?id=157584 |
9470 |
public void test0169() { |
11226 |
public void test0169_Diet() { |
9471 |
|
11227 |
|
9472 |
String str = |
11228 |
String str = |
9473 |
"public class X {\n" + |
11229 |
"public class X {\n" + |
Lines 9506-9524
Link Here
|
9506 |
completionIdentifier, |
11262 |
completionIdentifier, |
9507 |
expectedReplacedSource, |
11263 |
expectedReplacedSource, |
9508 |
"diet ast"); |
11264 |
"diet ast"); |
9509 |
|
11265 |
} |
9510 |
expectedCompletionNodeToString = "<CompleteOnException:IZZ>"; |
11266 |
//https://bugs.eclipse.org/bugs/show_bug.cgi?id=157584 |
9511 |
expectedParentNodeToString = "<NONE>"; |
11267 |
public void test0169_Method() { |
9512 |
completionIdentifier = "IZZ"; |
11268 |
|
9513 |
expectedReplacedSource = "IZZ"; |
11269 |
String str = |
9514 |
expectedUnitDisplayString = |
11270 |
"public class X {\n" + |
9515 |
"public class X {\n" + |
11271 |
" public boolean foo() {\n" + |
9516 |
" public X() {\n" + |
11272 |
" try {\n" + |
9517 |
" }\n" + |
11273 |
" throwing();\n" + |
9518 |
" public boolean foo() {\n" + |
11274 |
" }\n" + |
9519 |
" <CompleteOnException:IZZ>;\n" + |
11275 |
" catch (IllegalAccessException e) {\n" + |
9520 |
" }\n" + |
11276 |
" bar()\n" + |
9521 |
"}\n"; |
11277 |
" }\n" + |
|
|
11278 |
" catch (IZZ) {\n" + |
11279 |
" }\n" + |
11280 |
" }" + |
11281 |
"}\n"; |
11282 |
|
11283 |
String completeBehind = "IZZ"; |
11284 |
int cursorLocation = str.lastIndexOf("IZZ") + completeBehind.length() - 1; |
11285 |
String expectedCompletionNodeToString = "<CompleteOnException:IZZ>"; |
11286 |
String expectedParentNodeToString = "<NONE>"; |
11287 |
String completionIdentifier = "IZZ"; |
11288 |
String expectedReplacedSource = "IZZ"; |
11289 |
String expectedUnitDisplayString = |
11290 |
"public class X {\n" + |
11291 |
" public X() {\n" + |
11292 |
" }\n" + |
11293 |
" public boolean foo() {\n" + |
11294 |
" <CompleteOnException:IZZ>;\n" + |
11295 |
" }\n" + |
11296 |
"}\n"; |
9522 |
|
11297 |
|
9523 |
checkMethodParse( |
11298 |
checkMethodParse( |
9524 |
str.toCharArray(), |
11299 |
str.toCharArray(), |
Lines 9531-9537
Link Here
|
9531 |
"full ast"); |
11306 |
"full ast"); |
9532 |
} |
11307 |
} |
9533 |
//https://bugs.eclipse.org/bugs/show_bug.cgi?id=157584 |
11308 |
//https://bugs.eclipse.org/bugs/show_bug.cgi?id=157584 |
9534 |
public void test0170() { |
11309 |
public void test0170_Diet() { |
9535 |
|
11310 |
|
9536 |
String str = |
11311 |
String str = |
9537 |
"public class X {\n" + |
11312 |
"public class X {\n" + |
Lines 9571-9589
Link Here
|
9571 |
completionIdentifier, |
11346 |
completionIdentifier, |
9572 |
expectedReplacedSource, |
11347 |
expectedReplacedSource, |
9573 |
"diet ast"); |
11348 |
"diet ast"); |
9574 |
|
11349 |
} |
9575 |
expectedCompletionNodeToString = "<CompleteOnException:IZZ>"; |
11350 |
//https://bugs.eclipse.org/bugs/show_bug.cgi?id=157584 |
9576 |
expectedParentNodeToString = "<NONE>"; |
11351 |
public void test0170_Method() { |
9577 |
completionIdentifier = "IZZ"; |
11352 |
|
9578 |
expectedReplacedSource = "IZZ"; |
11353 |
String str = |
9579 |
expectedUnitDisplayString = |
11354 |
"public class X {\n" + |
9580 |
"public class X {\n" + |
11355 |
" public boolean foo() {\n" + |
9581 |
" public X() {\n" + |
11356 |
" #\n" + |
9582 |
" }\n" + |
11357 |
" try {\n" + |
9583 |
" public boolean foo() {\n" + |
11358 |
" throwing();\n" + |
9584 |
" <CompleteOnException:IZZ>;\n" + |
11359 |
" }\n" + |
9585 |
" }\n" + |
11360 |
" catch (IllegalAccessException e) {\n" + |
9586 |
"}\n"; |
11361 |
" bar();\n" + |
|
|
11362 |
" }\n" + |
11363 |
" catch (IZZ) {\n" + |
11364 |
" }\n" + |
11365 |
" }" + |
11366 |
"}\n"; |
11367 |
|
11368 |
String completeBehind = "IZZ"; |
11369 |
int cursorLocation = str.lastIndexOf("IZZ") + completeBehind.length() - 1; |
11370 |
String expectedCompletionNodeToString = "<CompleteOnException:IZZ>"; |
11371 |
String expectedParentNodeToString = "<NONE>"; |
11372 |
String completionIdentifier = "IZZ"; |
11373 |
String expectedReplacedSource = "IZZ"; |
11374 |
String expectedUnitDisplayString = |
11375 |
"public class X {\n" + |
11376 |
" public X() {\n" + |
11377 |
" }\n" + |
11378 |
" public boolean foo() {\n" + |
11379 |
" <CompleteOnException:IZZ>;\n" + |
11380 |
" }\n" + |
11381 |
"}\n"; |
9587 |
|
11382 |
|
9588 |
checkMethodParse( |
11383 |
checkMethodParse( |
9589 |
str.toCharArray(), |
11384 |
str.toCharArray(), |
Lines 9596-9602
Link Here
|
9596 |
"full ast"); |
11391 |
"full ast"); |
9597 |
} |
11392 |
} |
9598 |
//https://bugs.eclipse.org/bugs/show_bug.cgi?id=157584 |
11393 |
//https://bugs.eclipse.org/bugs/show_bug.cgi?id=157584 |
9599 |
public void test0171() { |
11394 |
public void test0171_Diet() { |
9600 |
|
11395 |
|
9601 |
String str = |
11396 |
String str = |
9602 |
"public class X {\n" + |
11397 |
"public class X {\n" + |
Lines 9632-9662
Link Here
|
9632 |
completionIdentifier, |
11427 |
completionIdentifier, |
9633 |
expectedReplacedSource, |
11428 |
expectedReplacedSource, |
9634 |
"diet ast"); |
11429 |
"diet ast"); |
9635 |
|
11430 |
} |
9636 |
expectedCompletionNodeToString = "<CompleteOnException:IZZ>"; |
11431 |
//https://bugs.eclipse.org/bugs/show_bug.cgi?id=157584 |
9637 |
expectedParentNodeToString = |
11432 |
public void test0171_Method() { |
9638 |
"try \n" + |
11433 |
|
9639 |
" {\n" + |
11434 |
String str = |
9640 |
" throwing();\n" + |
11435 |
"public class X {\n" + |
9641 |
" }\n" + |
11436 |
" public boolean foo() {\n" + |
9642 |
"catch (<CompleteOnException:IZZ> ) {\n" + |
11437 |
" try {\n" + |
9643 |
" }" |
11438 |
" throwing();\n" + |
9644 |
; |
11439 |
" }\n" + |
9645 |
completionIdentifier = "IZZ"; |
11440 |
" catch (IZZ) {\n" + |
9646 |
expectedReplacedSource = "IZZ"; |
11441 |
" }\n" + |
9647 |
expectedUnitDisplayString = |
11442 |
" }" + |
9648 |
"public class X {\n" + |
11443 |
"}\n"; |
9649 |
" public X() {\n" + |
11444 |
|
9650 |
" }\n" + |
11445 |
String completeBehind = "IZZ"; |
9651 |
" public boolean foo() {\n" + |
11446 |
int cursorLocation = str.lastIndexOf("IZZ") + completeBehind.length() - 1; |
9652 |
" try \n" + |
11447 |
String expectedCompletionNodeToString = "<CompleteOnException:IZZ>"; |
9653 |
" {\n" + |
11448 |
String expectedParentNodeToString = |
9654 |
" throwing();\n" + |
11449 |
"try \n" + |
9655 |
" }\n" + |
11450 |
" {\n" + |
9656 |
" catch (<CompleteOnException:IZZ> ) {\n" + |
11451 |
" throwing();\n" + |
9657 |
" }\n" + |
11452 |
" }\n" + |
9658 |
" }\n" + |
11453 |
"catch (<CompleteOnException:IZZ> ) {\n" + |
9659 |
"}\n"; |
11454 |
" }" |
|
|
11455 |
; |
11456 |
String completionIdentifier = "IZZ"; |
11457 |
String expectedReplacedSource = "IZZ"; |
11458 |
String expectedUnitDisplayString = |
11459 |
"public class X {\n" + |
11460 |
" public X() {\n" + |
11461 |
" }\n" + |
11462 |
" public boolean foo() {\n" + |
11463 |
" try \n" + |
11464 |
" {\n" + |
11465 |
" throwing();\n" + |
11466 |
" }\n" + |
11467 |
" catch (<CompleteOnException:IZZ> ) {\n" + |
11468 |
" }\n" + |
11469 |
" }\n" + |
11470 |
"}\n"; |
9660 |
|
11471 |
|
9661 |
checkMethodParse( |
11472 |
checkMethodParse( |
9662 |
str.toCharArray(), |
11473 |
str.toCharArray(), |