JBoss Tools SVN: r31556 - trunk/esb/plugins/org.jboss.tools.esb.validator/src/org/jboss/tools/esb/validator.
by jbosstools-commits@lists.jboss.org
Author: scabanovich
Date: 2011-05-27 18:22:29 -0400 (Fri, 27 May 2011)
New Revision: 31556
Modified:
trunk/esb/plugins/org.jboss.tools.esb.validator/src/org/jboss/tools/esb/validator/ESBCoreValidator.java
Log:
JBIDE-9028
https://issues.jboss.org/browse/JBIDE-9028
Modified: trunk/esb/plugins/org.jboss.tools.esb.validator/src/org/jboss/tools/esb/validator/ESBCoreValidator.java
===================================================================
--- trunk/esb/plugins/org.jboss.tools.esb.validator/src/org/jboss/tools/esb/validator/ESBCoreValidator.java 2011-05-27 22:02:32 UTC (rev 31555)
+++ trunk/esb/plugins/org.jboss.tools.esb.validator/src/org/jboss/tools/esb/validator/ESBCoreValidator.java 2011-05-27 22:22:29 UTC (rev 31556)
@@ -63,6 +63,10 @@
return ID;
}
+ public String getBuilderId() {
+ return null;
+ }
+
public IValidatingProjectTree getValidatingProjects(IProject project) {
IProjectValidationContext rootContext = contexts.get(project);
if(rootContext == null) {
13 years, 7 months
JBoss Tools SVN: r31555 - in trunk/download.jboss.org/jbosstools/updates: requirements/gwt and 1 other directory.
by jbosstools-commits@lists.jboss.org
Author: nickboldt
Date: 2011-05-27 18:02:32 -0400 (Fri, 27 May 2011)
New Revision: 31555
Removed:
trunk/download.jboss.org/jbosstools/updates/requirements/gwt/gwt-site-bui...
Modified:
trunk/download.jboss.org/jbosstools/updates/indigo/M7/compositeArtifacts.xml
trunk/download.jboss.org/jbosstools/updates/indigo/M7/compositeContent.xml
trunk/download.jboss.org/jbosstools/updates/requirements/gwt/build.xml
trunk/download.jboss.org/jbosstools/updates/requirements/gwt/index.html
Log:
remove .launch file; update GWT builder to reflect last used version (https://issues.jboss.org/browse/JBIDE-8753); remove GWT from indigo M7 composite
Modified: trunk/download.jboss.org/jbosstools/updates/indigo/M7/compositeArtifacts.xml
===================================================================
--- trunk/download.jboss.org/jbosstools/updates/indigo/M7/compositeArtifacts.xml 2011-05-27 22:01:24 UTC (rev 31554)
+++ trunk/download.jboss.org/jbosstools/updates/indigo/M7/compositeArtifacts.xml 2011-05-27 22:02:32 UTC (rev 31555)
@@ -12,29 +12,28 @@
endfun
nnoremap <Leader>ts :call ReplaceTimestamp()<CR>
-->
-<property name='p2.timestamp' value='1305546447000'/>
+<property name='p2.timestamp' value='1305546448000'/>
</properties>
-<children size='20'>
+<children size='18'>
<child location='../../requirements/indigo/201105060900-M7/'/>
<child location='../../requirements/birt/3.7M7/'/>
<child location='../../requirements/eclipse/3.7M7/'/>
<child location='../../requirements/emf/2.7M7/'/>
<child location='../../requirements/webtools/3.3M7/'/>
+
<child location='../../requirements/m2eclipse/0.13.0.201105091504/'/>
<child location='../../requirements/mylyn/3.6-I20110504-0744/'/>
<child location='../../requirements/orbit/S20110515001817/'/>
<child location='../../requirements/ecf/3.5/'/>
<child location='../../requirements/egit/0.11/'/>
+
<child location='../../requirements/findbugs/1.3.9/'/>
-<child location='../../requirements/gwt/201102111811/'/>
<child location='../../requirements/jslint/1.5/'/>
-
<child location='../../requirements/pmd/3.2.6/'/>
<child location='../../requirements/springide/2.6.0.201103160035/'/>
-
<child location='../../requirements/subclipse/1.6_1.3/'/>
-<child location='../../requirements/subversive/0.7.9_2.2.2_1.3/'/>
+
<child location='../../requirements/swtbot/2.0.4/'/>
<child location='../../requirements/testng/6.0.1.20110418_1444/'/>
<child location='../../requirements/xulrunner-1.9.2/'/>
Modified: trunk/download.jboss.org/jbosstools/updates/indigo/M7/compositeContent.xml
===================================================================
--- trunk/download.jboss.org/jbosstools/updates/indigo/M7/compositeContent.xml 2011-05-27 22:01:24 UTC (rev 31554)
+++ trunk/download.jboss.org/jbosstools/updates/indigo/M7/compositeContent.xml 2011-05-27 22:02:32 UTC (rev 31555)
@@ -12,29 +12,28 @@
endfun
nnoremap <Leader>ts :call ReplaceTimestamp()<CR>
-->
-<property name='p2.timestamp' value='1305546447000'/>
+<property name='p2.timestamp' value='1305546448000'/>
</properties>
-<children size='20'>
+<children size='18'>
<child location='../../requirements/indigo/201105060900-M7/'/>
<child location='../../requirements/birt/3.7M7/'/>
<child location='../../requirements/eclipse/3.7M7/'/>
<child location='../../requirements/emf/2.7M7/'/>
<child location='../../requirements/webtools/3.3M7/'/>
+
<child location='../../requirements/m2eclipse/0.13.0.201105091504/'/>
<child location='../../requirements/mylyn/3.6-I20110504-0744/'/>
<child location='../../requirements/orbit/S20110515001817/'/>
<child location='../../requirements/ecf/3.5/'/>
<child location='../../requirements/egit/0.11/'/>
+
<child location='../../requirements/findbugs/1.3.9/'/>
-<child location='../../requirements/gwt/201102111811/'/>
<child location='../../requirements/jslint/1.5/'/>
-
<child location='../../requirements/pmd/3.2.6/'/>
<child location='../../requirements/springide/2.6.0.201103160035/'/>
-
<child location='../../requirements/subclipse/1.6_1.3/'/>
-<child location='../../requirements/subversive/0.7.9_2.2.2_1.3/'/>
+
<child location='../../requirements/swtbot/2.0.4/'/>
<child location='../../requirements/testng/6.0.1.20110418_1444/'/>
<child location='../../requirements/xulrunner-1.9.2/'/>
Modified: trunk/download.jboss.org/jbosstools/updates/requirements/gwt/build.xml
===================================================================
--- trunk/download.jboss.org/jbosstools/updates/requirements/gwt/build.xml 2011-05-27 22:01:24 UTC (rev 31554)
+++ trunk/download.jboss.org/jbosstools/updates/requirements/gwt/build.xml 2011-05-27 22:02:32 UTC (rev 31555)
@@ -16,12 +16,13 @@
-f ~/RHDS/updates/requirements/gwt/build.xml -Ddestination=/tmp/gwt-repo
-->
<target name="mirror">
+ <!-- note: this site no longer contains the 201012211742 release of GWT, since Google removes old versions -->
<property name="URL" value="http://dl.google.com/eclipse/plugin/3.6" />
<property name="destination" value="/home/nboldt/tru/download.jboss.org/jbosstools/updates/requirements/gwt/" />
<property name="compress" value="true" />
<p2.mirror>
- <repository location="file:${destination}/201102111811-complete" name="Google plugins for Eclipse 3.6" />
+ <repository location="file:${destination}/201012211742" name="Google plugins for Eclipse 3.6" />
<source>
<repository location="${URL}" />
</source>
@@ -35,9 +36,6 @@
<slicingOptions includeFeatures="true" followStrict="true" />
</p2.mirror>
- <p2.publish.featuresAndBundles metadataRepository="file:${destination}/201010280102" artifactRepository="file:${destination}/201010280102" publishartifacts="true" source="${destination}/201010280102" compress="${compress}" />
<p2.publish.featuresAndBundles metadataRepository="file:${destination}/201012211742" artifactRepository="file:${destination}/201012211742" publishartifacts="true" source="${destination}/201012211742" compress="${compress}" />
- <p2.publish.featuresAndBundles metadataRepository="file:${destination}/201102111811" artifactRepository="file:${destination}/201102111811" publishartifacts="true" source="${destination}/201102111811" compress="${compress}" />
- <p2.publish.featuresAndBundles metadataRepository="file:${destination}/201102111811-complete" artifactRepository="file:${destination}/201102111811-complete" publishartifacts="true" source="${destination}/201102111811-complete" compress="${compress}" />
</target>
</project>
Deleted: trunk/download.jboss.org/jbosstools/updates/requirements/gwt/gwt-site-bui...
===================================================================
--- trunk/download.jboss.org/jbosstools/updates/requirements/gwt/gwt-site-bui... 2011-05-27 22:01:24 UTC (rev 31554)
+++ trunk/download.jboss.org/jbosstools/updates/requirements/gwt/gwt-site-bui... 2011-05-27 22:02:32 UTC (rev 31555)
@@ -1,32 +0,0 @@
-<?xml version="1.0" encoding="UTF-8" standalone="no"?>
-<launchConfiguration type="org.eclipse.pde.ui.RuntimeWorkbench">
-<booleanAttribute key="append.args" value="true"/>
-<stringAttribute key="application" value="org.eclipse.ant.core.antRunner"/>
-<booleanAttribute key="askclear" value="true"/>
-<booleanAttribute key="automaticAdd" value="true"/>
-<booleanAttribute key="automaticValidate" value="false"/>
-<stringAttribute key="bootstrap" value=""/>
-<stringAttribute key="checked" value="[NONE]"/>
-<booleanAttribute key="clearConfig" value="false"/>
-<booleanAttribute key="clearws" value="false"/>
-<booleanAttribute key="clearwslog" value="false"/>
-<stringAttribute key="configLocation" value="${workspace_loc}/.metadata/.plugins/org.eclipse.pde.core/gwt-site-builder"/>
-<booleanAttribute key="default" value="true"/>
-<booleanAttribute key="includeOptional" value="true"/>
-<stringAttribute key="location" value="${workspace_loc}/../runtime-New_configuration"/>
-<listAttribute key="org.eclipse.debug.ui.favoriteGroups">
-<listEntry value="org.eclipse.debug.ui.launchGroup.run"/>
-</listAttribute>
-<stringAttribute key="org.eclipse.jdt.launching.PROGRAM_ARGUMENTS" value="-os ${target.os} -ws ${target.ws} -arch ${target.arch} -nl ${target.nl} -consoleLog -nosplash -data /tmp -application org.eclipse.ant.core.antRunner -f "/home/nboldt/tru/download.jboss.org/jbosstools/updates/requirements/gwt/build.xml""/>
-<stringAttribute key="org.eclipse.jdt.launching.SOURCE_PATH_PROVIDER" value="org.eclipse.pde.ui.workbenchClasspathProvider"/>
-<stringAttribute key="org.eclipse.jdt.launching.VM_ARGUMENTS" value="-Xms40m -Xmx384m"/>
-<stringAttribute key="pde.version" value="3.3"/>
-<stringAttribute key="product" value="org.eclipse.sdk.ide"/>
-<booleanAttribute key="show_selected_only" value="false"/>
-<stringAttribute key="templateConfig" value="${target_home}/configuration/config.ini"/>
-<booleanAttribute key="tracing" value="false"/>
-<booleanAttribute key="useCustomFeatures" value="false"/>
-<booleanAttribute key="useDefaultConfig" value="true"/>
-<booleanAttribute key="useDefaultConfigArea" value="true"/>
-<booleanAttribute key="useProduct" value="false"/>
-</launchConfiguration>
Modified: trunk/download.jboss.org/jbosstools/updates/requirements/gwt/index.html
===================================================================
--- trunk/download.jboss.org/jbosstools/updates/requirements/gwt/index.html 2011-05-27 22:01:24 UTC (rev 31554)
+++ trunk/download.jboss.org/jbosstools/updates/requirements/gwt/index.html 2011-05-27 22:02:32 UTC (rev 31555)
@@ -46,10 +46,7 @@
-->
<br/>
<ul>
-<li><a class=link href=201102111811-complete>201102111811-complete</a> </li>
-<li><a class=link href=201102111811>201102111811</a> </li>
-<li><a class=link href=201012211742>201012211742</a> </li>
-<li><a class=link href=201010280102>201010280102</a> </li>
+<li><a class=link href=201012211742>201012211742</a> (for use with JBoss Tools 3.2.x)</li>
</ul>
<br/>
</td>
13 years, 7 months
JBoss Tools SVN: r31554 - in trunk/cdi/tests/org.jboss.tools.cdi.core.test: src/org/jboss/tools/cdi/core/test/tck and 1 other directory.
by jbosstools-commits@lists.jboss.org
Author: scabanovich
Date: 2011-05-27 18:01:24 -0400 (Fri, 27 May 2011)
New Revision: 31554
Modified:
trunk/cdi/tests/org.jboss.tools.cdi.core.test/resources/tck/tests/event/fires/DogWhisperer.java
trunk/cdi/tests/org.jboss.tools.cdi.core.test/src/org/jboss/tools/cdi/core/test/tck/ObserverMethodResolutionTest.java
Log:
JBIDE-9020
https://issues.jboss.org/browse/JBIDE-9020
Modified: trunk/cdi/tests/org.jboss.tools.cdi.core.test/resources/tck/tests/event/fires/DogWhisperer.java
===================================================================
--- trunk/cdi/tests/org.jboss.tools.cdi.core.test/resources/tck/tests/event/fires/DogWhisperer.java 2011-05-27 22:00:57 UTC (rev 31553)
+++ trunk/cdi/tests/org.jboss.tools.cdi.core.test/resources/tck/tests/event/fires/DogWhisperer.java 2011-05-27 22:01:24 UTC (rev 31554)
@@ -43,4 +43,6 @@
{
praiseEvent.fire(new Praise());
}
+
+ @Inject void foo(Object o) {}
}
Modified: trunk/cdi/tests/org.jboss.tools.cdi.core.test/src/org/jboss/tools/cdi/core/test/tck/ObserverMethodResolutionTest.java
===================================================================
--- trunk/cdi/tests/org.jboss.tools.cdi.core.test/src/org/jboss/tools/cdi/core/test/tck/ObserverMethodResolutionTest.java 2011-05-27 22:00:57 UTC (rev 31553)
+++ trunk/cdi/tests/org.jboss.tools.cdi.core.test/src/org/jboss/tools/cdi/core/test/tck/ObserverMethodResolutionTest.java 2011-05-27 22:01:24 UTC (rev 31554)
@@ -12,10 +12,13 @@
import java.util.Set;
+import org.eclipse.core.resources.IFile;
import org.eclipse.jdt.core.IMethod;
import org.jboss.tools.cdi.core.IBean;
+import org.jboss.tools.cdi.core.IClassBean;
import org.jboss.tools.cdi.core.IInjectionPoint;
import org.jboss.tools.cdi.core.IInjectionPointField;
+import org.jboss.tools.cdi.core.IInjectionPointMethod;
import org.jboss.tools.cdi.core.IInjectionPointParameter;
import org.jboss.tools.cdi.core.IObserverMethod;
import org.jboss.tools.cdi.core.IParameter;
@@ -112,7 +115,31 @@
assertTrue(points.contains(friendlyEvent));
}
+ public void testResolveObserverMethod() {
+ IFile file = tckProject.getFile("JavaSource/org/jboss/jsr299/tck/tests/event/fires/DogWhisperer.java");
+ Set<IBean> beans = cdiProject.getBeans(file.getFullPath());
+ IClassBean cb = null;
+ for (IBean b: beans) {
+ if(b instanceof IClassBean) {
+ cb = (IClassBean)b;
+ }
+ }
+ assertNotNull(cb);
+ Set<IInjectionPoint> ps = cb.getInjectionPoints();
+ IInjectionPointMethod mp = null;
+ for (IInjectionPoint p: ps) {
+ if(p instanceof IInjectionPointMethod) {
+ mp = (IInjectionPointMethod)p;
+ }
+ }
+ assertNotNull(mp);
+ assertEquals("foo", mp.getMethod().getElementName());
+ //no exception should happen on invoking resolveObserverMethods
+ cdiProject.resolveObserverMethods(mp);
+
+ }
+
public void testEventBean() {
IInjectionPointField tamingEvent = getInjectionPointField("JavaSource/org/jboss/jsr299/tck/tests/event/fires/DogWhisperer.java", "tamingEvent");
assertNotNull(tamingEvent);
13 years, 7 months
JBoss Tools SVN: r31553 - trunk/cdi/plugins/org.jboss.tools.cdi.core/src/org/jboss/tools/cdi/internal/core/impl.
by jbosstools-commits@lists.jboss.org
Author: scabanovich
Date: 2011-05-27 18:00:57 -0400 (Fri, 27 May 2011)
New Revision: 31553
Modified:
trunk/cdi/plugins/org.jboss.tools.cdi.core/src/org/jboss/tools/cdi/internal/core/impl/CDIProject.java
Log:
JBIDE-9020
https://issues.jboss.org/browse/JBIDE-9020
Modified: trunk/cdi/plugins/org.jboss.tools.cdi.core/src/org/jboss/tools/cdi/internal/core/impl/CDIProject.java
===================================================================
--- trunk/cdi/plugins/org.jboss.tools.cdi.core/src/org/jboss/tools/cdi/internal/core/impl/CDIProject.java 2011-05-27 21:19:04 UTC (rev 31552)
+++ trunk/cdi/plugins/org.jboss.tools.cdi.core/src/org/jboss/tools/cdi/internal/core/impl/CDIProject.java 2011-05-27 22:00:57 UTC (rev 31553)
@@ -839,7 +839,7 @@
* @return
*/
private IParametedType getEventType(IParametedType t) {
- if(t.getType() == null || !CDIConstants.EVENT_TYPE_NAME.equals(t.getType().getFullyQualifiedName())) {
+ if(t == null || t.getType() == null || !CDIConstants.EVENT_TYPE_NAME.equals(t.getType().getFullyQualifiedName())) {
return null;
}
List<? extends IParametedType> ps = t.getParameters();
13 years, 7 months
JBoss Tools SVN: r31552 - trunk/cdi/tests/org.jboss.tools.cdi.seam.solder.core.test/src/org/jboss/tools/cdi/seam/solder/core/test.
by jbosstools-commits@lists.jboss.org
Author: scabanovich
Date: 2011-05-27 17:19:04 -0400 (Fri, 27 May 2011)
New Revision: 31552
Modified:
trunk/cdi/tests/org.jboss.tools.cdi.seam.solder.core.test/src/org/jboss/tools/cdi/seam/solder/core/test/GenericBeanTest.java
Log:
JBIDE-8674
https://issues.jboss.org/browse/JBIDE-8674
Modified: trunk/cdi/tests/org.jboss.tools.cdi.seam.solder.core.test/src/org/jboss/tools/cdi/seam/solder/core/test/GenericBeanTest.java
===================================================================
--- trunk/cdi/tests/org.jboss.tools.cdi.seam.solder.core.test/src/org/jboss/tools/cdi/seam/solder/core/test/GenericBeanTest.java 2011-05-27 20:47:50 UTC (rev 31551)
+++ trunk/cdi/tests/org.jboss.tools.cdi.seam.solder.core.test/src/org/jboss/tools/cdi/seam/solder/core/test/GenericBeanTest.java 2011-05-27 21:19:04 UTC (rev 31552)
@@ -11,15 +11,20 @@
package org.jboss.tools.cdi.seam.solder.core.test;
import java.io.IOException;
+import java.util.HashSet;
+import java.util.Iterator;
import java.util.Set;
+import org.eclipse.core.resources.IFile;
import org.eclipse.core.runtime.CoreException;
import org.eclipse.jdt.core.IType;
import org.jboss.tools.cdi.core.CDICorePlugin;
import org.jboss.tools.cdi.core.IBean;
import org.jboss.tools.cdi.core.ICDIProject;
import org.jboss.tools.cdi.core.IClassBean;
+import org.jboss.tools.cdi.core.IInjectionPoint;
import org.jboss.tools.cdi.core.IInjectionPointField;
+import org.jboss.tools.cdi.core.IProducer;
import org.jboss.tools.cdi.core.IProducerMethod;
import org.jboss.tools.cdi.seam.solder.core.generic.GenericBeanProducerMethod;
import org.jboss.tools.cdi.seam.solder.core.generic.GenericClassBean;
@@ -106,7 +111,77 @@
assertEquals("MyExtendedConfiguration", gbc.getBeanClass().getElementName());
}
+
+ public void testGenericBeanInjectionIntoGenericPoint() throws CoreException {
+ ICDIProject cdi = CDICorePlugin.getCDIProject(project, true);
+
+ /*
+ * Injection point: in class MyGenericBean2
+ * @Inject @Generic MyBean c;
+ * There are 5 configurations, hence there are 5 beans MyGenericBean2,
+ * each has that injection point;
+ * in all cases bean is produced by MyGenericBean.createMyFirstBean()
+ */
+ Set<IInjectionPointField> injections = getGenericInjectionPointField(cdi, "src/org/jboss/generic/MyGenericBean2.java", "c");
+ assertEquals(5, injections.size());
+ for (IInjectionPointField injection: injections) {
+ Set<IBean> bs = cdi.getBeans(false, injection);
+ assertEquals(1, bs.size());
+ IBean b = bs.iterator().next();
+ assertTrue(b instanceof IProducerMethod);
+ IProducerMethod m = (IProducerMethod)b;
+ assertEquals("createMyFirstBean", m.getMethod().getElementName());
+ }
+
+ }
+
+ public void testGenericTypeInjection() throws CoreException {
+ ICDIProject cdi = CDICorePlugin.getCDIProject(project, true);
+
+ /*
+ * Injection point: in class MyGenericBean2
+ * @Inject MyGenericType type;
+ * There are 5 configurations, hence there are 5 beans MyGenericBean2,
+ * each has that injection point;
+ * in all cases we insert a dummy bean of type org.jboss.generic.MyGenericType
+ */
+ Set<IInjectionPointField> injections = getGenericInjectionPointField(cdi, "src/org/jboss/generic/MyGenericBean2.java", "type");
+ assertEquals(5, injections.size());
+ for (IInjectionPointField injection: injections) {
+ Set<IBean> bs = cdi.getBeans(false, injection);
+ assertEquals(1, bs.size());
+ IBean b = bs.iterator().next();
+ assertTrue(b instanceof IClassBean);
+ IType t = ((IClassBean)b).getBeanClass();
+ assertEquals("org.jboss.generic.MyGenericType", t.getFullyQualifiedName());
+ }
+
+ }
//TODO - more tests
+ protected Set<IInjectionPointField> getGenericInjectionPointField(ICDIProject cdi, String beanClassFilePath, String fieldName) {
+ Set<IInjectionPointField> result = new HashSet<IInjectionPointField>();
+ IFile file = cdi.getNature().getProject().getFile(beanClassFilePath);
+ Set<IBean> beans = cdi.getBeans(file.getFullPath());
+ Iterator<IBean> it = beans.iterator();
+ while(it.hasNext()) {
+ IBean b = it.next();
+ if(b instanceof IProducer) it.remove();
+ }
+
+ for (IBean b: beans) {
+ Set<IInjectionPoint> injections = b.getInjectionPoints();
+ for (IInjectionPoint injectionPoint : injections) {
+ if(injectionPoint instanceof IInjectionPointField) {
+ IInjectionPointField field = (IInjectionPointField)injectionPoint;
+ if(fieldName.equals(field.getField().getElementName())) {
+ result.add(field);
+ }
+ }
+ }
+ }
+ return result;
+ }
+
}
13 years, 7 months
JBoss Tools SVN: r31551 - in trunk/cdi/tests/org.jboss.tools.cdi.seam.solder.core.test: projects/CDISolderTest/src/org/jboss/generic and 1 other directories.
by jbosstools-commits@lists.jboss.org
Author: scabanovich
Date: 2011-05-27 16:47:50 -0400 (Fri, 27 May 2011)
New Revision: 31551
Added:
trunk/cdi/tests/org.jboss.tools.cdi.seam.solder.core.test/projects/CDISolderTest/src/org/jboss/generic/
trunk/cdi/tests/org.jboss.tools.cdi.seam.solder.core.test/projects/CDISolderTest/src/org/jboss/generic/MyBean.java
trunk/cdi/tests/org.jboss.tools.cdi.seam.solder.core.test/projects/CDISolderTest/src/org/jboss/generic/MyBean2.java
trunk/cdi/tests/org.jboss.tools.cdi.seam.solder.core.test/projects/CDISolderTest/src/org/jboss/generic/MyBean3.java
trunk/cdi/tests/org.jboss.tools.cdi.seam.solder.core.test/projects/CDISolderTest/src/org/jboss/generic/MyBean4.java
trunk/cdi/tests/org.jboss.tools.cdi.seam.solder.core.test/projects/CDISolderTest/src/org/jboss/generic/MyBeanInjections.java
trunk/cdi/tests/org.jboss.tools.cdi.seam.solder.core.test/projects/CDISolderTest/src/org/jboss/generic/MyConfiguration.java
trunk/cdi/tests/org.jboss.tools.cdi.seam.solder.core.test/projects/CDISolderTest/src/org/jboss/generic/MyConfigurationProducer.java
trunk/cdi/tests/org.jboss.tools.cdi.seam.solder.core.test/projects/CDISolderTest/src/org/jboss/generic/MyEvent.java
trunk/cdi/tests/org.jboss.tools.cdi.seam.solder.core.test/projects/CDISolderTest/src/org/jboss/generic/MyExtendedConfiguration.java
trunk/cdi/tests/org.jboss.tools.cdi.seam.solder.core.test/projects/CDISolderTest/src/org/jboss/generic/MyGenericBean.java
trunk/cdi/tests/org.jboss.tools.cdi.seam.solder.core.test/projects/CDISolderTest/src/org/jboss/generic/MyGenericBean2.java
trunk/cdi/tests/org.jboss.tools.cdi.seam.solder.core.test/projects/CDISolderTest/src/org/jboss/generic/MyGenericType.java
trunk/cdi/tests/org.jboss.tools.cdi.seam.solder.core.test/projects/CDISolderTest/src/org/jboss/generic/Qualifier1.java
trunk/cdi/tests/org.jboss.tools.cdi.seam.solder.core.test/projects/CDISolderTest/src/org/jboss/generic/Qualifier2.java
trunk/cdi/tests/org.jboss.tools.cdi.seam.solder.core.test/projects/CDISolderTest/src/org/jboss/generic/Qualifier3.java
trunk/cdi/tests/org.jboss.tools.cdi.seam.solder.core.test/projects/CDISolderTest/src/org/jboss/generic/Qualifier4.java
trunk/cdi/tests/org.jboss.tools.cdi.seam.solder.core.test/src/org/jboss/tools/cdi/seam/solder/core/test/GenericBeanTest.java
Modified:
trunk/cdi/tests/org.jboss.tools.cdi.seam.solder.core.test/src/org/jboss/tools/cdi/seam/solder/core/test/CDISeamSolderCoreAllTests.java
Log:
JBIDE-8674
https://issues.jboss.org/browse/JBIDE-8674
Added: trunk/cdi/tests/org.jboss.tools.cdi.seam.solder.core.test/projects/CDISolderTest/src/org/jboss/generic/MyBean.java
===================================================================
--- trunk/cdi/tests/org.jboss.tools.cdi.seam.solder.core.test/projects/CDISolderTest/src/org/jboss/generic/MyBean.java (rev 0)
+++ trunk/cdi/tests/org.jboss.tools.cdi.seam.solder.core.test/projects/CDISolderTest/src/org/jboss/generic/MyBean.java 2011-05-27 20:47:50 UTC (rev 31551)
@@ -0,0 +1,17 @@
+package org.jboss.generic;
+
+/**
+ * Beans of this type are produced by MyGenericBean.createMyFirstBean()
+ * for every of 5 configurations.
+ * It is injected
+ * - into fields first1, first2, first3, first4, first5 of MyBeanInjections
+ * to check each configuration.
+ * - into generic injection field 'c' of MyGenericField2.
+ * - into generic parameter of injection method setMyBean
+ * - into type parameter of Event typed fields event1 and event2 of MyBeanInjections.
+ */
+public class MyBean {
+
+ public MyBean(String s) {}
+
+}
Property changes on: trunk/cdi/tests/org.jboss.tools.cdi.seam.solder.core.test/projects/CDISolderTest/src/org/jboss/generic/MyBean.java
___________________________________________________________________
Added: svn:mime-type
+ text/plain
Added: trunk/cdi/tests/org.jboss.tools.cdi.seam.solder.core.test/projects/CDISolderTest/src/org/jboss/generic/MyBean2.java
===================================================================
--- trunk/cdi/tests/org.jboss.tools.cdi.seam.solder.core.test/projects/CDISolderTest/src/org/jboss/generic/MyBean2.java (rev 0)
+++ trunk/cdi/tests/org.jboss.tools.cdi.seam.solder.core.test/projects/CDISolderTest/src/org/jboss/generic/MyBean2.java 2011-05-27 20:47:50 UTC (rev 31551)
@@ -0,0 +1,14 @@
+package org.jboss.generic;
+
+/**
+ * Beans of this type are produced by MyGenericBean.createMySecondBean()
+ * for every of 5 configurations.
+ * It is injected into fields second1, second2, second3 of MyBeanInjections
+ * to check some configurations.
+ *
+ */
+public class MyBean2 {
+
+ public MyBean2(String s) {}
+
+}
Property changes on: trunk/cdi/tests/org.jboss.tools.cdi.seam.solder.core.test/projects/CDISolderTest/src/org/jboss/generic/MyBean2.java
___________________________________________________________________
Added: svn:mime-type
+ text/plain
Added: trunk/cdi/tests/org.jboss.tools.cdi.seam.solder.core.test/projects/CDISolderTest/src/org/jboss/generic/MyBean3.java
===================================================================
--- trunk/cdi/tests/org.jboss.tools.cdi.seam.solder.core.test/projects/CDISolderTest/src/org/jboss/generic/MyBean3.java (rev 0)
+++ trunk/cdi/tests/org.jboss.tools.cdi.seam.solder.core.test/projects/CDISolderTest/src/org/jboss/generic/MyBean3.java 2011-05-27 20:47:50 UTC (rev 31551)
@@ -0,0 +1,15 @@
+package org.jboss.generic;
+
+/**
+ * Beans of this type are produced by MyGenericBean.myThirdBean
+ * for every of 5 configurations.
+ * It is injected
+ * - into fields third1, third2, third3, third4, third5 of MyBeanInjections
+ * to check each configuration.
+ *
+ */
+public class MyBean3 {
+
+ public MyBean3(String s) {}
+
+}
Property changes on: trunk/cdi/tests/org.jboss.tools.cdi.seam.solder.core.test/projects/CDISolderTest/src/org/jboss/generic/MyBean3.java
___________________________________________________________________
Added: svn:mime-type
+ text/plain
Added: trunk/cdi/tests/org.jboss.tools.cdi.seam.solder.core.test/projects/CDISolderTest/src/org/jboss/generic/MyBean4.java
===================================================================
--- trunk/cdi/tests/org.jboss.tools.cdi.seam.solder.core.test/projects/CDISolderTest/src/org/jboss/generic/MyBean4.java (rev 0)
+++ trunk/cdi/tests/org.jboss.tools.cdi.seam.solder.core.test/projects/CDISolderTest/src/org/jboss/generic/MyBean4.java 2011-05-27 20:47:50 UTC (rev 31551)
@@ -0,0 +1,15 @@
+package org.jboss.generic;
+
+/**
+ * Beans of this type are produced by MyGenericBean2.myFourthBean
+ * for every of 5 configurations.
+ * It is injected
+ * - into parameters fourth1, fourth2, fourth3, fourth4, fourth5 of
+ * method MyBeanInjections.setAllMyBean4 to check each configuration.
+ *
+ */
+public class MyBean4 {
+
+ public MyBean4(String s) {}
+
+}
Property changes on: trunk/cdi/tests/org.jboss.tools.cdi.seam.solder.core.test/projects/CDISolderTest/src/org/jboss/generic/MyBean4.java
___________________________________________________________________
Added: svn:mime-type
+ text/plain
Added: trunk/cdi/tests/org.jboss.tools.cdi.seam.solder.core.test/projects/CDISolderTest/src/org/jboss/generic/MyBeanInjections.java
===================================================================
--- trunk/cdi/tests/org.jboss.tools.cdi.seam.solder.core.test/projects/CDISolderTest/src/org/jboss/generic/MyBeanInjections.java (rev 0)
+++ trunk/cdi/tests/org.jboss.tools.cdi.seam.solder.core.test/projects/CDISolderTest/src/org/jboss/generic/MyBeanInjections.java 2011-05-27 20:47:50 UTC (rev 31551)
@@ -0,0 +1,122 @@
+package org.jboss.generic;
+
+import javax.enterprise.event.Event;
+import javax.enterprise.inject.Any;
+import javax.enterprise.inject.Default;
+import javax.inject.Inject;
+
+public class MyBeanInjections {
+
+ /**
+ * Injected method producer MyGenericBean.createMyFirstBean()
+ * Configuration produced by MyConfigurationProducer.getOneConfig()
+ */
+ @Inject
+ MyBean first1;
+
+ /**
+ * Injected method producer MyGenericBean.createMyFirstBean()
+ * Configuration produced by MyConfigurationProducer.getSecondConfig()
+ */
+ @Inject
+ @Qualifier1
+ MyBean first2;
+
+ /**
+ * Injected method producer MyGenericBean.createMyFirstBean()
+ * Configuration produced by MyExtendedConfiguration
+ */
+ @Inject
+ @Qualifier2
+ MyBean first3;
+
+ /**
+ * Injected method producer MyGenericBean.createMyFirstBean()
+ * Configuration produced by MyConfigurationProducer.fourthConfig
+ */
+ @Inject
+ @Qualifier4("Fourth")
+ MyBean first4;
+
+ /**
+ * Injected method producer MyGenericBean.createMyFirstBean()
+ * Configuration produced by MyConfigurationProducer.fifthConfig
+ */
+ @Inject
+ @Qualifier4("Fifth")
+ MyBean first5;
+
+ @Inject
+ MyBean2 second1;
+
+ @Inject
+ @Qualifier1
+ MyBean2 second2;
+
+ @Inject
+ @Qualifier2
+ MyBean2 second3;
+
+ /**
+ * Injected field producer MyGenericBean.myThirdBean
+ * Configuration produced by MyConfigurationProducer.getOneConfig()
+ */
+ @Inject
+ MyBean3 third1;
+
+ /**
+ * Injected field producer MyGenericBean.myThirdBean
+ * Configuration produced by MyConfigurationProducer.getSecondConfig()
+ */
+ @Inject
+ @Qualifier1
+ MyBean3 third2;
+
+ /**
+ * Injected field producer MyGenericBean.myThirdBean
+ * Configuration produced by MyExtendedConfiguration
+ */
+ @Inject
+ @Qualifier2
+ MyBean3 third3;
+
+ /**
+ * Injected field producer MyGenericBean.myThirdBean
+ * Configuration produced by MyConfigurationProducer.fourthConfig
+ */
+ @Inject
+ @Qualifier4("Fourth")
+ MyBean3 third4;
+
+ /**
+ * Injected field producer MyGenericBean.myThirdBean
+ * Configuration produced by MyConfigurationProducer.fifthConfig
+ */
+ @Inject
+ @Qualifier4("Fifth")
+ MyBean3 third5;
+
+ @Inject
+ void setAllMyBean4(@Default MyBean4 fourth1,
+ @Qualifier1 MyBean4 fourth2,
+ @Qualifier2 MyBean4 fourth3,
+ @Qualifier4("Fourth") MyBean4 fourth4,
+ @Qualifier4("Fifth") MyBean4 fourth5
+ ) {
+
+ }
+
+ @Inject
+ @Any
+ Event<MyBean> event1;
+
+ @Inject
+ @Qualifier1
+ Event<MyBean> event2;
+
+ @Inject
+ @Qualifier2
+ Event<MyBean> event3;
+
+
+}
Property changes on: trunk/cdi/tests/org.jboss.tools.cdi.seam.solder.core.test/projects/CDISolderTest/src/org/jboss/generic/MyBeanInjections.java
___________________________________________________________________
Added: svn:mime-type
+ text/plain
Added: trunk/cdi/tests/org.jboss.tools.cdi.seam.solder.core.test/projects/CDISolderTest/src/org/jboss/generic/MyConfiguration.java
===================================================================
--- trunk/cdi/tests/org.jboss.tools.cdi.seam.solder.core.test/projects/CDISolderTest/src/org/jboss/generic/MyConfiguration.java (rev 0)
+++ trunk/cdi/tests/org.jboss.tools.cdi.seam.solder.core.test/projects/CDISolderTest/src/org/jboss/generic/MyConfiguration.java 2011-05-27 20:47:50 UTC (rev 31551)
@@ -0,0 +1,8 @@
+package org.jboss.generic;
+
+public class MyConfiguration {
+ public MyConfiguration(String s) {
+ // TODO Auto-generated constructor stub
+ }
+
+}
Property changes on: trunk/cdi/tests/org.jboss.tools.cdi.seam.solder.core.test/projects/CDISolderTest/src/org/jboss/generic/MyConfiguration.java
___________________________________________________________________
Added: svn:mime-type
+ text/plain
Added: trunk/cdi/tests/org.jboss.tools.cdi.seam.solder.core.test/projects/CDISolderTest/src/org/jboss/generic/MyConfigurationProducer.java
===================================================================
--- trunk/cdi/tests/org.jboss.tools.cdi.seam.solder.core.test/projects/CDISolderTest/src/org/jboss/generic/MyConfigurationProducer.java (rev 0)
+++ trunk/cdi/tests/org.jboss.tools.cdi.seam.solder.core.test/projects/CDISolderTest/src/org/jboss/generic/MyConfigurationProducer.java 2011-05-27 20:47:50 UTC (rev 31551)
@@ -0,0 +1,47 @@
+package org.jboss.generic;
+
+import javax.enterprise.context.SessionScoped;
+import javax.enterprise.inject.Default;
+import javax.enterprise.inject.Produces;
+
+public class MyConfigurationProducer {
+
+ /**
+ * Configuration created by field producer.
+ */
+ @Produces
+ @MyGenericType("first")
+ @Default
+ MyConfiguration getOneConfig() {
+ return null;
+ }
+
+ /**
+ * Configuration created by method producer with specified scope.
+ */
+ @Produces
+ @MyGenericType("second")
+ @Qualifier1
+ @SessionScoped
+ MyConfiguration getSecondConfig() {
+ return null;
+ }
+
+ /**
+ * Configuration created by field producer; qualifier has value.
+ */
+ @Produces
+ @MyGenericType("fourth")
+ @Qualifier4("Fourth")
+ MyConfiguration fourthConfig = new MyConfiguration("fourth");
+
+ /**
+ * Configuration created by field producer with specified scope; qualifier has value.
+ */
+ @Produces
+ @MyGenericType("fifth")
+ @Qualifier4("Fifth")
+ @SessionScoped
+ MyConfiguration fifthConfig = new MyConfiguration("fifth");
+
+}
Property changes on: trunk/cdi/tests/org.jboss.tools.cdi.seam.solder.core.test/projects/CDISolderTest/src/org/jboss/generic/MyConfigurationProducer.java
___________________________________________________________________
Added: svn:mime-type
+ text/plain
Added: trunk/cdi/tests/org.jboss.tools.cdi.seam.solder.core.test/projects/CDISolderTest/src/org/jboss/generic/MyEvent.java
===================================================================
--- trunk/cdi/tests/org.jboss.tools.cdi.seam.solder.core.test/projects/CDISolderTest/src/org/jboss/generic/MyEvent.java (rev 0)
+++ trunk/cdi/tests/org.jboss.tools.cdi.seam.solder.core.test/projects/CDISolderTest/src/org/jboss/generic/MyEvent.java 2011-05-27 20:47:50 UTC (rev 31551)
@@ -0,0 +1,5 @@
+package org.jboss.generic;
+
+public class MyEvent {
+
+}
Property changes on: trunk/cdi/tests/org.jboss.tools.cdi.seam.solder.core.test/projects/CDISolderTest/src/org/jboss/generic/MyEvent.java
___________________________________________________________________
Added: svn:mime-type
+ text/plain
Added: trunk/cdi/tests/org.jboss.tools.cdi.seam.solder.core.test/projects/CDISolderTest/src/org/jboss/generic/MyExtendedConfiguration.java
===================================================================
--- trunk/cdi/tests/org.jboss.tools.cdi.seam.solder.core.test/projects/CDISolderTest/src/org/jboss/generic/MyExtendedConfiguration.java (rev 0)
+++ trunk/cdi/tests/org.jboss.tools.cdi.seam.solder.core.test/projects/CDISolderTest/src/org/jboss/generic/MyExtendedConfiguration.java 2011-05-27 20:47:50 UTC (rev 31551)
@@ -0,0 +1,12 @@
+package org.jboss.generic;
+
+/**
+ * Configuration created by bean extending config type.
+ */
+@MyGenericType("third")
+@Qualifier2
+public class MyExtendedConfiguration extends MyConfiguration {
+ public MyExtendedConfiguration() {
+ super("");
+ }
+}
Property changes on: trunk/cdi/tests/org.jboss.tools.cdi.seam.solder.core.test/projects/CDISolderTest/src/org/jboss/generic/MyExtendedConfiguration.java
___________________________________________________________________
Added: svn:mime-type
+ text/plain
Added: trunk/cdi/tests/org.jboss.tools.cdi.seam.solder.core.test/projects/CDISolderTest/src/org/jboss/generic/MyGenericBean.java
===================================================================
--- trunk/cdi/tests/org.jboss.tools.cdi.seam.solder.core.test/projects/CDISolderTest/src/org/jboss/generic/MyGenericBean.java (rev 0)
+++ trunk/cdi/tests/org.jboss.tools.cdi.seam.solder.core.test/projects/CDISolderTest/src/org/jboss/generic/MyGenericBean.java 2011-05-27 20:47:50 UTC (rev 31551)
@@ -0,0 +1,29 @@
+package org.jboss.generic;
+
+import javax.enterprise.inject.Produces;
+import javax.inject.Inject;
+
+import org.jboss.seam.solder.bean.generic.ApplyScope;
+import org.jboss.seam.solder.bean.generic.Generic;
+import org.jboss.seam.solder.bean.generic.GenericConfiguration;
+
+(a)GenericConfiguration(MyGenericType.class)
+public class MyGenericBean {
+ @Inject
+ @Generic
+ MyConfiguration config;
+
+ @Inject
+ MyGenericType type;
+
+ @Produces @ApplyScope
+ MyBean createMyFirstBean() {
+ //use config here
+ return new MyBean("bean1");
+ }
+
+ @Produces @ApplyScope
+ MyBean3 myThirdBean = new MyBean3("bean3");
+
+ //add other producers
+}
Property changes on: trunk/cdi/tests/org.jboss.tools.cdi.seam.solder.core.test/projects/CDISolderTest/src/org/jboss/generic/MyGenericBean.java
___________________________________________________________________
Added: svn:mime-type
+ text/plain
Added: trunk/cdi/tests/org.jboss.tools.cdi.seam.solder.core.test/projects/CDISolderTest/src/org/jboss/generic/MyGenericBean2.java
===================================================================
--- trunk/cdi/tests/org.jboss.tools.cdi.seam.solder.core.test/projects/CDISolderTest/src/org/jboss/generic/MyGenericBean2.java (rev 0)
+++ trunk/cdi/tests/org.jboss.tools.cdi.seam.solder.core.test/projects/CDISolderTest/src/org/jboss/generic/MyGenericBean2.java 2011-05-27 20:47:50 UTC (rev 31551)
@@ -0,0 +1,47 @@
+package org.jboss.generic;
+
+import javax.enterprise.event.Event;
+import javax.enterprise.event.Observes;
+import javax.enterprise.inject.Default;
+import javax.enterprise.inject.Produces;
+import javax.inject.Inject;
+
+import org.jboss.seam.solder.bean.generic.ApplyScope;
+import org.jboss.seam.solder.bean.generic.Generic;
+import org.jboss.seam.solder.bean.generic.GenericConfiguration;
+
+(a)GenericConfiguration(MyGenericType.class)
+public class MyGenericBean2 {
+ @Inject
+ @Generic
+ MyConfiguration config;
+
+ @Inject
+ @Generic
+ MyBean c;
+
+ @Inject
+ void setMyBean(@Generic MyBean c) {}
+
+ @Inject
+ @Generic
+ MyBean3 c3;
+
+ @Inject
+ MyGenericType type;
+
+ @Produces
+ MyBean2 createMySecondBean() {
+ //use config here
+ return new MyBean2("");
+ }
+
+ @Produces @ApplyScope
+ MyBean4 myFourthBean = new MyBean4("bean4");
+
+ void myObserver(@Observes MyBean bean) {
+
+ }
+
+ //add other producers
+}
Property changes on: trunk/cdi/tests/org.jboss.tools.cdi.seam.solder.core.test/projects/CDISolderTest/src/org/jboss/generic/MyGenericBean2.java
___________________________________________________________________
Added: svn:mime-type
+ text/plain
Added: trunk/cdi/tests/org.jboss.tools.cdi.seam.solder.core.test/projects/CDISolderTest/src/org/jboss/generic/MyGenericType.java
===================================================================
--- trunk/cdi/tests/org.jboss.tools.cdi.seam.solder.core.test/projects/CDISolderTest/src/org/jboss/generic/MyGenericType.java (rev 0)
+++ trunk/cdi/tests/org.jboss.tools.cdi.seam.solder.core.test/projects/CDISolderTest/src/org/jboss/generic/MyGenericType.java 2011-05-27 20:47:50 UTC (rev 31551)
@@ -0,0 +1,8 @@
+package org.jboss.generic;
+
+import org.jboss.seam.solder.bean.generic.GenericType;
+
+(a)GenericType(MyConfiguration.class)
+public @interface MyGenericType {
+ String value();
+}
Property changes on: trunk/cdi/tests/org.jboss.tools.cdi.seam.solder.core.test/projects/CDISolderTest/src/org/jboss/generic/MyGenericType.java
___________________________________________________________________
Added: svn:mime-type
+ text/plain
Added: trunk/cdi/tests/org.jboss.tools.cdi.seam.solder.core.test/projects/CDISolderTest/src/org/jboss/generic/Qualifier1.java
===================================================================
--- trunk/cdi/tests/org.jboss.tools.cdi.seam.solder.core.test/projects/CDISolderTest/src/org/jboss/generic/Qualifier1.java (rev 0)
+++ trunk/cdi/tests/org.jboss.tools.cdi.seam.solder.core.test/projects/CDISolderTest/src/org/jboss/generic/Qualifier1.java 2011-05-27 20:47:50 UTC (rev 31551)
@@ -0,0 +1,21 @@
+package org.jboss.generic;
+
+import java.lang.annotation.Documented;
+import java.lang.annotation.Retention;
+import java.lang.annotation.Target;
+
+import javax.inject.Qualifier;
+
+import static java.lang.annotation.ElementType.FIELD;
+import static java.lang.annotation.ElementType.METHOD;
+import static java.lang.annotation.ElementType.PARAMETER;
+import static java.lang.annotation.ElementType.TYPE;
+import static java.lang.annotation.RetentionPolicy.RUNTIME;
+
+@Qualifier
+@Target({ TYPE, METHOD, PARAMETER, FIELD })
+@Retention(RUNTIME)
+@Documented
+public @interface Qualifier1 {
+
+}
Property changes on: trunk/cdi/tests/org.jboss.tools.cdi.seam.solder.core.test/projects/CDISolderTest/src/org/jboss/generic/Qualifier1.java
___________________________________________________________________
Added: svn:mime-type
+ text/plain
Added: trunk/cdi/tests/org.jboss.tools.cdi.seam.solder.core.test/projects/CDISolderTest/src/org/jboss/generic/Qualifier2.java
===================================================================
--- trunk/cdi/tests/org.jboss.tools.cdi.seam.solder.core.test/projects/CDISolderTest/src/org/jboss/generic/Qualifier2.java (rev 0)
+++ trunk/cdi/tests/org.jboss.tools.cdi.seam.solder.core.test/projects/CDISolderTest/src/org/jboss/generic/Qualifier2.java 2011-05-27 20:47:50 UTC (rev 31551)
@@ -0,0 +1,21 @@
+package org.jboss.generic;
+
+import java.lang.annotation.Documented;
+import java.lang.annotation.Retention;
+import java.lang.annotation.Target;
+
+import javax.inject.Qualifier;
+
+import static java.lang.annotation.ElementType.FIELD;
+import static java.lang.annotation.ElementType.METHOD;
+import static java.lang.annotation.ElementType.PARAMETER;
+import static java.lang.annotation.ElementType.TYPE;
+import static java.lang.annotation.RetentionPolicy.RUNTIME;
+
+@Qualifier
+@Target({ TYPE, METHOD, PARAMETER, FIELD })
+@Retention(RUNTIME)
+@Documented
+public @interface Qualifier2 {
+
+}
Property changes on: trunk/cdi/tests/org.jboss.tools.cdi.seam.solder.core.test/projects/CDISolderTest/src/org/jboss/generic/Qualifier2.java
___________________________________________________________________
Added: svn:mime-type
+ text/plain
Added: trunk/cdi/tests/org.jboss.tools.cdi.seam.solder.core.test/projects/CDISolderTest/src/org/jboss/generic/Qualifier3.java
===================================================================
--- trunk/cdi/tests/org.jboss.tools.cdi.seam.solder.core.test/projects/CDISolderTest/src/org/jboss/generic/Qualifier3.java (rev 0)
+++ trunk/cdi/tests/org.jboss.tools.cdi.seam.solder.core.test/projects/CDISolderTest/src/org/jboss/generic/Qualifier3.java 2011-05-27 20:47:50 UTC (rev 31551)
@@ -0,0 +1,21 @@
+package org.jboss.generic;
+
+import java.lang.annotation.Documented;
+import java.lang.annotation.Retention;
+import java.lang.annotation.Target;
+
+import javax.inject.Qualifier;
+
+import static java.lang.annotation.ElementType.FIELD;
+import static java.lang.annotation.ElementType.METHOD;
+import static java.lang.annotation.ElementType.PARAMETER;
+import static java.lang.annotation.ElementType.TYPE;
+import static java.lang.annotation.RetentionPolicy.RUNTIME;
+
+@Qualifier
+@Target({ TYPE, METHOD, PARAMETER, FIELD })
+@Retention(RUNTIME)
+@Documented
+public @interface Qualifier3 {
+
+}
Property changes on: trunk/cdi/tests/org.jboss.tools.cdi.seam.solder.core.test/projects/CDISolderTest/src/org/jboss/generic/Qualifier3.java
___________________________________________________________________
Added: svn:mime-type
+ text/plain
Added: trunk/cdi/tests/org.jboss.tools.cdi.seam.solder.core.test/projects/CDISolderTest/src/org/jboss/generic/Qualifier4.java
===================================================================
--- trunk/cdi/tests/org.jboss.tools.cdi.seam.solder.core.test/projects/CDISolderTest/src/org/jboss/generic/Qualifier4.java (rev 0)
+++ trunk/cdi/tests/org.jboss.tools.cdi.seam.solder.core.test/projects/CDISolderTest/src/org/jboss/generic/Qualifier4.java 2011-05-27 20:47:50 UTC (rev 31551)
@@ -0,0 +1,21 @@
+package org.jboss.generic;
+
+import java.lang.annotation.Documented;
+import java.lang.annotation.Retention;
+import java.lang.annotation.Target;
+
+import javax.inject.Qualifier;
+
+import static java.lang.annotation.ElementType.FIELD;
+import static java.lang.annotation.ElementType.METHOD;
+import static java.lang.annotation.ElementType.PARAMETER;
+import static java.lang.annotation.ElementType.TYPE;
+import static java.lang.annotation.RetentionPolicy.RUNTIME;
+
+@Qualifier
+@Target({ TYPE, METHOD, PARAMETER, FIELD })
+@Retention(RUNTIME)
+@Documented
+public @interface Qualifier4 {
+ String value();
+}
Property changes on: trunk/cdi/tests/org.jboss.tools.cdi.seam.solder.core.test/projects/CDISolderTest/src/org/jboss/generic/Qualifier4.java
___________________________________________________________________
Added: svn:mime-type
+ text/plain
Modified: trunk/cdi/tests/org.jboss.tools.cdi.seam.solder.core.test/src/org/jboss/tools/cdi/seam/solder/core/test/CDISeamSolderCoreAllTests.java
===================================================================
--- trunk/cdi/tests/org.jboss.tools.cdi.seam.solder.core.test/src/org/jboss/tools/cdi/seam/solder/core/test/CDISeamSolderCoreAllTests.java 2011-05-27 18:04:38 UTC (rev 31550)
+++ trunk/cdi/tests/org.jboss.tools.cdi.seam.solder.core.test/src/org/jboss/tools/cdi/seam/solder/core/test/CDISeamSolderCoreAllTests.java 2011-05-27 20:47:50 UTC (rev 31551)
@@ -25,6 +25,7 @@
TestSuite suiteAll = new TestSuite("CDI Solder Core Tests");
+ suiteAll.addTestSuite(GenericBeanTest.class);
suiteAll.addTestSuite(BeanNamingTest.class);
suiteAll.addTestSuite(VetoTest.class);
suiteAll.addTestSuite(ExactTest.class);
Added: trunk/cdi/tests/org.jboss.tools.cdi.seam.solder.core.test/src/org/jboss/tools/cdi/seam/solder/core/test/GenericBeanTest.java
===================================================================
--- trunk/cdi/tests/org.jboss.tools.cdi.seam.solder.core.test/src/org/jboss/tools/cdi/seam/solder/core/test/GenericBeanTest.java (rev 0)
+++ trunk/cdi/tests/org.jboss.tools.cdi.seam.solder.core.test/src/org/jboss/tools/cdi/seam/solder/core/test/GenericBeanTest.java 2011-05-27 20:47:50 UTC (rev 31551)
@@ -0,0 +1,112 @@
+/*******************************************************************************
+ * Copyright (c) 2011 Red Hat, Inc.
+ * Distributed under license by Red Hat, Inc. All rights reserved.
+ * This program is made available under the terms of the
+ * Eclipse Public License v1.0 which accompanies this distribution,
+ * and is available at http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * Red Hat, Inc. - initial API and implementation
+ ******************************************************************************/
+package org.jboss.tools.cdi.seam.solder.core.test;
+
+import java.io.IOException;
+import java.util.Set;
+
+import org.eclipse.core.runtime.CoreException;
+import org.eclipse.jdt.core.IType;
+import org.jboss.tools.cdi.core.CDICorePlugin;
+import org.jboss.tools.cdi.core.IBean;
+import org.jboss.tools.cdi.core.ICDIProject;
+import org.jboss.tools.cdi.core.IClassBean;
+import org.jboss.tools.cdi.core.IInjectionPointField;
+import org.jboss.tools.cdi.core.IProducerMethod;
+import org.jboss.tools.cdi.seam.solder.core.generic.GenericBeanProducerMethod;
+import org.jboss.tools.cdi.seam.solder.core.generic.GenericClassBean;
+
+/**
+ *
+ * @author Viacheslav Kabanovich
+ *
+ */
+public class GenericBeanTest extends SeamSolderTest {
+
+ public GenericBeanTest() {}
+
+ public void testGenericBeanEndPointInjections() throws CoreException {
+ ICDIProject cdi = CDICorePlugin.getCDIProject(project, true);
+
+ /*
+ * Case 1. (default qualifier case)
+ * Injection point: in class MyBeanInjections
+ * @Inject MyBean first1
+ * Generic bean producer method: MyGenericBean.createMyFirstBean()
+ * Configuration producer method: MyConfigurationProducer.getOneConfig()
+ */
+ IInjectionPointField injection = getInjectionPointField(cdi, "src/org/jboss/generic/MyBeanInjections.java", "first1");
+
+ Set<IBean> bs = cdi.getBeans(false, injection);
+ assertEquals(1, bs.size());
+ IBean b = bs.iterator().next();
+ assertTrue(b instanceof IProducerMethod);
+ IProducerMethod m = (IProducerMethod)b;
+ assertEquals("createMyFirstBean", m.getMethod().getElementName());
+ assertTrue(b instanceof GenericBeanProducerMethod);
+ GenericBeanProducerMethod gm = (GenericBeanProducerMethod)b;
+ GenericClassBean cb = (GenericClassBean)gm.getClassBean();
+ IBean gb = cb.getGenericProducerBean();
+ assertTrue(gb instanceof IProducerMethod);
+ IProducerMethod gbm = (IProducerMethod)gb;
+ assertEquals("getOneConfig", gbm.getMethod().getElementName());
+
+ /*
+ * Case 2. (non-default qualifier case)
+ * Injection point: in class MyBeanInjections
+ * @Inject @Qualifier1 MyBean first2
+ * Generic bean producer method: MyGenericBean.createMyFirstBean()
+ * Configuration producer method: MyConfigurationProducer.getSecondConfig()
+ */
+ injection = getInjectionPointField(cdi, "src/org/jboss/generic/MyBeanInjections.java", "first2");
+
+ bs = cdi.getBeans(false, injection);
+ assertEquals(1, bs.size());
+ b = bs.iterator().next();
+ assertTrue(b instanceof IProducerMethod);
+ m = (IProducerMethod)b;
+ assertEquals("createMyFirstBean", m.getMethod().getElementName());
+ assertTrue(b instanceof GenericBeanProducerMethod);
+ gm = (GenericBeanProducerMethod)b;
+ cb = (GenericClassBean)gm.getClassBean();
+ gb = cb.getGenericProducerBean();
+ assertTrue(gb instanceof IProducerMethod);
+ gbm = (IProducerMethod)gb;
+ assertEquals("getSecondConfig", gbm.getMethod().getElementName());
+
+ /*
+ * Case 3. (case of configuration provided by extending config class)
+ * Injection point: in class MyBeanInjections
+ * @Inject @Qualifier2 MyBean first3
+ * Generic bean producer method: MyGenericBean.createMyFirstBean()
+ * Configuration bean: by MyExtendedConfiguration
+ */
+ injection = getInjectionPointField(cdi, "src/org/jboss/generic/MyBeanInjections.java", "first3");
+
+ bs = cdi.getBeans(false, injection);
+ assertEquals(1, bs.size());
+ b = bs.iterator().next();
+ assertTrue(b instanceof IProducerMethod);
+ m = (IProducerMethod)b;
+ assertEquals("createMyFirstBean", m.getMethod().getElementName());
+ assertTrue(b instanceof GenericBeanProducerMethod);
+ gm = (GenericBeanProducerMethod)b;
+ cb = (GenericClassBean)gm.getClassBean();
+ gb = cb.getGenericProducerBean();
+ assertTrue(gb instanceof IClassBean);
+ IClassBean gbc = (IClassBean)gb;
+ assertEquals("MyExtendedConfiguration", gbc.getBeanClass().getElementName());
+
+ }
+
+ //TODO - more tests
+
+}
Property changes on: trunk/cdi/tests/org.jboss.tools.cdi.seam.solder.core.test/src/org/jboss/tools/cdi/seam/solder/core/test/GenericBeanTest.java
___________________________________________________________________
Added: svn:mime-type
+ text/plain
13 years, 7 months
JBoss Tools SVN: r31550 - trunk/jst/plugins/org.jboss.tools.jst.jsp/src/org/jboss/tools/jst/jsp/contentassist/computers.
by jbosstools-commits@lists.jboss.org
Author: vrubezhny
Date: 2011-05-27 14:04:38 -0400 (Fri, 27 May 2011)
New Revision: 31550
Modified:
trunk/jst/plugins/org.jboss.tools.jst.jsp/src/org/jboss/tools/jst/jsp/contentassist/computers/XmlELCompletionProposalComputer.java
Log:
JBIDE-3845
Code assist for #{messages['...']} should suggest properties when user types "[".
Issue is fixed
Modified: trunk/jst/plugins/org.jboss.tools.jst.jsp/src/org/jboss/tools/jst/jsp/contentassist/computers/XmlELCompletionProposalComputer.java
===================================================================
--- trunk/jst/plugins/org.jboss.tools.jst.jsp/src/org/jboss/tools/jst/jsp/contentassist/computers/XmlELCompletionProposalComputer.java 2011-05-27 16:44:05 UTC (rev 31549)
+++ trunk/jst/plugins/org.jboss.tools.jst.jsp/src/org/jboss/tools/jst/jsp/contentassist/computers/XmlELCompletionProposalComputer.java 2011-05-27 18:04:38 UTC (rev 31550)
@@ -1,12 +1,12 @@
/*******************************************************************************
- * Copyright (c) 2010 Exadel, Inc. and Red Hat, Inc.
+ * Copyright (c) 2010-2011 Red Hat, Inc.
* Distributed under license by Red Hat, Inc. All rights reserved.
* This program is made available under the terms of the
* Eclipse Public License v1.0 which accompanies this distribution,
* and is available at http://www.eclipse.org/legal/epl-v10.html
*
* Contributors:
- * Exadel, Inc. and Red Hat, Inc. - initial API and implementation
+ * Red Hat, Inc. - initial API and implementation
******************************************************************************/
package org.jboss.tools.jst.jsp.contentassist.computers;
@@ -19,6 +19,7 @@
import org.eclipse.core.runtime.IPath;
import org.eclipse.core.runtime.Path;
import org.eclipse.jdt.core.IJavaElement;
+import org.eclipse.jface.text.BadLocationException;
import org.eclipse.jface.text.IDocument;
import org.eclipse.jface.text.contentassist.ICompletionProposal;
import org.eclipse.swt.graphics.Image;
@@ -194,8 +195,55 @@
// }
int cursorPosition = replacementString.length();
- if (!prefix.isELClosed()) {
- replacementString += "}"; //$NON-NLS-1$
+ // Check if it is a long named property to be inserted
+ if (replacementString.indexOf('[') != -1) {
+ // That's it - The long message property
+
+ // Need to get the rest of line from context.getInvocationOffset()
+ IDocument doc = context.getDocument();
+
+ String restOfLine = "";
+ String restOfValue = "";
+ int endPosition = -1;
+ try {
+ int line = doc.getLineOfOffset(context.getInvocationOffset());
+ int lineStart = doc.getLineOffset(line);
+ int lineLength = doc.getLineLength(line);
+ String sDoc = doc.get();
+ restOfValue = restOfLine = sDoc.substring(context.getInvocationOffset(), lineStart + lineLength);
+ endPosition = restOfValue.indexOf(quoteChar);
+ if (endPosition != -1) {
+ // Use end of line
+ restOfValue = restOfValue.substring(0, endPosition);
+ }
+ } catch (BadLocationException e) {
+ // Ignore it
+ }
+
+ // Is closing ']' is in it?
+ int paraIndex = restOfValue.indexOf(']');
+ // Is the quotation is in it?
+ int quoteIndex = restOfValue.indexOf('\'');
+ if (quoteIndex == -1 || (paraIndex != -1 && quoteIndex > paraIndex)) {
+ // Need to insert closing single-quote
+ replacementString += '\'';
+ }
+ if (paraIndex == -1) {
+ // Closing ']' is to be added
+ replacementString += ']';
+ }
+ if (prefix.isAttributeValue() && prefix.hasOpenQuote() && endPosition == -1) {
+ // Add closing attr-quote
+ replacementString += quoteChar;
+ }
+ if (restOfLine.indexOf('}') == -1) {
+ // Add closing }-char
+ replacementString += '}';
+ }
+ } else {
+ if (!prefix.isELClosed()) {
+ replacementString += '}';
+ }
}
if (prefix.isAttributeValue() && prefix.hasOpenQuote() && !prefix.hasCloseQuote()) {
13 years, 7 months
JBoss Tools SVN: r31548 - workspace/snjeza/portlet-examples.
by jbosstools-commits@lists.jboss.org
Author: snjeza
Date: 2011-05-27 09:36:27 -0400 (Fri, 27 May 2011)
New Revision: 31548
Modified:
workspace/snjeza/portlet-examples/testseamportlet.zip
Log:
JBIDE-9013 Cannot deploy Seam Portlet Example to JBoss EPP 4.3
Modified: workspace/snjeza/portlet-examples/testseamportlet.zip
===================================================================
(Binary files differ)
13 years, 7 months
JBoss Tools SVN: r31547 - trunk/jsf/plugins/org.jboss.tools.jsf.vpe.richfaces/templates.
by jbosstools-commits@lists.jboss.org
Author: dmaliarevich
Date: 2011-05-27 06:43:05 -0400 (Fri, 27 May 2011)
New Revision: 31547
Modified:
trunk/jsf/plugins/org.jboss.tools.jsf.vpe.richfaces/templates/vpe-templates-richfaces.xml
Log:
https://issues.jboss.org/browse/JBIDE-8950 , Create templates for missing RF4 tags in VPE, rich:validator, rich:treeToggleListener, rich:treeSelectionChangeListener, rich:hashParam, rich:dropTarget, rich:dragSource ?\226?\128?\147 were made invisible.
Modified: trunk/jsf/plugins/org.jboss.tools.jsf.vpe.richfaces/templates/vpe-templates-richfaces.xml
===================================================================
--- trunk/jsf/plugins/org.jboss.tools.jsf.vpe.richfaces/templates/vpe-templates-richfaces.xml 2011-05-27 09:40:53 UTC (rev 31546)
+++ trunk/jsf/plugins/org.jboss.tools.jsf.vpe.richfaces/templates/vpe-templates-richfaces.xml 2011-05-27 10:43:05 UTC (rev 31547)
@@ -264,6 +264,11 @@
</vpe:template>
</vpe:tag>
+ <vpe:tag name="rich:dragSource" case-sensitive="yes">
+ <vpe:template children="no" modify="no">
+ </vpe:template>
+ </vpe:tag>
+
<vpe:tag name="rich:dragSupport" case-sensitive="yes">
<vpe:template children="no" modify="no" />
</vpe:tag>
@@ -288,6 +293,11 @@
<vpe:template children="no" modify="no" />
</vpe:tag>
+ <vpe:tag name="rich:dropTarget" case-sensitive="yes">
+ <vpe:template children="no" modify="no">
+ </vpe:template>
+ </vpe:tag>
+
<!-- Since RichFaces 3.3.0 -->
<vpe:tag name="rich:editor" case-sensitive="yes">
<vpe:if test="tld_version('min=3.3')">
@@ -370,6 +380,11 @@
<vpe:template children="yes" modify="no" />
</vpe:tag>
+ <vpe:tag name="rich:hashParam" case-sensitive="yes">
+ <vpe:template children="no" modify="no">
+ </vpe:template>
+ </vpe:tag>
+
<vpe:tag name="rich:hotKey" case-sensitive="yes">
<vpe:template children="yes" modify="no" />
</vpe:tag>
@@ -982,6 +997,18 @@
</vpe:template>
</vpe:tag>
+ <vpe:tag name="rich:treeSelectionChangeListener" case-sensitive="yes">
+ <vpe:template children="no" modify="no" />
+ </vpe:tag>
+
+ <vpe:tag name="rich:treeToggleListener" case-sensitive="yes">
+ <vpe:template children="no" modify="no" />
+ </vpe:tag>
+
+ <vpe:tag name="rich:validator" case-sensitive="yes">
+ <vpe:template children="no" modify="no" />
+ </vpe:tag>
+
<vpe:tag name="rich:virtualEarth" case-sensitive="yes">
<vpe:template children="no" modify="yes"
class="org.jboss.tools.jsf.vpe.richfaces.template.RichFacesVirtualEarthTemplate">
13 years, 7 months