[jbosstools-commits] JBoss Tools SVN: r31041 - in trunk/cdi/tests: org.jboss.tools.cdi.core.test/resources/tck/tests/jbt/search and 1 other directories.

jbosstools-commits at lists.jboss.org jbosstools-commits at lists.jboss.org
Tue May 3 12:58:23 EDT 2011


Author: dazarov
Date: 2011-05-03 12:58:23 -0400 (Tue, 03 May 2011)
New Revision: 31041

Added:
   trunk/cdi/tests/org.jboss.tools.cdi.core.test/resources/tck/tests/jbt/search/
   trunk/cdi/tests/org.jboss.tools.cdi.core.test/resources/tck/tests/jbt/search/EventEmitter.java
   trunk/cdi/tests/org.jboss.tools.cdi.core.test/resources/tck/tests/jbt/search/GoldenRetriever.java
   trunk/cdi/tests/org.jboss.tools.cdi.core.test/resources/tck/tests/jbt/search/GoldenRetrieverLocal.java
   trunk/cdi/tests/org.jboss.tools.cdi.core.test/resources/tck/tests/jbt/search/MyEventType.java
   trunk/cdi/tests/org.jboss.tools.cdi.core.test/resources/tck/tests/jbt/search/NonRuntimeBindingType.java
Modified:
   trunk/cdi/tests/org.jboss.tools.cdi.ui.test/src/org/jboss/tools/cdi/ui/test/search/CDISearchParticipantTest.java
Log:
https://issues.jboss.org/browse/JBIDE-8799

