Lines 712-717
Link Here
|
712 |
String expectedReplacedSource = "MyAnn"; |
712 |
String expectedReplacedSource = "MyAnn"; |
713 |
String expectedUnitDisplayString = |
713 |
String expectedUnitDisplayString = |
714 |
"public class X {\n" + |
714 |
"public class X {\n" + |
|
|
715 |
" @<CompleteOnType:MyAnn>\n" + |
715 |
" public X() {\n" + |
716 |
" public X() {\n" + |
716 |
" }\n" + |
717 |
" }\n" + |
717 |
" void foo() {\n" + |
718 |
" void foo() {\n" + |
Lines 727-755
Link Here
|
727 |
completionIdentifier, |
728 |
completionIdentifier, |
728 |
expectedReplacedSource, |
729 |
expectedReplacedSource, |
729 |
"diet ast"); |
730 |
"diet ast"); |
730 |
|
|
|
731 |
expectedCompletionNodeToString = "@<CompleteOnType:MyAnn>"; |
732 |
expectedParentNodeToString = "<NONE>"; |
733 |
completionIdentifier = "MyAnn"; |
734 |
expectedReplacedSource = "MyAnn"; |
735 |
expectedUnitDisplayString = |
736 |
"public class X {\n" + |
737 |
" public X() {\n" + |
738 |
" }\n" + |
739 |
" void foo() {\n" + |
740 |
" @<CompleteOnType:MyAnn>\n" + |
741 |
" }\n" + |
742 |
"}\n"; |
743 |
|
744 |
checkMethodParse( |
745 |
str.toCharArray(), |
746 |
cursorLocation, |
747 |
expectedCompletionNodeToString, |
748 |
expectedParentNodeToString, |
749 |
expectedUnitDisplayString, |
750 |
completionIdentifier, |
751 |
expectedReplacedSource, |
752 |
"full ast"); |
753 |
} |
731 |
} |
754 |
public void test0024(){ |
732 |
public void test0024(){ |
755 |
String str = |
733 |
String str = |
Lines 4645-4648
Link Here
|
4645 |
expectedReplacedSource, |
4623 |
expectedReplacedSource, |
4646 |
"diet ast"); |
4624 |
"diet ast"); |
4647 |
} |
4625 |
} |
|
|
4626 |
// https://bugs.eclipse.org/bugs/show_bug.cgi?id=148742 |
4627 |
public void test0125(){ |
4628 |
String str = |
4629 |
"public interface X {\n" + |
4630 |
" public void test(@TestAnnotation int testParam);\n" + |
4631 |
"}"; |
4632 |
|
4633 |
|
4634 |
String completeBehind = "@TestAnnotation"; |
4635 |
int cursorLocation = str.indexOf(completeBehind) + completeBehind.length() - 1; |
4636 |
String expectedCompletionNodeToString = "@<CompleteOnType:TestAnnotation>"; |
4637 |
String expectedParentNodeToString = "<NONE>"; |
4638 |
String completionIdentifier = "TestAnnotation"; |
4639 |
String expectedReplacedSource = "TestAnnotation"; |
4640 |
String expectedUnitDisplayString = |
4641 |
"public interface X {\n" + |
4642 |
" @<CompleteOnType:TestAnnotation>\n" + |
4643 |
" public void test() {\n" + |
4644 |
" }\n" + |
4645 |
"}\n"; |
4646 |
|
4647 |
checkDietParse( |
4648 |
str.toCharArray(), |
4649 |
cursorLocation, |
4650 |
expectedCompletionNodeToString, |
4651 |
expectedParentNodeToString, |
4652 |
expectedUnitDisplayString, |
4653 |
completionIdentifier, |
4654 |
expectedReplacedSource, |
4655 |
"diet ast"); |
4656 |
} |
4657 |
//https://bugs.eclipse.org/bugs/show_bug.cgi?id=148742 |
4658 |
public void test0126(){ |
4659 |
String str = |
4660 |
"public abstract class X {\n" + |
4661 |
" public abstract void test(@TestAnnotation int testParam);\n" + |
4662 |
"}"; |
4663 |
|
4664 |
|
4665 |
String completeBehind = "@TestAnnotation"; |
4666 |
int cursorLocation = str.indexOf(completeBehind) + completeBehind.length() - 1; |
4667 |
String expectedCompletionNodeToString = "@<CompleteOnType:TestAnnotation>"; |
4668 |
String expectedParentNodeToString = "<NONE>"; |
4669 |
String completionIdentifier = "TestAnnotation"; |
4670 |
String expectedReplacedSource = "TestAnnotation"; |
4671 |
String expectedUnitDisplayString = |
4672 |
"public abstract class X {\n" + |
4673 |
" @<CompleteOnType:TestAnnotation>\n" + |
4674 |
" public X() {\n" + |
4675 |
" }\n" + |
4676 |
" public abstract void test();\n" + |
4677 |
"}\n"; |
4678 |
|
4679 |
checkDietParse( |
4680 |
str.toCharArray(), |
4681 |
cursorLocation, |
4682 |
expectedCompletionNodeToString, |
4683 |
expectedParentNodeToString, |
4684 |
expectedUnitDisplayString, |
4685 |
completionIdentifier, |
4686 |
expectedReplacedSource, |
4687 |
"diet ast"); |
4688 |
} |
4648 |
} |
4689 |
} |