Lines 7729-7735
Link Here
|
7729 |
this.resultCollector.showSelection(); |
7729 |
this.resultCollector.showSelection(); |
7730 |
search(packageFragment, REFERENCES); |
7730 |
search(packageFragment, REFERENCES); |
7731 |
assertSearchResults( |
7731 |
assertSearchResults( |
7732 |
"src/b153765/test/SomeClass.java void b153765.test.SomeClass.foo() [ @�|b153765|�.Unimportant public void foo() {}] EXACT_MATCH" |
7732 |
"src/b153765/test/SomeClass.java void b153765.test.SomeClass.foo() [ @�|b153765|�.Unimportant public void foo() {}] EXACT_MATCH" |
7733 |
); |
7733 |
); |
7734 |
} |
7734 |
} |
7735 |
finally { |
7735 |
finally { |
Lines 9479-9485
Link Here
|
9479 |
collector.showSelection(); |
9479 |
collector.showSelection(); |
9480 |
search(type, REFERENCES, EXACT_RULE, getJavaSearchScope(), collector); |
9480 |
search(type, REFERENCES, EXACT_RULE, getJavaSearchScope(), collector); |
9481 |
assertSearchResults( |
9481 |
assertSearchResults( |
9482 |
"src/test/Test.java void test.Test.method() [ @Annot(clazz=�|Test|�.class) int x;]+[@Annot on x]", |
9482 |
"src/test/Test.java void test.Test.method() [ @Annot(clazz=�|Test|�.class) int x;]+[@Annot on x]", |
9483 |
collector |
9483 |
collector |
9484 |
); |
9484 |
); |
9485 |
} |
9485 |
} |
Lines 9495-9501
Link Here
|
9495 |
collector.showSelection(); |
9495 |
collector.showSelection(); |
9496 |
search("Deprecated", TYPE, REFERENCES, EXACT_RULE, getJavaSearchScope(), collector); |
9496 |
search("Deprecated", TYPE, REFERENCES, EXACT_RULE, getJavaSearchScope(), collector); |
9497 |
assertSearchResults( |
9497 |
assertSearchResults( |
9498 |
"src/test/Test.java void test.Test.foo() [ @�|Deprecated|� foo() {}]+[@Deprecated on foo]", |
9498 |
"src/test/Test.java void test.Test.foo() [ @�|Deprecated|� foo() {}]+[@Deprecated on foo]", |
9499 |
collector |
9499 |
collector |
9500 |
); |
9500 |
); |
9501 |
} |
9501 |
} |
Lines 9521-9531
Link Here
|
9521 |
collector.showSelection(); |
9521 |
collector.showSelection(); |
9522 |
search(type, REFERENCES, EXACT_RULE, getJavaSearchScope(), collector); |
9522 |
search(type, REFERENCES, EXACT_RULE, getJavaSearchScope(), collector); |
9523 |
assertSearchResults( |
9523 |
assertSearchResults( |
9524 |
"src/comment5/Ref.java void comment5.Ref.doA(Ref) [ void doA(�|Ref|� ref) {}]+[ref]\n" + |
9524 |
"src/comment5/Ref.java void comment5.Ref.doA(Ref) [ void doA(�|Ref|� ref) {}]+[ref]\n" + |
9525 |
"src/comment5/Ref.java void comment5.Ref.doB(List<Ref>) [ void doB(List<�|Ref|�> ref) {}]+[ref]\n" + |
9525 |
"src/comment5/Ref.java void comment5.Ref.doB(List<Ref>) [ void doB(List<�|Ref|�> ref) {}]+[ref]\n" + |
9526 |
"src/comment5/Ref.java void comment5.Ref.doC(Ref) [ void doC(@Tag(�|Ref|�.class) Ref ref) {}]+[@Tag on ref]\n" + |
9526 |
"src/comment5/Ref.java void comment5.Ref.doC(Ref) [ void doC(@Tag(�|Ref|�.class) Ref ref) {}]+[@Tag on ref]\n" + |
9527 |
"src/comment5/Ref.java void comment5.Ref.doC(Ref) [ void doC(@Tag(Ref.class) �|Ref|� ref) {}]+[ref]\n" + |
9527 |
"src/comment5/Ref.java void comment5.Ref.doC(Ref) [ void doC(@Tag(Ref.class) �|Ref|� ref) {}]+[ref]\n" + |
9528 |
"src/comment5/Ref.java void comment5.Ref.dontD(Object) [ void dontD(@Tag(�|Ref|�.class) Object ref) {}]+[@Tag on ref]", |
9528 |
"src/comment5/Ref.java void comment5.Ref.dontD(Object) [ void dontD(@Tag(�|Ref|�.class) Object ref) {}]+[@Tag on ref]", |
9529 |
collector |
9529 |
collector |
9530 |
); |
9530 |
); |
9531 |
} |
9531 |
} |
Lines 9544-9550
Link Here
|
9544 |
collector.showSelection(); |
9544 |
collector.showSelection(); |
9545 |
search(field, REFERENCES, EXACT_RULE, getJavaSearchScope(), collector); |
9545 |
search(field, REFERENCES, EXACT_RULE, getJavaSearchScope(), collector); |
9546 |
assertSearchResults( |
9546 |
assertSearchResults( |
9547 |
"src/comment10/Ref.java comment10.Num [@Num(number= Num.�|CONST|�)]+[@Num on Num]", |
9547 |
"src/comment10/Ref.java comment10.Num [@Num(number= Num.�|CONST|�)]+[@Num on Num]", |
9548 |
collector |
9548 |
collector |
9549 |
); |
9549 |
); |
9550 |
} |
9550 |
} |
Lines 9566-9574
Link Here
|
9566 |
collector.showSelection(); |
9566 |
collector.showSelection(); |
9567 |
search(type, REFERENCES, EXACT_RULE, getJavaSearchScope(), collector); |
9567 |
search(type, REFERENCES, EXACT_RULE, getJavaSearchScope(), collector); |
9568 |
assertSearchResults( |
9568 |
assertSearchResults( |
9569 |
"src/comment22/Test.java comment22.Test.test1 [ @�|Tag|� Test test1, test2, test3;]+[@Tag on test1]+[@Tag on test2,@Tag on test3]\n" + |
9569 |
"src/comment22/Test.java comment22.Test.test1 [ @�|Tag|� Test test1, test2, test3;]+[@Tag on test1]+[@Tag on test2,@Tag on test3]\n" + |
9570 |
"src/comment22/Test.java void comment22.Test.method() [ @�|Tag|� Test local= null;]+[@Tag on local]\n" + |
9570 |
"src/comment22/Test.java void comment22.Test.method() [ @�|Tag|� Test local= null;]+[@Tag on local]\n" + |
9571 |
"src/comment22/Test.java void comment22.Test.method() [ @�|Tag|� Test local1, local2, local3;]+[@Tag on local1]+[@Tag on local2,@Tag on local3]", |
9571 |
"src/comment22/Test.java void comment22.Test.method() [ @�|Tag|� Test local1, local2, local3;]+[@Tag on local1]+[@Tag on local2,@Tag on local3]", |
9572 |
collector |
9572 |
collector |
9573 |
); |
9573 |
); |
9574 |
} |
9574 |
} |
Lines 9588-9594
Link Here
|
9588 |
collector.showSelection(); |
9588 |
collector.showSelection(); |
9589 |
search(type, REFERENCES, EXACT_RULE, getJavaSearchScope(), collector); |
9589 |
search(type, REFERENCES, EXACT_RULE, getJavaSearchScope(), collector); |
9590 |
assertSearchResults( |
9590 |
assertSearchResults( |
9591 |
"src/test/Test.java test.TestMethodReference.x [ @Annot(clazz = �|test.Test|�.class) int x, y;]+[@Annot on x]+[@Annot on y]", |
9591 |
"src/test/Test.java test.TestMethodReference.x [ @Annot(clazz = �|test.Test|�.class) int x, y;]+[@Annot on x]+[@Annot on y]", |
9592 |
collector |
9592 |
collector |
9593 |
); |
9593 |
); |
9594 |
} |
9594 |
} |
Lines 9643-9663
Link Here
|
9643 |
this.resultCollector.showSelection(); |
9643 |
this.resultCollector.showSelection(); |
9644 |
search("*", TYPE, REFERENCES, getJavaSearchWorkingCopiesScope(), this.resultCollector); |
9644 |
search("*", TYPE, REFERENCES, getJavaSearchWorkingCopiesScope(), this.resultCollector); |
9645 |
assertSearchResults( |
9645 |
assertSearchResults( |
9646 |
"src/generics/Generic.java [import �|java.io.Serializable|�;] EXACT_MATCH\n" + |
9646 |
"src/generics/Generic.java [import �|java.io.Serializable|�;] EXACT_MATCH\n" + |
9647 |
"src/generics/Generic.java [import �|type.def.Types|�;] EXACT_MATCH\n" + |
9647 |
"src/generics/Generic.java [import �|type.def.Types|�;] EXACT_MATCH\n" + |
9648 |
"src/generics/Generic.java generics.Generic [public class Generic<T extends �|Types|�, U extends Types & Comparable<Types> & Serializable, V extends A<? super Types>> {] EXACT_MATCH\n" + |
9648 |
"src/generics/Generic.java generics.Generic [public class Generic<T extends �|Types|�, U extends Types & Comparable<Types> & Serializable, V extends A<? super Types>> {] EXACT_MATCH\n" + |
9649 |
"src/generics/Generic.java generics.Generic [public class Generic<T extends Types, U extends �|Types|� & Comparable<Types> & Serializable, V extends A<? super Types>> {] EXACT_MATCH\n" + |
9649 |
"src/generics/Generic.java generics.Generic [public class Generic<T extends Types, U extends �|Types|� & Comparable<Types> & Serializable, V extends A<? super Types>> {] EXACT_MATCH\n" + |
9650 |
"src/generics/Generic.java generics.Generic [public class Generic<T extends Types, U extends Types & �|Comparable|�<Types> & Serializable, V extends A<? super Types>> {] EXACT_MATCH\n" + |
9650 |
"src/generics/Generic.java generics.Generic [public class Generic<T extends Types, U extends Types & �|Comparable|�<Types> & Serializable, V extends A<? super Types>> {] EXACT_MATCH\n" + |
9651 |
"src/generics/Generic.java generics.Generic [public class Generic<T extends Types, U extends Types & Comparable<�|Types|�> & Serializable, V extends A<? super Types>> {] EXACT_MATCH\n" + |
9651 |
"src/generics/Generic.java generics.Generic [public class Generic<T extends Types, U extends Types & Comparable<�|Types|�> & Serializable, V extends A<? super Types>> {] EXACT_MATCH\n" + |
9652 |
"src/generics/Generic.java generics.Generic [public class Generic<T extends Types, U extends Types & Comparable<Types> & �|Serializable|�, V extends A<? super Types>> {] EXACT_MATCH\n" + |
9652 |
"src/generics/Generic.java generics.Generic [public class Generic<T extends Types, U extends Types & Comparable<Types> & �|Serializable|�, V extends A<? super Types>> {] EXACT_MATCH\n" + |
9653 |
"src/generics/Generic.java generics.Generic [public class Generic<T extends Types, U extends Types & Comparable<Types> & Serializable, V extends �|A|�<? super Types>> {] EXACT_MATCH\n" + |
9653 |
"src/generics/Generic.java generics.Generic [public class Generic<T extends Types, U extends Types & Comparable<Types> & Serializable, V extends �|A|�<? super Types>> {] EXACT_MATCH\n" + |
9654 |
"src/generics/Generic.java generics.Generic [public class Generic<T extends Types, U extends Types & Comparable<Types> & Serializable, V extends A<? super �|Types|�>> {] EXACT_MATCH\n" + |
9654 |
"src/generics/Generic.java generics.Generic [public class Generic<T extends Types, U extends Types & Comparable<Types> & Serializable, V extends A<? super �|Types|�>> {] EXACT_MATCH\n" + |
9655 |
"src/generics/Generic.java generics.Generic.field [ �|Generic|�<? extends Types, ?, ?> field;] EXACT_MATCH\n" + |
9655 |
"src/generics/Generic.java generics.Generic.field [ �|Generic|�<? extends Types, ?, ?> field;] EXACT_MATCH\n" + |
9656 |
"src/generics/Generic.java generics.Generic.field [ Generic<? extends �|Types|�, ?, ?> field;] EXACT_MATCH\n" + |
9656 |
"src/generics/Generic.java generics.Generic.field [ Generic<? extends �|Types|�, ?, ?> field;] EXACT_MATCH\n" + |
9657 |
"src/generics/Generic.java generics.Generic.comp [ �|Comparable|�<String> comp;] EXACT_MATCH\n" + |
9657 |
"src/generics/Generic.java generics.Generic.comp [ �|Comparable|�<String> comp;] EXACT_MATCH\n" + |
9658 |
"src/generics/Generic.java generics.Generic.comp [ Comparable<�|String|�> comp;] EXACT_MATCH\n" + |
9658 |
"src/generics/Generic.java generics.Generic.comp [ Comparable<�|String|�> comp;] EXACT_MATCH\n" + |
9659 |
"src/generics/Generic.java generics.Generic.clazz [ �|Class|�<? extends Exception> clazz;] EXACT_MATCH\n" + |
9659 |
"src/generics/Generic.java generics.Generic.clazz [ �|Class|�<? extends Exception> clazz;] EXACT_MATCH\n" + |
9660 |
"src/generics/Generic.java generics.Generic.clazz [ Class<? extends �|Exception|�> clazz;] EXACT_MATCH" |
9660 |
"src/generics/Generic.java generics.Generic.clazz [ Class<? extends �|Exception|�> clazz;] EXACT_MATCH" |
9661 |
); |
9661 |
); |
9662 |
} |
9662 |
} |
9663 |
|
9663 |
|
Lines 9682-9689
Link Here
|
9682 |
this.resultCollector.showSelection(); |
9682 |
this.resultCollector.showSelection(); |
9683 |
search("*", TYPE, REFERENCES, getJavaSearchWorkingCopiesScope(), this.resultCollector); |
9683 |
search("*", TYPE, REFERENCES, getJavaSearchWorkingCopiesScope(), this.resultCollector); |
9684 |
assertSearchResults( |
9684 |
assertSearchResults( |
9685 |
"src/test/Ref.java [import �|pack.Test|�;] EXACT_MATCH\n" + |
9685 |
"src/test/Ref.java [import �|pack.Test|�;] EXACT_MATCH\n" + |
9686 |
"src/test/Ref.java test.Ref.test [ �|Test|� test;] EXACT_MATCH" |
9686 |
"src/test/Ref.java test.Ref.test [ �|Test|� test;] EXACT_MATCH" |
9687 |
); |
9687 |
); |
9688 |
} |
9688 |
} |
9689 |
|
9689 |
|
Lines 9906-9912
Link Here
|
9906 |
ILocalVariable variable = selectLocalVariable(this.workingCopies[0], "test"); |
9906 |
ILocalVariable variable = selectLocalVariable(this.workingCopies[0], "test"); |
9907 |
search(variable, READ_ACCESSES, getJavaSearchWorkingCopiesScope(), this.resultCollector); |
9907 |
search(variable, READ_ACCESSES, getJavaSearchWorkingCopiesScope(), this.resultCollector); |
9908 |
assertSearchResults( |
9908 |
assertSearchResults( |
9909 |
"src/Test.java void Test.m() [ �|test|�.fField = 42; // match for t is writeAccess, should be readAccess] EXACT_MATCH" |
9909 |
"src/Test.java void Test.m() [ �|test|�.fField = 42; // match for t is writeAccess, should be readAccess] EXACT_MATCH" |
9910 |
); |
9910 |
); |
9911 |
} |
9911 |
} |
9912 |
public void testBug216875b() throws CoreException { |
9912 |
public void testBug216875b() throws CoreException { |
Lines 9926-9932
Link Here
|
9926 |
IField field = this.workingCopies[0].getType("Test").getField("fWrapped"); |
9926 |
IField field = this.workingCopies[0].getType("Test").getField("fWrapped"); |
9927 |
search(field, READ_ACCESSES, getJavaSearchWorkingCopiesScope(), this.resultCollector); |
9927 |
search(field, READ_ACCESSES, getJavaSearchWorkingCopiesScope(), this.resultCollector); |
9928 |
assertSearchResults( |
9928 |
assertSearchResults( |
9929 |
"src/Test.java void Test.wrapper() [ �|fWrapped|�.fField = 12; // match for fWrapped is writeAccess] EXACT_MATCH" |
9929 |
"src/Test.java void Test.wrapper() [ �|fWrapped|�.fField = 12; // match for fWrapped is writeAccess] EXACT_MATCH" |
9930 |
); |
9930 |
); |
9931 |
} |
9931 |
} |
9932 |
public void testBug216875c() throws CoreException { |
9932 |
public void testBug216875c() throws CoreException { |
Lines 9952-9960
Link Here
|
9952 |
ILocalVariable variable = selectLocalVariable(this.workingCopies[1], "t1"); |
9952 |
ILocalVariable variable = selectLocalVariable(this.workingCopies[1], "t1"); |
9953 |
search(variable, READ_ACCESSES, getJavaSearchWorkingCopiesScope(), this.resultCollector); |
9953 |
search(variable, READ_ACCESSES, getJavaSearchWorkingCopiesScope(), this.resultCollector); |
9954 |
assertSearchResults( |
9954 |
assertSearchResults( |
9955 |
"src/test/X.java void test.X.foo(Test, Test) [ �|t1|�.field = t1.field;] EXACT_MATCH\n" + |
9955 |
"src/test/X.java void test.X.foo(Test, Test) [ �|t1|�.field = t1.field;] EXACT_MATCH\n" + |
9956 |
"src/test/X.java void test.X.foo(Test, Test) [ t1.field = �|t1|�.field;] EXACT_MATCH\n" + |
9956 |
"src/test/X.java void test.X.foo(Test, Test) [ t1.field = �|t1|�.field;] EXACT_MATCH\n" + |
9957 |
"src/test/X.java void test.X.foo(Test, Test) [ t2.field = �|t1|�.field;] EXACT_MATCH" |
9957 |
"src/test/X.java void test.X.foo(Test, Test) [ t2.field = �|t1|�.field;] EXACT_MATCH" |
9958 |
); |
9958 |
); |
9959 |
} |
9959 |
} |
9960 |
public void testBug216875d() throws CoreException { |
9960 |
public void testBug216875d() throws CoreException { |
Lines 9981-9989
Link Here
|
9981 |
IField field = this.workingCopies[1].getType("X").getField("t1"); |
9981 |
IField field = this.workingCopies[1].getType("X").getField("t1"); |
9982 |
search(field, READ_ACCESSES, getJavaSearchWorkingCopiesScope(), this.resultCollector); |
9982 |
search(field, READ_ACCESSES, getJavaSearchWorkingCopiesScope(), this.resultCollector); |
9983 |
assertSearchResults( |
9983 |
assertSearchResults( |
9984 |
"src/test/X.java void test.X.foo() [ �|t1|�.field = t1.field;] EXACT_MATCH\n" + |
9984 |
"src/test/X.java void test.X.foo() [ �|t1|�.field = t1.field;] EXACT_MATCH\n" + |
9985 |
"src/test/X.java void test.X.foo() [ t1.field = �|t1|�.field;] EXACT_MATCH\n" + |
9985 |
"src/test/X.java void test.X.foo() [ t1.field = �|t1|�.field;] EXACT_MATCH\n" + |
9986 |
"src/test/X.java void test.X.foo() [ t2.field = �|t1|�.field;] EXACT_MATCH" |
9986 |
"src/test/X.java void test.X.foo() [ t2.field = �|t1|�.field;] EXACT_MATCH" |
9987 |
); |
9987 |
); |
9988 |
} |
9988 |
} |
9989 |
public void testBug216875e() throws CoreException { |
9989 |
public void testBug216875e() throws CoreException { |
Lines 10009-10015
Link Here
|
10009 |
ILocalVariable variable = selectLocalVariable(this.workingCopies[1], "t1"); |
10009 |
ILocalVariable variable = selectLocalVariable(this.workingCopies[1], "t1"); |
10010 |
search(variable, WRITE_ACCESSES, getJavaSearchWorkingCopiesScope(), this.resultCollector); |
10010 |
search(variable, WRITE_ACCESSES, getJavaSearchWorkingCopiesScope(), this.resultCollector); |
10011 |
assertSearchResults( |
10011 |
assertSearchResults( |
10012 |
"src/test/X.java void test.X.foo(Test, Test) [ �|t1|� = t2;] EXACT_MATCH" |
10012 |
"src/test/X.java void test.X.foo(Test, Test) [ �|t1|� = t2;] EXACT_MATCH" |
10013 |
); |
10013 |
); |
10014 |
} |
10014 |
} |
10015 |
public void testBug216875f() throws CoreException { |
10015 |
public void testBug216875f() throws CoreException { |
Lines 10036-10042
Link Here
|
10036 |
IField field = this.workingCopies[1].getType("X").getField("t1"); |
10036 |
IField field = this.workingCopies[1].getType("X").getField("t1"); |
10037 |
search(field, WRITE_ACCESSES, getJavaSearchWorkingCopiesScope(), this.resultCollector); |
10037 |
search(field, WRITE_ACCESSES, getJavaSearchWorkingCopiesScope(), this.resultCollector); |
10038 |
assertSearchResults( |
10038 |
assertSearchResults( |
10039 |
"src/test/X.java void test.X.foo() [ �|t1|� = t2;] EXACT_MATCH" |
10039 |
"src/test/X.java void test.X.foo() [ �|t1|� = t2;] EXACT_MATCH" |
10040 |
); |
10040 |
); |
10041 |
} |
10041 |
} |
10042 |
public void testBug216875g() throws CoreException { |
10042 |
public void testBug216875g() throws CoreException { |
Lines 10064-10073
Link Here
|
10064 |
ILocalVariable variable = selectLocalVariable(this.workingCopies[1], "t1"); |
10064 |
ILocalVariable variable = selectLocalVariable(this.workingCopies[1], "t1"); |
10065 |
search(variable, REFERENCES, getJavaSearchWorkingCopiesScope(), this.resultCollector); |
10065 |
search(variable, REFERENCES, getJavaSearchWorkingCopiesScope(), this.resultCollector); |
10066 |
assertSearchResults( |
10066 |
assertSearchResults( |
10067 |
"src/test/X.java void test.X.foo(Test, Test) [ �|t1|� = t2;] WRITE ACCESS\n" + |
10067 |
"src/test/X.java void test.X.foo(Test, Test) [ �|t1|� = t2;] WRITE ACCESS\n" + |
10068 |
"src/test/X.java void test.X.foo(Test, Test) [ �|t1|�.field = t1.field;] READ ACCESS\n" + |
10068 |
"src/test/X.java void test.X.foo(Test, Test) [ �|t1|�.field = t1.field;] READ ACCESS\n" + |
10069 |
"src/test/X.java void test.X.foo(Test, Test) [ t1.field = �|t1|�.field;] READ ACCESS\n" + |
10069 |
"src/test/X.java void test.X.foo(Test, Test) [ t1.field = �|t1|�.field;] READ ACCESS\n" + |
10070 |
"src/test/X.java void test.X.foo(Test, Test) [ t2.field = �|t1|�.field;] READ ACCESS" |
10070 |
"src/test/X.java void test.X.foo(Test, Test) [ t2.field = �|t1|�.field;] READ ACCESS" |
10071 |
); |
10071 |
); |
10072 |
} |
10072 |
} |
10073 |
public void testBug216875h() throws CoreException { |
10073 |
public void testBug216875h() throws CoreException { |
Lines 10096-10105
Link Here
|
10096 |
IField field = this.workingCopies[1].getType("X").getField("t1"); |
10096 |
IField field = this.workingCopies[1].getType("X").getField("t1"); |
10097 |
search(field, REFERENCES, getJavaSearchWorkingCopiesScope(), this.resultCollector); |
10097 |
search(field, REFERENCES, getJavaSearchWorkingCopiesScope(), this.resultCollector); |
10098 |
assertSearchResults( |
10098 |
assertSearchResults( |
10099 |
"src/test/X.java void test.X.foo() [ �|t1|� = t2;] WRITE ACCESS\n" + |
10099 |
"src/test/X.java void test.X.foo() [ �|t1|� = t2;] WRITE ACCESS\n" + |
10100 |
"src/test/X.java void test.X.foo() [ �|t1|�.field = t1.field;] READ ACCESS\n" + |
10100 |
"src/test/X.java void test.X.foo() [ �|t1|�.field = t1.field;] READ ACCESS\n" + |
10101 |
"src/test/X.java void test.X.foo() [ t1.field = �|t1|�.field;] READ ACCESS\n" + |
10101 |
"src/test/X.java void test.X.foo() [ t1.field = �|t1|�.field;] READ ACCESS\n" + |
10102 |
"src/test/X.java void test.X.foo() [ t2.field = �|t1|�.field;] READ ACCESS" |
10102 |
"src/test/X.java void test.X.foo() [ t2.field = �|t1|�.field;] READ ACCESS" |
10103 |
); |
10103 |
); |
10104 |
} |
10104 |
} |
10105 |
|
10105 |
|
Lines 10124-10130
Link Here
|
10124 |
IType type = selectType(this.workingCopies[0], "Row"); |
10124 |
IType type = selectType(this.workingCopies[0], "Row"); |
10125 |
search(type, REFERENCES, getJavaSearchWorkingCopiesScope(), this.resultCollector); |
10125 |
search(type, REFERENCES, getJavaSearchWorkingCopiesScope(), this.resultCollector); |
10126 |
assertSearchResults( |
10126 |
assertSearchResults( |
10127 |
"src/Bug.java Bug.{}:Inner#1.field [ �|Row|� field;//LINE 3] EXACT_MATCH" |
10127 |
"src/Bug.java Bug.{}:Inner#1.field [ �|Row|� field;//LINE 3] EXACT_MATCH" |
10128 |
); |
10128 |
); |
10129 |
} |
10129 |
} |
10130 |
|
10130 |
|
Lines 10160-10171
Link Here
|
10160 |
this.resultCollector, |
10160 |
this.resultCollector, |
10161 |
null); |
10161 |
null); |
10162 |
assertSearchResults( |
10162 |
assertSearchResults( |
10163 |
"src/Test.java Test [public class �|Test|� {] EXACT_MATCH\n" + |
10163 |
"src/Test.java Test [public class �|Test|� {] EXACT_MATCH\n" + |
10164 |
"src/Test.java Test.test [ Test �|test|�;] EXACT_MATCH\n" + |
10164 |
"src/Test.java Test.test [ Test �|test|�;] EXACT_MATCH\n" + |
10165 |
"src/Test.java Test.test [ �|Test|� test;] EXACT_MATCH\n" + |
10165 |
"src/Test.java Test.test [ �|Test|� test;] EXACT_MATCH\n" + |
10166 |
"src/Test.java void Test.test(Test) [ void �|test|�(Test test) {] EXACT_MATCH\n" + |
10166 |
"src/Test.java void Test.test(Test) [ void �|test|�(Test test) {] EXACT_MATCH\n" + |
10167 |
"src/Test.java void Test.test(Test) [ void test(�|Test|� test) {] EXACT_MATCH\n" + |
10167 |
"src/Test.java void Test.test(Test) [ void test(�|Test|� test) {] EXACT_MATCH\n" + |
10168 |
"src/Test.java void Test.test(Test) [ if (test == this.�|test|�) {] EXACT_MATCH" |
10168 |
"src/Test.java void Test.test(Test) [ if (test == this.�|test|�) {] EXACT_MATCH" |
10169 |
); |
10169 |
); |
10170 |
} |
10170 |
} |
10171 |
|
10171 |
|
Lines 10190-10196
Link Here
|
10190 |
IType type = this.workingCopies[0].getType("X"); |
10190 |
IType type = this.workingCopies[0].getType("X"); |
10191 |
search(type, REFERENCES, SearchPattern.R_ERASURE_MATCH, getJavaSearchWorkingCopiesScope(), this.resultCollector); |
10191 |
search(type, REFERENCES, SearchPattern.R_ERASURE_MATCH, getJavaSearchWorkingCopiesScope(), this.resultCollector); |
10192 |
assertSearchResults( |
10192 |
assertSearchResults( |
10193 |
"src/Y.java Y [public class Y<T extends �|X|�<?>> {] ERASURE_MATCH" |
10193 |
"src/Y.java Y [public class Y<T extends �|X|�<?>> {] ERASURE_MATCH" |
10194 |
); |
10194 |
); |
10195 |
} |
10195 |
} |
10196 |
public void testBug221110b() throws CoreException { |
10196 |
public void testBug221110b() throws CoreException { |
Lines 10212-10218
Link Here
|
10212 |
IType type = this.workingCopies[0].getType("I"); |
10212 |
IType type = this.workingCopies[0].getType("I"); |
10213 |
search(type, REFERENCES, SearchPattern.R_ERASURE_MATCH, getJavaSearchWorkingCopiesScope(), this.resultCollector); |
10213 |
search(type, REFERENCES, SearchPattern.R_ERASURE_MATCH, getJavaSearchWorkingCopiesScope(), this.resultCollector); |
10214 |
assertSearchResults( |
10214 |
assertSearchResults( |
10215 |
"src/Z.java Z [public class Z<T extends X<?> & �|I|�<?>> {] ERASURE_MATCH" |
10215 |
"src/Z.java Z [public class Z<T extends X<?> & �|I|�<?>> {] ERASURE_MATCH" |
10216 |
); |
10216 |
); |
10217 |
} |
10217 |
} |
10218 |
|
10218 |
|
Lines 10537-10544
Link Here
|
10537 |
this.resultCollector.showSelection(); |
10537 |
this.resultCollector.showSelection(); |
10538 |
search("B251827*", TYPE, REFERENCES); |
10538 |
search("B251827*", TYPE, REFERENCES); |
10539 |
assertSearchResults( |
10539 |
assertSearchResults( |
10540 |
"src/b251827/X.java [import static b251827.�|B251827|�.VAL;] EXACT_MATCH\n" + |
10540 |
"src/b251827/X.java [import static b251827.�|B251827|�.VAL;] EXACT_MATCH\n" + |
10541 |
"src/b251827/X.java [import static b251827.�|B251827|�.foo;] EXACT_MATCH" |
10541 |
"src/b251827/X.java [import static b251827.�|B251827|�.foo;] EXACT_MATCH" |
10542 |
); |
10542 |
); |
10543 |
} |
10543 |
} |
10544 |
public void testBug251827b() throws CoreException { |
10544 |
public void testBug251827b() throws CoreException { |
Lines 10564-10570
Link Here
|
10564 |
this.resultCollector.showSelection(); |
10564 |
this.resultCollector.showSelection(); |
10565 |
search("B251827*", TYPE, REFERENCES); |
10565 |
search("B251827*", TYPE, REFERENCES); |
10566 |
assertSearchResults( |
10566 |
assertSearchResults( |
10567 |
"src/b251827/X.java [import static b251827.�|B251827|�.*;] EXACT_MATCH" |
10567 |
"src/b251827/X.java [import static b251827.�|B251827|�.*;] EXACT_MATCH" |
10568 |
); |
10568 |
); |
10569 |
} |
10569 |
} |
10570 |
public void testBug251827c() throws CoreException { |
10570 |
public void testBug251827c() throws CoreException { |
Lines 10592-10598
Link Here
|
10592 |
); |
10592 |
); |
10593 |
search("B251827*", TYPE, REFERENCES); |
10593 |
search("B251827*", TYPE, REFERENCES); |
10594 |
assertSearchResults( |
10594 |
assertSearchResults( |
10595 |
"src/b251827/X.java void b251827.X.bar(B251827) [ void bar(�|B251827|� m) {;] EXACT_MATCH" |
10595 |
"src/b251827/X.java void b251827.X.bar(B251827) [ void bar(�|B251827|� m) {;] EXACT_MATCH" |
10596 |
); |
10596 |
); |
10597 |
} |
10597 |
} |
10598 |
|
10598 |
|
Lines 11029-11032
Link Here
|
11029 |
deleteProject("P"); |
11029 |
deleteProject("P"); |
11030 |
} |
11030 |
} |
11031 |
} |
11031 |
} |
|
|
11032 |
|
11033 |
static { TESTS_PREFIX = "testBug295894"; } |
11034 |
/** |
11035 |
* @bug 295894: Search shows focus type implementation for nested types even though the scope is restricted to subtypes. |
11036 |
* @test using the hierarchy with the old API includes the focus type. |
11037 |
* @see "https://bugs.eclipse.org/bugs/show_bug.cgi?id=295894" |
11038 |
*/ |
11039 |
public void testBug295894() throws Exception { |
11040 |
this.workingCopies = new ICompilationUnit[1]; |
11041 |
this.workingCopies[0] = getWorkingCopy("/JavaSearchBugs/src/Test.java", |
11042 |
"public class Test {\n" + |
11043 |
" void test() {\n" + |
11044 |
" Test t = new Test();\n" + |
11045 |
" t.foo();\n" + |
11046 |
" }\n" + |
11047 |
" public void foo() {\n" + |
11048 |
" }\n" + |
11049 |
" public class Sub extends Test {\n" + |
11050 |
" public void foo() {}\n" + |
11051 |
" }\n" + |
11052 |
"}\n" + |
11053 |
"" |
11054 |
); |
11055 |
search( |
11056 |
"foo", |
11057 |
METHOD, |
11058 |
DECLARATIONS, |
11059 |
SearchEngine.createHierarchyScope(this.workingCopies[0].findPrimaryType()), |
11060 |
this.resultCollector); |
11061 |
assertSearchResults( |
11062 |
"src/Test.java void Test.foo() [foo] EXACT_MATCH\n" + |
11063 |
"src/Test.java void Test$Sub.foo() [foo] EXACT_MATCH" |
11064 |
); |
11065 |
} |
11066 |
/** |
11067 |
* @bug 295894: Search shows focus type implementation for nested types even though the scope is restricted to subtypes. |
11068 |
* @test when restricting the hierarchy to sub types the focus should not be included |
11069 |
* @see "https://bugs.eclipse.org/bugs/show_bug.cgi?id=295894" |
11070 |
*/ |
11071 |
public void testBug295894a() throws Exception { |
11072 |
this.workingCopies = new ICompilationUnit[1]; |
11073 |
this.workingCopies[0] = getWorkingCopy("/JavaSearchBugs/src/Test.java", |
11074 |
"public class Test {\n" + |
11075 |
" void test() {\n" + |
11076 |
" Test t = new Test();\n" + |
11077 |
" t.foo();\n" + |
11078 |
" }\n" + |
11079 |
" public void foo() {\n" + |
11080 |
" }\n" + |
11081 |
" public class Sub extends Test {\n" + |
11082 |
" public void foo() {}\n" + |
11083 |
" }\n" + |
11084 |
"}\n" + |
11085 |
"" |
11086 |
); |
11087 |
search( |
11088 |
"foo", |
11089 |
METHOD, |
11090 |
DECLARATIONS, |
11091 |
SearchEngine.createHierarchyScope(null, this.workingCopies[0].findPrimaryType(), true, null), |
11092 |
this.resultCollector); |
11093 |
// Test$Sub is a true sub type, not affected by filtering member types |
11094 |
assertSearchResults( |
11095 |
"src/Test.java void Test$Sub.foo() [foo] EXACT_MATCH" |
11096 |
); |
11097 |
} |
11098 |
/** |
11099 |
* @bug 295894: Search shows focus type implementation for nested types even though the scope is restricted to subtypes. |
11100 |
* @test when not restricting the hierarchy to sub types the focus should be included |
11101 |
* @see "https://bugs.eclipse.org/bugs/show_bug.cgi?id=295894" |
11102 |
*/ |
11103 |
public void testBug295894b() throws Exception { |
11104 |
this.workingCopies = new ICompilationUnit[1]; |
11105 |
this.workingCopies[0] = getWorkingCopy("/JavaSearchBugs/src/Test.java", |
11106 |
"public class Test {\n" + |
11107 |
" void test() {\n" + |
11108 |
" Test t = new Test();\n" + |
11109 |
" t.foo();\n" + |
11110 |
" }\n" + |
11111 |
" public void foo() {\n" + |
11112 |
" }\n" + |
11113 |
" public class Sub extends Test {\n" + |
11114 |
" public void foo() {}\n" + |
11115 |
" }\n" + |
11116 |
"}\n" + |
11117 |
"" |
11118 |
); |
11119 |
search( |
11120 |
"foo", |
11121 |
METHOD, |
11122 |
DECLARATIONS, |
11123 |
SearchEngine.createHierarchyScope(null, this.workingCopies[0].findPrimaryType(), false, null), |
11124 |
this.resultCollector); |
11125 |
// Same results as with the old API |
11126 |
assertSearchResults( |
11127 |
"src/Test.java void Test.foo() [foo] EXACT_MATCH\n" + |
11128 |
"src/Test.java void Test$Sub.foo() [foo] EXACT_MATCH" |
11129 |
); |
11130 |
} |
11032 |
} |
11131 |
} |