Author: scabanovich
Date: 2011-09-07 17:30:41 -0400 (Wed, 07 Sep 2011)
New Revision: 34575
Modified:
trunk/cdi/tests/org.jboss.tools.cdi.core.test/resources/tck/tests/lookup/typesafe/resolution/Zoo.java
trunk/cdi/tests/org.jboss.tools.cdi.ui.test/src/org/jboss/tools/cdi/ui/test/search/CDISearchParticipantTest.java
trunk/cdi/tests/org.jboss.tools.cdi.ui.test/src/org/jboss/tools/cdi/ui/test/search/ELReferencesQueryParticipantTest.java
Log:
JBIDE-9672
https://issues.jboss.org/browse/JBIDE-9672
Search for matches of producers in injections and EL fixed.
Modified:
trunk/cdi/tests/org.jboss.tools.cdi.core.test/resources/tck/tests/lookup/typesafe/resolution/Zoo.java
===================================================================
---
trunk/cdi/tests/org.jboss.tools.cdi.core.test/resources/tck/tests/lookup/typesafe/resolution/Zoo.java 2011-09-07
21:04:34 UTC (rev 34574)
+++
trunk/cdi/tests/org.jboss.tools.cdi.core.test/resources/tck/tests/lookup/typesafe/resolution/Zoo.java 2011-09-07
21:30:41 UTC (rev 34575)
@@ -28,8 +28,10 @@
@Produces @Named("aaaf") @Wild PetShop petShop;
-// @Produces @Named("aaaf") @Wild PetShop getPetShop() {
-// return null;
-// }
+ String str = "#{aaam.aslan}";
+ @Produces @Named("aaam") @Wild PetShop getPetShop() {
+ return null;
+ }
+
}
Modified:
trunk/cdi/tests/org.jboss.tools.cdi.ui.test/src/org/jboss/tools/cdi/ui/test/search/CDISearchParticipantTest.java
===================================================================
---
trunk/cdi/tests/org.jboss.tools.cdi.ui.test/src/org/jboss/tools/cdi/ui/test/search/CDISearchParticipantTest.java 2011-09-07
21:04:34 UTC (rev 34574)
+++
trunk/cdi/tests/org.jboss.tools.cdi.ui.test/src/org/jboss/tools/cdi/ui/test/search/CDISearchParticipantTest.java 2011-09-07
21:30:41 UTC (rev 34575)
@@ -193,7 +193,7 @@
testSearchParticipant("JavaSource/org/jboss/jsr299/tck/tests/lookup/injectionpoint/BeanWithInjectionPointMetadata.java",
TYPE_SEARCH, "BeanWithInjectionPointMetadata", "", new
CDIBeanQueryParticipant(), matches);
}
- public void testCDIBeanQueryParticipant2(){
+ public void testCDIBeanQueryParticipantAtProducerField(){
ArrayList<MatchStructure> matches = new ArrayList<MatchStructure>();
matches.add(new MatchStructure(InjectionPointField.class, "Zoo.p"));
@@ -205,4 +205,17 @@
testSearchParticipant("JavaSource/org/jboss/jsr299/tck/tests/lookup/typesafe/resolution/Zoo.java",
FIELD_SEARCH, "petShop", "", new CDIBeanQueryParticipant(), matches);
}
+
+ public void testCDIBeanQueryParticipantAtProducerMethod(){
+ ArrayList<MatchStructure> matches = new ArrayList<MatchStructure>();
+
+ matches.add(new MatchStructure(InjectionPointField.class, "Zoo.p"));
+ matches.add(new MatchStructure(InjectionPointField.class,
"NamedDecoratorBroken.logger"));
+ matches.add(new MatchStructure(InjectionPointField.class,
"NamedStereotypedDecoratorBroken.logger"));
+ matches.add(new MatchStructure(InjectionPointField.class,
"NamedStereotypedDecoratorBroken.logger"));
+ matches.add(new MatchStructure(InjectionPointField.class,
"SpecializingDecoratorBroken.logger"));
+ matches.add(new MatchStructure(InjectionPointField.class,
"ObserverMethodInDecoratorBroken.logger"));
+
+ testSearchParticipant("JavaSource/org/jboss/jsr299/tck/tests/lookup/typesafe/resolution/Zoo.java",
METHOD_SEARCH, "getPetShop", "", new CDIBeanQueryParticipant(),
matches);
+ }
}
Modified:
trunk/cdi/tests/org.jboss.tools.cdi.ui.test/src/org/jboss/tools/cdi/ui/test/search/ELReferencesQueryParticipantTest.java
===================================================================
---
trunk/cdi/tests/org.jboss.tools.cdi.ui.test/src/org/jboss/tools/cdi/ui/test/search/ELReferencesQueryParticipantTest.java 2011-09-07
21:04:34 UTC (rev 34574)
+++
trunk/cdi/tests/org.jboss.tools.cdi.ui.test/src/org/jboss/tools/cdi/ui/test/search/ELReferencesQueryParticipantTest.java 2011-09-07
21:30:41 UTC (rev 34575)
@@ -26,6 +26,34 @@
matches);
}
+ public void testELReferencesQueryParticipantForProducerField() throws CoreException{
+ ArrayList<MatchStructure> matches = new ArrayList<MatchStructure>();
+
+ matches.add(new
MatchStructure("/tck/JavaSource/org/jboss/jsr299/tck/tests/lookup/typesafe/resolution/Zoo.java",
"aaaf"));
+
+ QueryParticipantTestUtils.testSearchParticipant(tckProject,
+ "JavaSource/org/jboss/jsr299/tck/tests/lookup/typesafe/resolution/Zoo.java",
+ QueryParticipantTestUtils.FIELD_SEARCH,
+ "petShop",
+ "",
+ new ELReferencesQueryParticipant(),
+ matches);
+ }
+
+ public void testELReferencesQueryParticipantForProducerMethod() throws CoreException{
+ ArrayList<MatchStructure> matches = new ArrayList<MatchStructure>();
+
+ matches.add(new
MatchStructure("/tck/JavaSource/org/jboss/jsr299/tck/tests/lookup/typesafe/resolution/Zoo.java",
"aaam"));
+
+ QueryParticipantTestUtils.testSearchParticipant(tckProject,
+ "JavaSource/org/jboss/jsr299/tck/tests/lookup/typesafe/resolution/Zoo.java",
+ QueryParticipantTestUtils.METHOD_SEARCH,
+ "getPetShop",
+ "",
+ new ELReferencesQueryParticipant(),
+ matches);
+ }
+
public void testELReferencesQueryParticipantForMethod() throws CoreException{
ArrayList<MatchStructure> matches = new ArrayList<MatchStructure>();