Added: trunk/cdi/tests/org.jboss.tools.cdi.core.test/resources/tck/tests/jbt/search/EventEmitter.java
===================================================================
--- trunk/cdi/tests/org.jboss.tools.cdi.core.test/resources/tck/tests/jbt/search/EventEmitter.java	                        (rev 0)
+++ trunk/cdi/tests/org.jboss.tools.cdi.core.test/resources/tck/tests/jbt/search/EventEmitter.java	2011-05-03 16:58:23 UTC (rev 31041)
@@ -0,0 +1,40 @@
+/*
+ * JBoss, Home of Professional Open Source
+ * Copyright 2010, Red Hat, Inc., and individual contributors
+ * by the @authors tag. See the copyright.txt in the distribution for a
+ * full listing of individual contributors.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ * http://www.apache.org/licenses/LICENSE-2.0
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package org.jboss.jsr299.tck.tests.jbt.search;
+
+import javax.enterprise.event.Event;
+import javax.enterprise.inject.Any;
+import javax.inject.Inject;
+
+class EventEmitter
+{
+   @Inject @Any Event<MyEventType> myEvent;
+   
+   @Inject @Any @NonRuntimeBindingType Event<MyEventType> myEventWithAnyAndNonRuntimeBindingType;
+   
+   @Inject @NonRuntimeBindingType Event<MyEventType> myEventWithOnlyNonRuntimeBindingType;
+   
+   public void fireEvent()
+   {
+      myEvent.fire("event");
+   }
+   
+   public void fireEventWithNonRuntimeBindingType()
+   {
+      myEventWithAnyAndNonRuntimeBindingType.fire("event");
+   }
+}


Property changes on: trunk/cdi/tests/org.jboss.tools.cdi.core.test/resources/tck/tests/jbt/search/EventEmitter.java
___________________________________________________________________
Added: svn:mime-type
   + text/plain

Added: trunk/cdi/tests/org.jboss.tools.cdi.core.test/resources/tck/tests/jbt/search/GoldenRetriever.java
===================================================================
--- trunk/cdi/tests/org.jboss.tools.cdi.core.test/resources/tck/tests/jbt/search/GoldenRetriever.java	                        (rev 0)
+++ trunk/cdi/tests/org.jboss.tools.cdi.core.test/resources/tck/tests/jbt/search/GoldenRetriever.java	2011-05-03 16:58:23 UTC (rev 31041)
@@ -0,0 +1,37 @@
+/*
+ * JBoss, Home of Professional Open Source
+ * Copyright 2010, Red Hat, Inc., and individual contributors
+ * by the @authors tag. See the copyright.txt in the distribution for a
+ * full listing of individual contributors.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ * http://www.apache.org/licenses/LICENSE-2.0
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package org.jboss.jsr299.tck.tests.jbt.search;
+
+import javax.ejb.Remove;
+import javax.ejb.Stateful;
+import javax.enterprise.context.RequestScoped;
+import javax.enterprise.event.Observes;
+
+ at Stateful
+ at RequestScoped
+class GoldenRetriever implements GoldenRetrieverLocal
+{
+   @Remove
+   public void bye(Object something) {
+      
+   }
+
+   public void anObserverMethod(@Observes MyEventType event)
+   {
+      
+   }
+}


Property changes on: trunk/cdi/tests/org.jboss.tools.cdi.core.test/resources/tck/tests/jbt/search/GoldenRetriever.java
___________________________________________________________________
Added: svn:mime-type
   + text/plain

Added: trunk/cdi/tests/org.jboss.tools.cdi.core.test/resources/tck/tests/jbt/search/GoldenRetrieverLocal.java
===================================================================
--- trunk/cdi/tests/org.jboss.tools.cdi.core.test/resources/tck/tests/jbt/search/GoldenRetrieverLocal.java	                        (rev 0)
+++ trunk/cdi/tests/org.jboss.tools.cdi.core.test/resources/tck/tests/jbt/search/GoldenRetrieverLocal.java	2011-05-03 16:58:23 UTC (rev 31041)
@@ -0,0 +1,29 @@
+/*
+ * JBoss, Home of Professional Open Source
+ * Copyright 2010, Red Hat, Inc., and individual contributors
+ * by the @authors tag. See the copyright.txt in the distribution for a
+ * full listing of individual contributors.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ * http://www.apache.org/licenses/LICENSE-2.0
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package org.jboss.jsr299.tck.tests.jbt.search;
+
+import javax.ejb.Local;
+
+ at Local
+public interface GoldenRetrieverLocal
+{
+   
+   public void bye(Object something);
+   
+   public void anObserverMethod(MyTypeEvent event);
+   
+}
\ No newline at end of file


Property changes on: trunk/cdi/tests/org.jboss.tools.cdi.core.test/resources/tck/tests/jbt/search/GoldenRetrieverLocal.java
___________________________________________________________________
Added: svn:mime-type
   + text/plain

Added: trunk/cdi/tests/org.jboss.tools.cdi.core.test/resources/tck/tests/jbt/search/MyEventType.java
===================================================================
--- trunk/cdi/tests/org.jboss.tools.cdi.core.test/resources/tck/tests/jbt/search/MyEventType.java	                        (rev 0)
+++ trunk/cdi/tests/org.jboss.tools.cdi.core.test/resources/tck/tests/jbt/search/MyEventType.java	2011-05-03 16:58:23 UTC (rev 31041)
@@ -0,0 +1,6 @@
+package org.jboss.jsr299.tck.tests.jbt.search;
+
+
+public class MyEventType {
+
+}


Property changes on: trunk/cdi/tests/org.jboss.tools.cdi.core.test/resources/tck/tests/jbt/search/MyEventType.java
___________________________________________________________________
Added: svn:mime-type
   + text/plain

Added: trunk/cdi/tests/org.jboss.tools.cdi.core.test/resources/tck/tests/jbt/search/NonRuntimeBindingType.java
===================================================================
--- trunk/cdi/tests/org.jboss.tools.cdi.core.test/resources/tck/tests/jbt/search/NonRuntimeBindingType.java	                        (rev 0)
+++ trunk/cdi/tests/org.jboss.tools.cdi.core.test/resources/tck/tests/jbt/search/NonRuntimeBindingType.java	2011-05-03 16:58:23 UTC (rev 31041)
@@ -0,0 +1,33 @@
+/*
+ * JBoss, Home of Professional Open Source
+ * Copyright 2010, Red Hat, Inc., and individual contributors
+ * by the @authors tag. See the copyright.txt in the distribution for a
+ * full listing of individual contributors.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ * http://www.apache.org/licenses/LICENSE-2.0
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package org.jboss.jsr299.tck.tests.jbt.search;
+
+import static java.lang.annotation.ElementType.FIELD;
+import static java.lang.annotation.ElementType.PARAMETER;
+
+import java.lang.annotation.Retention;
+import java.lang.annotation.RetentionPolicy;
+import java.lang.annotation.Target;
+
+import javax.inject.Qualifier;
+
+ at Target( { FIELD, PARAMETER })
+ at Qualifier
+ at Retention(RetentionPolicy.CLASS)
+ at interface NonRuntimeBindingType
+{
+}


Property changes on: trunk/cdi/tests/org.jboss.tools.cdi.core.test/resources/tck/tests/jbt/search/NonRuntimeBindingType.java
___________________________________________________________________
Added: svn:mime-type
   + text/plain

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-05-03 16:46:14 UTC (rev 31040)
+++ trunk/cdi/tests/org.jboss.tools.cdi.ui.test/src/org/jboss/tools/cdi/ui/test/search/CDISearchParticipantTest.java	2011-05-03 16:58:23 UTC (rev 31041)
@@ -158,32 +158,21 @@
 		
 		matches.add(new MatchStructure(EventBean.class, "Event"));
 		
-		matches.add(new MatchStructure(ObserverMethod.class, "DiscerningObserver.observeAny()"));
 		matches.add(new MatchStructure(ObserverMethod.class, "EventTypeFamilyObserver.observeObject()"));
-		matches.add(new MatchStructure(ObserverMethod.class, "Fox.observeEvent()"));
 		matches.add(new MatchStructure(ObserverMethod.class, "GoldenRetriever.anObserverMethod()"));
-		matches.add(new MatchStructure(ObserverMethod.class, "Pomeranian.observeStringEvent()"));
-		matches.add(new MatchStructure(ObserverMethod.class, "StringObserver.anotherObserver()"));
-		matches.add(new MatchStructure(ObserverMethod.class, "TeaCupPomeranian.observeSimpleEvent()"));
-		matches.add(new MatchStructure(ObserverMethod.class, "Terrier.observer()"));
-		matches.add(new MatchStructure(ObserverMethod.class, "TibetanTerrier_Broken.observeSomeEvent()"));
-		matches.add(new MatchStructure(ObserverMethod.class, "TibetanTerrier_BrokenNoInterface.observeSomeEvent()"));
 		matches.add(new MatchStructure(ObserverMethod.class, "ClassFragmentLogger.addEntry()"));
-		matches.add(new MatchStructure(ObserverMethod.class, "ObserverMethodInInterceptorBroken.observeSomeEvent()"));
-		matches.add(new MatchStructure(ObserverMethod.class, "ObserverMethodInDecoratorBroken.observeSomeEvent()"));
 		
-		testSearchParticipant("JavaSource/org/jboss/jsr299/tck/tests/event/bindingTypes/EventEmitter.java", FIELD_SEARCH, "stringEvent", "", new InjectionPointQueryParticipant(), matches);
+		testSearchParticipant("JavaSource/org/jboss/jsr299/tck/tests/jbt/search/EventEmitter.java", FIELD_SEARCH, "myEvent", "", new InjectionPointQueryParticipant(), matches);
 	}
 
 	public void testInjectionPointQueryParticipant4(){
 		ArrayList<MatchStructure> matches = new ArrayList<MatchStructure>();
 		
-		matches.add(new MatchStructure(InjectionPointField.class, "EventEmitter.stringEvent"));
-		matches.add(new MatchStructure(InjectionPointField.class, "EventEmitter.stringEventWithAnyAndNonRuntimeBindingType"));
-		matches.add(new MatchStructure(InjectionPointField.class, "EventEmitter.stringEventWithOnlyNonRuntimeBindingType"));
-		matches.add(new MatchStructure(InjectionPointField.class, "OwlFinch_Broken.simpleEvent"));
+		matches.add(new MatchStructure(InjectionPointField.class, "EventEmitter.myEvent"));
+		matches.add(new MatchStructure(InjectionPointField.class, "EventEmitter.myEventWithAnyAndNonRuntimeBindingType"));
+		matches.add(new MatchStructure(InjectionPointField.class, "EventEmitter.myEventWithOnlyNonRuntimeBindingType"));
 		
-		testSearchParticipant("JavaSource/org/jboss/jsr299/tck/tests/implementation/enterprise/newBean/GoldenRetriever.java", METHOD_SEARCH, "anObserverMethod", "", new InjectionPointQueryParticipant(), matches);
+		testSearchParticipant("JavaSource/org/jboss/jsr299/tck/tests/jbt/search/GoldenRetriever.java", METHOD_SEARCH, "anObserverMethod", "", new InjectionPointQueryParticipant(), matches);
 	}
 
 	public void testCDIBeanQueryParticipant(){



More information about the jbosstools-commits mailing list