JBoss Tools SVN: r22929 - in trunk/cdi/tests/org.jboss.tools.cdi.core.test: resources/tck/tests/jbt/resolution/coincidence and 2 other directories.
by jbosstools-commits@lists.jboss.org
Author: scabanovich
Date: 2010-06-22 10:06:51 -0400 (Tue, 22 Jun 2010)
New Revision: 22929
Added:
trunk/cdi/tests/org.jboss.tools.cdi.core.test/resources/tck/tests/jbt/resolution/coincidence/
trunk/cdi/tests/org.jboss.tools.cdi.core.test/resources/tck/tests/jbt/resolution/coincidence/FirstPaymentMethod.java
trunk/cdi/tests/org.jboss.tools.cdi.core.test/resources/tck/tests/jbt/resolution/coincidence/FirstPaymentProcessor.java
trunk/cdi/tests/org.jboss.tools.cdi.core.test/resources/tck/tests/jbt/resolution/coincidence/ObtainsInstanceBean.java
trunk/cdi/tests/org.jboss.tools.cdi.core.test/resources/tck/tests/jbt/resolution/coincidence/PayBy.java
trunk/cdi/tests/org.jboss.tools.cdi.core.test/resources/tck/tests/jbt/resolution/coincidence/SecondPaymentMethod.java
trunk/cdi/tests/org.jboss.tools.cdi.core.test/resources/tck/tests/jbt/resolution/coincidence/SecondPaymentProcessor.java
Modified:
trunk/cdi/tests/org.jboss.tools.cdi.core.test/resources/tck/tests/jbt/resolution/AsynchronousPaymentProcessor.java
trunk/cdi/tests/org.jboss.tools.cdi.core.test/resources/tck/tests/lookup/dynamic/AdvancedPaymentProcessor.java
trunk/cdi/tests/org.jboss.tools.cdi.core.test/src/org/jboss/tools/cdi/core/test/tck/QualifierWithMembersTest.java
Log:
https://jira.jboss.org/browse/JBIDE-6512
Modified: trunk/cdi/tests/org.jboss.tools.cdi.core.test/resources/tck/tests/jbt/resolution/AsynchronousPaymentProcessor.java
===================================================================
--- trunk/cdi/tests/org.jboss.tools.cdi.core.test/resources/tck/tests/jbt/resolution/AsynchronousPaymentProcessor.java 2010-06-22 13:52:45 UTC (rev 22928)
+++ trunk/cdi/tests/org.jboss.tools.cdi.core.test/resources/tck/tests/jbt/resolution/AsynchronousPaymentProcessor.java 2010-06-22 14:06:51 UTC (rev 22929)
@@ -16,7 +16,7 @@
*/
package org.jboss.jsr299.tck.tests.jbt.resolution;
-interface AsynchronousPaymentProcessor extends PaymentProcessor
+public interface AsynchronousPaymentProcessor extends PaymentProcessor
{
int getValue();
void setValue(int value);
Added: trunk/cdi/tests/org.jboss.tools.cdi.core.test/resources/tck/tests/jbt/resolution/coincidence/FirstPaymentMethod.java
===================================================================
--- trunk/cdi/tests/org.jboss.tools.cdi.core.test/resources/tck/tests/jbt/resolution/coincidence/FirstPaymentMethod.java (rev 0)
+++ trunk/cdi/tests/org.jboss.tools.cdi.core.test/resources/tck/tests/jbt/resolution/coincidence/FirstPaymentMethod.java 2010-06-22 14:06:51 UTC (rev 22929)
@@ -0,0 +1,5 @@
+package org.jboss.jsr299.tck.tests.jbt.resolution.coincidence;
+
+public interface FirstPaymentMethod {
+ String CASH = "Roubles";
+}
\ No newline at end of file
Property changes on: trunk/cdi/tests/org.jboss.tools.cdi.core.test/resources/tck/tests/jbt/resolution/coincidence/FirstPaymentMethod.java
___________________________________________________________________
Name: svn:mime-type
+ text/plain
Added: trunk/cdi/tests/org.jboss.tools.cdi.core.test/resources/tck/tests/jbt/resolution/coincidence/FirstPaymentProcessor.java
===================================================================
--- trunk/cdi/tests/org.jboss.tools.cdi.core.test/resources/tck/tests/jbt/resolution/coincidence/FirstPaymentProcessor.java (rev 0)
+++ trunk/cdi/tests/org.jboss.tools.cdi.core.test/resources/tck/tests/jbt/resolution/coincidence/FirstPaymentProcessor.java 2010-06-22 14:06:51 UTC (rev 22929)
@@ -0,0 +1,19 @@
+package org.jboss.jsr299.tck.tests.jbt.resolution;
+
+import javax.enterprise.context.ApplicationScoped;
+
+import org.jboss.jsr299.tck.tests.jbt.resolution.AsynchronousPaymentProcessor;
+
+(a)PayBy(FirstPaymentMethod.CASH)
+@ApplicationScoped
+class FirstPaymentProcessor implements AsynchronousPaymentProcessor {
+ private int value = 0;
+
+ public int getValue() {
+ return value;
+ }
+
+ public void setValue(int value) {
+ this.value = value;
+ }
+}
\ No newline at end of file
Property changes on: trunk/cdi/tests/org.jboss.tools.cdi.core.test/resources/tck/tests/jbt/resolution/coincidence/FirstPaymentProcessor.java
___________________________________________________________________
Name: svn:mime-type
+ text/plain
Added: trunk/cdi/tests/org.jboss.tools.cdi.core.test/resources/tck/tests/jbt/resolution/coincidence/ObtainsInstanceBean.java
===================================================================
--- trunk/cdi/tests/org.jboss.tools.cdi.core.test/resources/tck/tests/jbt/resolution/coincidence/ObtainsInstanceBean.java (rev 0)
+++ trunk/cdi/tests/org.jboss.tools.cdi.core.test/resources/tck/tests/jbt/resolution/coincidence/ObtainsInstanceBean.java 2010-06-22 14:06:51 UTC (rev 22929)
@@ -0,0 +1,9 @@
+package org.jboss.jsr299.tck.tests.jbt.resolution.coincidence;
+
+import javax.inject.Inject;
+
+import org.jboss.jsr299.tck.tests.jbt.resolution.AsynchronousPaymentProcessor;
+
+class ObtainsInstanceBean {
+ @Inject @PayBy(FirstPaymentMethod.CASH) AsynchronousPaymentProcessor cashPaymentProcessor;
+}
\ No newline at end of file
Property changes on: trunk/cdi/tests/org.jboss.tools.cdi.core.test/resources/tck/tests/jbt/resolution/coincidence/ObtainsInstanceBean.java
___________________________________________________________________
Name: svn:mime-type
+ text/plain
Added: trunk/cdi/tests/org.jboss.tools.cdi.core.test/resources/tck/tests/jbt/resolution/coincidence/PayBy.java
===================================================================
--- trunk/cdi/tests/org.jboss.tools.cdi.core.test/resources/tck/tests/jbt/resolution/coincidence/PayBy.java (rev 0)
+++ trunk/cdi/tests/org.jboss.tools.cdi.core.test/resources/tck/tests/jbt/resolution/coincidence/PayBy.java 2010-06-22 14:06:51 UTC (rev 22929)
@@ -0,0 +1,21 @@
+package org.jboss.jsr299.tck.tests.jbt.resolution.coincidence;
+
+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;
+
+import java.lang.annotation.Documented;
+import java.lang.annotation.Retention;
+import java.lang.annotation.Target;
+
+import javax.inject.Qualifier;
+
+@Target( { TYPE, METHOD, PARAMETER, FIELD })
+@Retention(RUNTIME)
+@Documented
+@Qualifier
+@interface PayBy {
+ String value();
+}
\ No newline at end of file
Property changes on: trunk/cdi/tests/org.jboss.tools.cdi.core.test/resources/tck/tests/jbt/resolution/coincidence/PayBy.java
___________________________________________________________________
Name: svn:mime-type
+ text/plain
Added: trunk/cdi/tests/org.jboss.tools.cdi.core.test/resources/tck/tests/jbt/resolution/coincidence/SecondPaymentMethod.java
===================================================================
--- trunk/cdi/tests/org.jboss.tools.cdi.core.test/resources/tck/tests/jbt/resolution/coincidence/SecondPaymentMethod.java (rev 0)
+++ trunk/cdi/tests/org.jboss.tools.cdi.core.test/resources/tck/tests/jbt/resolution/coincidence/SecondPaymentMethod.java 2010-06-22 14:06:51 UTC (rev 22929)
@@ -0,0 +1,5 @@
+package org.jboss.jsr299.tck.tests.jbt.resolution.coincidence;
+
+public interface SecondPaymentMethod {
+ String CASH = "USD";
+}
\ No newline at end of file
Property changes on: trunk/cdi/tests/org.jboss.tools.cdi.core.test/resources/tck/tests/jbt/resolution/coincidence/SecondPaymentMethod.java
___________________________________________________________________
Name: svn:mime-type
+ text/plain
Added: trunk/cdi/tests/org.jboss.tools.cdi.core.test/resources/tck/tests/jbt/resolution/coincidence/SecondPaymentProcessor.java
===================================================================
--- trunk/cdi/tests/org.jboss.tools.cdi.core.test/resources/tck/tests/jbt/resolution/coincidence/SecondPaymentProcessor.java (rev 0)
+++ trunk/cdi/tests/org.jboss.tools.cdi.core.test/resources/tck/tests/jbt/resolution/coincidence/SecondPaymentProcessor.java 2010-06-22 14:06:51 UTC (rev 22929)
@@ -0,0 +1,19 @@
+package org.jboss.jsr299.tck.tests.jbt.resolution.coincidence;
+
+import javax.enterprise.context.ApplicationScoped;
+
+import org.jboss.jsr299.tck.tests.jbt.resolution.AsynchronousPaymentProcessor;
+
+(a)PayBy(SecondPaymentMethod.CASH)
+@ApplicationScoped
+class SecondPaymentProcessor implements AsynchronousPaymentProcessor {
+ private int value = 0;
+
+ public int getValue() {
+ return value;
+ }
+
+ public void setValue(int value) {
+ this.value = value;
+ }
+}
\ No newline at end of file
Property changes on: trunk/cdi/tests/org.jboss.tools.cdi.core.test/resources/tck/tests/jbt/resolution/coincidence/SecondPaymentProcessor.java
___________________________________________________________________
Name: svn:mime-type
+ text/plain
Modified: trunk/cdi/tests/org.jboss.tools.cdi.core.test/resources/tck/tests/lookup/dynamic/AdvancedPaymentProcessor.java
===================================================================
--- trunk/cdi/tests/org.jboss.tools.cdi.core.test/resources/tck/tests/lookup/dynamic/AdvancedPaymentProcessor.java 2010-06-22 13:52:45 UTC (rev 22928)
+++ trunk/cdi/tests/org.jboss.tools.cdi.core.test/resources/tck/tests/lookup/dynamic/AdvancedPaymentProcessor.java 2010-06-22 14:06:51 UTC (rev 22929)
@@ -19,6 +19,7 @@
import javax.enterprise.context.ApplicationScoped;
import org.jboss.jsr299.tck.tests.lookup.dynamic.PayBy.PaymentMethod;
+org.jboss.jsr299.tck.tests.lookup.dynamic.PayBy.PaymentMethod.CHEQUE
@PayBy(PaymentMethod.CHEQUE)
@ApplicationScoped
Modified: trunk/cdi/tests/org.jboss.tools.cdi.core.test/src/org/jboss/tools/cdi/core/test/tck/QualifierWithMembersTest.java
===================================================================
--- trunk/cdi/tests/org.jboss.tools.cdi.core.test/src/org/jboss/tools/cdi/core/test/tck/QualifierWithMembersTest.java 2010-06-22 13:52:45 UTC (rev 22928)
+++ trunk/cdi/tests/org.jboss.tools.cdi.core.test/src/org/jboss/tools/cdi/core/test/tck/QualifierWithMembersTest.java 2010-06-22 14:06:51 UTC (rev 22929)
@@ -101,4 +101,12 @@
Set<IBean> beans = cdiProject.getBeans(true, injection);
assertEquals("Wrong number of the beans", 0, beans.size());
}
+
+ public void testQualifierCoincidingSimpleNameInInjectingBeanAndCoincidingSimpleNameInInjectedBeanResolved() throws CoreException {
+ IInjectionPointField injection = getInjectionPointField("JavaSource/org/jboss/jsr299/tck/tests/jbt/resolution/coincidence/ObtainsInstanceBean.java", "cashPaymentProcessor");
+ Set<IBean> beans = cdiProject.getBeans(true, injection);
+ assertEquals("Wrong number of the beans", 1, beans.size());
+ assertContainsBeanClass(beans, "org.jboss.jsr299.tck.tests.jbt.resolution.coincidence.FirstPaymentProcessor");
+ }
+
}
\ No newline at end of file
15 years, 10 months
JBoss Tools SVN: r22928 - 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: 2010-06-22 09:52:45 -0400 (Tue, 22 Jun 2010)
New Revision: 22928
Modified:
trunk/cdi/plugins/org.jboss.tools.cdi.core/src/org/jboss/tools/cdi/internal/core/impl/CDIProject.java
Log:
https://jira.jboss.org/browse/JBIDE-6512
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 2010-06-22 13:52:05 UTC (rev 22927)
+++ trunk/cdi/plugins/org.jboss.tools.cdi.core/src/org/jboss/tools/cdi/internal/core/impl/CDIProject.java 2010-06-22 13:52:45 UTC (rev 22928)
@@ -447,7 +447,6 @@
String s1 = s.substring(dot + 1);
if(!"class".equals(s1)) {
o = s1;
- System.out.println(s + "-->" + s1);
}
}
}
15 years, 10 months
JBoss Tools SVN: r22927 - 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: 2010-06-22 09:52:05 -0400 (Tue, 22 Jun 2010)
New Revision: 22927
Modified:
trunk/cdi/plugins/org.jboss.tools.cdi.core/src/org/jboss/tools/cdi/internal/core/impl/CDIProject.java
Log:
https://jira.jboss.org/browse/JBIDE-6512
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 2010-06-22 13:51:51 UTC (rev 22926)
+++ trunk/cdi/plugins/org.jboss.tools.cdi.core/src/org/jboss/tools/cdi/internal/core/impl/CDIProject.java 2010-06-22 13:52:05 UTC (rev 22927)
@@ -377,7 +377,7 @@
for(String k: injectionKeys) {
if(!beanKeys.contains(k)) return false;
- }
+ }
return true;
}
@@ -437,6 +437,20 @@
String n = p.getMemberName();
Object o = p.getValue();
if(o != null) {
+ int k = p.getValueKind();
+ if(k == IMemberValuePair.K_QUALIFIED_NAME || k == IMemberValuePair.K_SIMPLE_NAME) {
+ String s = o.toString();
+ int dot = s.lastIndexOf('.');
+ //We reduce value to simple name. That makes it not precise
+ //and there must be a test that display limit of this approach.
+ if(dot >= 0) {
+ String s1 = s.substring(dot + 1);
+ if(!"class".equals(s1)) {
+ o = s1;
+ System.out.println(s + "-->" + s1);
+ }
+ }
+ }
values.put(n, o.toString());
}
}
15 years, 10 months
JBoss Tools SVN: r22926 - in trunk/cdi/plugins: org.jboss.tools.cdi.text.ext/src/org/jboss/tools/cdi/text/ext/hyperlink and 1 other directory.
by jbosstools-commits@lists.jboss.org
Author: dazarov
Date: 2010-06-22 09:51:51 -0400 (Tue, 22 Jun 2010)
New Revision: 22926
Modified:
trunk/cdi/plugins/org.jboss.tools.cdi.core/src/org/jboss/tools/cdi/core/CDICoreMessages.java
trunk/cdi/plugins/org.jboss.tools.cdi.core/src/org/jboss/tools/cdi/core/CDIUtil.java
trunk/cdi/plugins/org.jboss.tools.cdi.core/src/org/jboss/tools/cdi/core/messages.properties
trunk/cdi/plugins/org.jboss.tools.cdi.text.ext/src/org/jboss/tools/cdi/text/ext/hyperlink/InjectedPointHyperlinkDetector.java
trunk/cdi/plugins/org.jboss.tools.cdi.text.ext/src/org/jboss/tools/cdi/text/ext/hyperlink/ProducerDisposerHyperlinkDetector.java
Log:
https://jira.jboss.org/browse/JBIDE-6445
Modified: trunk/cdi/plugins/org.jboss.tools.cdi.core/src/org/jboss/tools/cdi/core/CDICoreMessages.java
===================================================================
--- trunk/cdi/plugins/org.jboss.tools.cdi.core/src/org/jboss/tools/cdi/core/CDICoreMessages.java 2010-06-22 10:41:16 UTC (rev 22925)
+++ trunk/cdi/plugins/org.jboss.tools.cdi.core/src/org/jboss/tools/cdi/core/CDICoreMessages.java 2010-06-22 13:51:51 UTC (rev 22926)
@@ -33,4 +33,5 @@
public static String RENAME_NAMED_BEAN_PROCESSOR_ERROR;
public static String CDI_RENAME_PROCESSOR_BEAN_HAS_NO_FILE;
public static String CDI_RENAME_PROCESSOR_BEAN_HAS_NO_NAME_LOCATION;
+ public static String CDI_UTIL_BUILD_CDI_MODEL;
}
\ No newline at end of file
Modified: trunk/cdi/plugins/org.jboss.tools.cdi.core/src/org/jboss/tools/cdi/core/CDIUtil.java
===================================================================
--- trunk/cdi/plugins/org.jboss.tools.cdi.core/src/org/jboss/tools/cdi/core/CDIUtil.java 2010-06-22 10:41:16 UTC (rev 22925)
+++ trunk/cdi/plugins/org.jboss.tools.cdi.core/src/org/jboss/tools/cdi/core/CDIUtil.java 2010-06-22 13:51:51 UTC (rev 22926)
@@ -10,6 +10,7 @@
******************************************************************************/
package org.jboss.tools.cdi.core;
+import java.lang.reflect.InvocationTargetException;
import java.util.ArrayList;
import java.util.HashMap;
import java.util.HashSet;
@@ -19,6 +20,7 @@
import org.eclipse.core.resources.IProject;
import org.eclipse.core.runtime.CoreException;
+import org.eclipse.core.runtime.IProgressMonitor;
import org.eclipse.jdt.core.Flags;
import org.eclipse.jdt.core.IAnnotatable;
import org.eclipse.jdt.core.IAnnotation;
@@ -31,6 +33,8 @@
import org.eclipse.jdt.core.ITypeParameter;
import org.eclipse.jdt.core.JavaModelException;
import org.eclipse.jdt.core.Signature;
+import org.eclipse.jface.operation.IRunnableWithProgress;
+import org.eclipse.ui.PlatformUI;
import org.eclipse.wst.validation.internal.plugin.ValidationPlugin;
import org.jboss.tools.common.EclipseUtil;
import org.jboss.tools.common.model.util.EclipseJavaUtil;
@@ -717,4 +721,27 @@
}
return false;
}
+
+ private static CDICoreNature cdiNature;
+
+ public static CDICoreNature getCDINatureWithProgress(final IProject project){
+ cdiNature = null;
+ try{
+ PlatformUI.getWorkbench().getProgressService().busyCursorWhile(new IRunnableWithProgress(){
+ public void run(IProgressMonitor monitor)
+ throws InvocationTargetException, InterruptedException {
+ monitor.beginTask(CDICoreMessages.CDI_UTIL_BUILD_CDI_MODEL, 10);
+ monitor.worked(3);
+ cdiNature = CDICorePlugin.getCDI(project, true);
+ }
+
+ });
+ }catch(InterruptedException ie){
+ CDICorePlugin.getDefault().logError(ie);
+ }catch(InvocationTargetException ite){
+ CDICorePlugin.getDefault().logError(ite);
+ }
+
+ return cdiNature;
+ }
}
\ No newline at end of file
Modified: trunk/cdi/plugins/org.jboss.tools.cdi.core/src/org/jboss/tools/cdi/core/messages.properties
===================================================================
--- trunk/cdi/plugins/org.jboss.tools.cdi.core/src/org/jboss/tools/cdi/core/messages.properties 2010-06-22 10:41:16 UTC (rev 22925)
+++ trunk/cdi/plugins/org.jboss.tools.cdi.core/src/org/jboss/tools/cdi/core/messages.properties 2010-06-22 13:51:51 UTC (rev 22926)
@@ -7,4 +7,5 @@
RENAME_NAMED_BEAN_PROCESSOR_TITLE=Rename @Named Bean
RENAME_NAMED_BEAN_PROCESSOR_ERROR=This is not a @Named Bean
CDI_RENAME_PROCESSOR_BEAN_HAS_NO_FILE=Named Bean does not have a file
-CDI_RENAME_PROCESSOR_BEAN_HAS_NO_NAME_LOCATION=Named Bean does not have a name location
\ No newline at end of file
+CDI_RENAME_PROCESSOR_BEAN_HAS_NO_NAME_LOCATION=Named Bean does not have a name location
+CDI_UTIL_BUILD_CDI_MODEL=Build CDI Model
\ No newline at end of file
Modified: trunk/cdi/plugins/org.jboss.tools.cdi.text.ext/src/org/jboss/tools/cdi/text/ext/hyperlink/InjectedPointHyperlinkDetector.java
===================================================================
--- trunk/cdi/plugins/org.jboss.tools.cdi.text.ext/src/org/jboss/tools/cdi/text/ext/hyperlink/InjectedPointHyperlinkDetector.java 2010-06-22 10:41:16 UTC (rev 22925)
+++ trunk/cdi/plugins/org.jboss.tools.cdi.text.ext/src/org/jboss/tools/cdi/text/ext/hyperlink/InjectedPointHyperlinkDetector.java 2010-06-22 13:51:51 UTC (rev 22926)
@@ -74,7 +74,7 @@
if(file == null)
return null;
- CDICoreNature cdiNature = CDICorePlugin.getCDI(file.getProject(), true);
+ CDICoreNature cdiNature = CDIUtil.getCDINatureWithProgress(file.getProject());
if(cdiNature == null)
return null;
Modified: trunk/cdi/plugins/org.jboss.tools.cdi.text.ext/src/org/jboss/tools/cdi/text/ext/hyperlink/ProducerDisposerHyperlinkDetector.java
===================================================================
--- trunk/cdi/plugins/org.jboss.tools.cdi.text.ext/src/org/jboss/tools/cdi/text/ext/hyperlink/ProducerDisposerHyperlinkDetector.java 2010-06-22 10:41:16 UTC (rev 22925)
+++ trunk/cdi/plugins/org.jboss.tools.cdi.text.ext/src/org/jboss/tools/cdi/text/ext/hyperlink/ProducerDisposerHyperlinkDetector.java 2010-06-22 13:51:51 UTC (rev 22926)
@@ -34,6 +34,7 @@
import org.jboss.tools.cdi.core.CDIConstants;
import org.jboss.tools.cdi.core.CDICoreNature;
import org.jboss.tools.cdi.core.CDICorePlugin;
+import org.jboss.tools.cdi.core.CDIUtil;
import org.jboss.tools.cdi.core.IBean;
import org.jboss.tools.cdi.core.IBeanMethod;
import org.jboss.tools.cdi.core.ICDIProject;
@@ -134,7 +135,7 @@
}
private Set<IBean> getBeans(IFile file){
- CDICoreNature cdiNature = CDICorePlugin.getCDI(file.getProject(), true);
+ CDICoreNature cdiNature = CDIUtil.getCDINatureWithProgress(file.getProject());
if(cdiNature == null)
return null;
15 years, 10 months
JBoss Tools SVN: r22925 - in trunk/cdi/plugins/org.jboss.tools.cdi.core/src/org/jboss/tools/cdi: internal/core/impl and 1 other directory.
by jbosstools-commits@lists.jboss.org
Author: scabanovich
Date: 2010-06-22 06:41:16 -0400 (Tue, 22 Jun 2010)
New Revision: 22925
Modified:
trunk/cdi/plugins/org.jboss.tools.cdi.core/src/org/jboss/tools/cdi/core/CDIConstants.java
trunk/cdi/plugins/org.jboss.tools.cdi.core/src/org/jboss/tools/cdi/core/IParametedType.java
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/ParametedType.java
Log:
https://jira.jboss.org/browse/JBIDE-6513
Modified: trunk/cdi/plugins/org.jboss.tools.cdi.core/src/org/jboss/tools/cdi/core/CDIConstants.java
===================================================================
--- trunk/cdi/plugins/org.jboss.tools.cdi.core/src/org/jboss/tools/cdi/core/CDIConstants.java 2010-06-22 08:39:41 UTC (rev 22924)
+++ trunk/cdi/plugins/org.jboss.tools.cdi.core/src/org/jboss/tools/cdi/core/CDIConstants.java 2010-06-22 10:41:16 UTC (rev 22925)
@@ -58,4 +58,6 @@
public String OBSERVERS_ANNOTATION_TYPE_NAME = "javax.enterprise.event.Observes";
public String INJECTIONPOINT_TYPE_NAME = "javax.enterprise.inject.spi.InjectionPoint";
+
+ public String INSTANCE_TYPE_NAME = "javax.enterprise.inject.Instance";
}
\ No newline at end of file
Modified: trunk/cdi/plugins/org.jboss.tools.cdi.core/src/org/jboss/tools/cdi/core/IParametedType.java
===================================================================
--- trunk/cdi/plugins/org.jboss.tools.cdi.core/src/org/jboss/tools/cdi/core/IParametedType.java 2010-06-22 08:39:41 UTC (rev 22924)
+++ trunk/cdi/plugins/org.jboss.tools.cdi.core/src/org/jboss/tools/cdi/core/IParametedType.java 2010-06-22 10:41:16 UTC (rev 22925)
@@ -10,6 +10,8 @@
******************************************************************************/
package org.jboss.tools.cdi.core;
+import java.util.List;
+
import org.eclipse.jdt.core.IType;
/**
@@ -40,4 +42,11 @@
* @return true if the type is a primitive type
*/
boolean isPrimitive();
+
+ /**
+ * Returns type parameters
+ *
+ * @return type parameters
+ */
+ List<? extends IParametedType> getParameters();
}
\ No newline at end of file
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 2010-06-22 08:39:41 UTC (rev 22924)
+++ trunk/cdi/plugins/org.jboss.tools.cdi.core/src/org/jboss/tools/cdi/internal/core/impl/CDIProject.java 2010-06-22 10:41:16 UTC (rev 22925)
@@ -254,6 +254,13 @@
return result;
}
+ if(type.getType() != null && CDIConstants.INSTANCE_TYPE_NAME.equals(type.getType().getFullyQualifiedName())) {
+ List<? extends IParametedType> ps = type.getParameters();
+ if(ps != null && ps.size() == 1) {
+ type = ps.get(0);
+ }
+ }
+
boolean isParameter = injectionPoint instanceof InjectionPointParameter;
boolean isNew = false;
Modified: trunk/cdi/plugins/org.jboss.tools.cdi.core/src/org/jboss/tools/cdi/internal/core/impl/ParametedType.java
===================================================================
--- trunk/cdi/plugins/org.jboss.tools.cdi.core/src/org/jboss/tools/cdi/internal/core/impl/ParametedType.java 2010-06-22 08:39:41 UTC (rev 22924)
+++ trunk/cdi/plugins/org.jboss.tools.cdi.core/src/org/jboss/tools/cdi/internal/core/impl/ParametedType.java 2010-06-22 10:41:16 UTC (rev 22925)
@@ -129,6 +129,10 @@
parameterTypes.add(p);
}
+ public List<? extends IParametedType> getParameters() {
+ return parameterTypes;
+ }
+
public void setPositionProvider(PositionProvider p) {
provider = p;
}
15 years, 10 months
JBoss Tools SVN: r22924 - in branches/jbosstools-3.1.x/as/plugins: org.jboss.ide.eclipse.as.core/jbosscore/org/jboss/ide/eclipse/as/core/server/internal and 2 other directories.
by jbosstools-commits@lists.jboss.org
Author: rob.stryker(a)jboss.com
Date: 2010-06-22 04:39:41 -0400 (Tue, 22 Jun 2010)
New Revision: 22924
Modified:
branches/jbosstools-3.1.x/as/plugins/org.jboss.ide.eclipse.archives.webtools/src/org/jboss/ide/eclipse/archives/webtools/modules/LocalZippedPublisherUtil.java
branches/jbosstools-3.1.x/as/plugins/org.jboss.ide.eclipse.as.core/jbosscore/org/jboss/ide/eclipse/as/core/server/internal/DeployableServer.java
branches/jbosstools-3.1.x/as/plugins/org.jboss.ide.eclipse.as.core/jbosscore/org/jboss/ide/eclipse/as/core/server/xpl/PublishCopyUtil.java
branches/jbosstools-3.1.x/as/plugins/org.jboss.ide.eclipse.as.wtp.core/src/org/jboss/ide/eclipse/as/wtp/core/util/ServerModelUtilities.java
Log:
JBIDE-6320 - branch
Modified: branches/jbosstools-3.1.x/as/plugins/org.jboss.ide.eclipse.archives.webtools/src/org/jboss/ide/eclipse/archives/webtools/modules/LocalZippedPublisherUtil.java
===================================================================
--- branches/jbosstools-3.1.x/as/plugins/org.jboss.ide.eclipse.archives.webtools/src/org/jboss/ide/eclipse/archives/webtools/modules/LocalZippedPublisherUtil.java 2010-06-21 21:51:06 UTC (rev 22923)
+++ branches/jbosstools-3.1.x/as/plugins/org.jboss.ide.eclipse.archives.webtools/src/org/jboss/ide/eclipse/archives/webtools/modules/LocalZippedPublisherUtil.java 2010-06-22 08:39:41 UTC (rev 22924)
@@ -30,6 +30,7 @@
import org.jboss.ide.eclipse.as.core.server.internal.DeployableServerBehavior;
import org.jboss.ide.eclipse.as.core.util.FileUtil;
import org.jboss.ide.eclipse.as.core.util.FileUtil.IFileUtilListener;
+import org.jboss.ide.eclipse.as.wtp.core.util.ServerModelUtilities;
import de.schlichtherle.io.ArchiveDetector;
@@ -174,6 +175,21 @@
return (IStatus[]) status.toArray(new IStatus[status.size()]);
}
+ protected IStatus[] fullBinaryPublish(IServer server, String deployRoot, IModule[] parent, IModule last) {
+ ArrayList<IStatus> results = new ArrayList<IStatus>();
+ try {
+ IPath path = getOutputFilePath(combine(parent, last));
+ path = path.removeLastSegments(1);
+ de.schlichtherle.io.File root = TrueZipUtil.getFile(path, TrueZipUtil.getJarArchiveDetector());
+ IModuleResource[] resources = getResources(last);
+ results.addAll(Arrays.asList(copy(root, resources)));
+ TrueZipUtil.umount();
+ return (IStatus[]) results.toArray(new IStatus[results.size()]);
+ } catch( CoreException ce) {
+ results.add(generateCoreExceptionStatus(ce));
+ return (IStatus[]) results.toArray(new IStatus[results.size()]);
+ }
+ }
protected IStatus[] fullPublish(IServer server, String deployRoot, IModule[] module) {
ArrayList<IStatus> results = new ArrayList<IStatus>();
try {
@@ -187,8 +203,12 @@
results.addAll(Arrays.asList(copy(root, resources)));
IModule[] children = server.getChildModules(module, new NullProgressMonitor());
- for( int i = 0; i < children.length; i++ )
- results.addAll(Arrays.asList(fullPublish(server, deployRoot, combine(module, children[i]))));
+ for( int i = 0; i < children.length; i++ ) {
+ if( ServerModelUtilities.isBinaryModule(children[i]))
+ results.addAll(Arrays.asList(fullBinaryPublish(server, deployRoot, module, children[i])));
+ else
+ results.addAll(Arrays.asList(fullPublish(server, deployRoot, combine(module, children[i]))));
+ }
TrueZipUtil.umount();
return (IStatus[]) results.toArray(new IStatus[results.size()]);
} catch( CoreException ce) {
Modified: branches/jbosstools-3.1.x/as/plugins/org.jboss.ide.eclipse.as.core/jbosscore/org/jboss/ide/eclipse/as/core/server/internal/DeployableServer.java
===================================================================
--- branches/jbosstools-3.1.x/as/plugins/org.jboss.ide.eclipse.as.core/jbosscore/org/jboss/ide/eclipse/as/core/server/internal/DeployableServer.java 2010-06-21 21:51:06 UTC (rev 22923)
+++ branches/jbosstools-3.1.x/as/plugins/org.jboss.ide.eclipse.as.core/jbosscore/org/jboss/ide/eclipse/as/core/server/internal/DeployableServer.java 2010-06-22 08:39:41 UTC (rev 22924)
@@ -30,6 +30,7 @@
import org.jboss.ide.eclipse.as.core.util.ModuleUtil;
import org.jboss.ide.eclipse.as.core.util.ServerUtil;
import org.jboss.ide.eclipse.as.wtp.core.modules.IJBTModule;
+import org.jboss.ide.eclipse.as.wtp.core.util.ServerModelUtilities;
public class DeployableServer extends ServerDelegate implements IDeployableServer {
@@ -62,11 +63,6 @@
return Status.OK_STATUS;
}
- public IModule[] getChildModules(IModule[] module) {
- IModule[] children = ModuleUtil.getChildModules(module);
- return children;
- }
-
public IModule[] getRootModules(IModule module) throws CoreException {
IStatus status = canModifyModules(new IModule[] { module }, null);
if (status != null && !status.isOK())
@@ -77,6 +73,9 @@
return new IModule[] { module };
}
+ public IModule[] getChildModules(IModule[] module) {
+ return ServerModelUtilities.getChildModules(module);
+ }
private IModule[] doGetParentModules(IModule module) {
// get all supported modules
@@ -86,20 +85,10 @@
ArrayList<IModule> list = new ArrayList<IModule>();
for( int i = 0; i < supported.length; i++ ) {
- IEnterpriseApplication jeeMod = (IEnterpriseApplication)supported[i].loadAdapter(IEnterpriseApplication.class,null);
- IJBTModule jbtMod = (IJBTModule)supported[i].loadAdapter(IJBTModule.class, null);
- if( jeeMod != null ) {
- IModule[] childs = jeeMod.getModules();
- for (int j = 0; j < childs.length; j++) {
- if(childs[j].equals(module))
- list.add(supported[i]);
- }
- } else if( jbtMod != null ) {
- IModule[] childs = jbtMod.getModules();
- for (int j = 0; j < childs.length; j++) {
- if(childs[j].equals(module))
- list.add(supported[i]);
- }
+ IModule[] childs = ServerModelUtilities.getChildModules(supported[i]);
+ for (int j = 0; j < childs.length; j++) {
+ if(childs[j].equals(module))
+ list.add(supported[i]);
}
}
return list.toArray(new IModule[list.size()]);
Modified: branches/jbosstools-3.1.x/as/plugins/org.jboss.ide.eclipse.as.core/jbosscore/org/jboss/ide/eclipse/as/core/server/xpl/PublishCopyUtil.java
===================================================================
--- branches/jbosstools-3.1.x/as/plugins/org.jboss.ide.eclipse.as.core/jbosscore/org/jboss/ide/eclipse/as/core/server/xpl/PublishCopyUtil.java 2010-06-21 21:51:06 UTC (rev 22923)
+++ branches/jbosstools-3.1.x/as/plugins/org.jboss.ide.eclipse.as.core/jbosscore/org/jboss/ide/eclipse/as/core/server/xpl/PublishCopyUtil.java 2010-06-22 08:39:41 UTC (rev 22924)
@@ -554,8 +554,13 @@
List status = new ArrayList(2);
if (resource instanceof IModuleFolder) {
IModuleFolder folder = (IModuleFolder) resource;
- IStatus[] stat = publishFull(folder.members(), path, monitor);
- addArrayToList(status, stat);
+ IModuleResource[] children = folder.members();
+ if( children.length == 0 )
+ handler.makeDirectoryIfRequired(folder.getModuleRelativePath().append(folder.getName()), monitor);
+ else {
+ IStatus[] stat = publishFull(children, path, monitor);
+ addArrayToList(status, stat);
+ }
} else {
IModuleFile mf = (IModuleFile) resource;
path = path.append(mf.getModuleRelativePath()).append(name);
Modified: branches/jbosstools-3.1.x/as/plugins/org.jboss.ide.eclipse.as.wtp.core/src/org/jboss/ide/eclipse/as/wtp/core/util/ServerModelUtilities.java
===================================================================
--- branches/jbosstools-3.1.x/as/plugins/org.jboss.ide.eclipse.as.wtp.core/src/org/jboss/ide/eclipse/as/wtp/core/util/ServerModelUtilities.java 2010-06-21 21:51:06 UTC (rev 22923)
+++ branches/jbosstools-3.1.x/as/plugins/org.jboss.ide.eclipse.as.wtp.core/src/org/jboss/ide/eclipse/as/wtp/core/util/ServerModelUtilities.java 2010-06-22 08:39:41 UTC (rev 22924)
@@ -15,6 +15,7 @@
import org.eclipse.core.runtime.NullProgressMonitor;
import org.eclipse.jst.server.core.IEnterpriseApplication;
+import org.eclipse.jst.server.core.IJ2EEModule;
import org.eclipse.wst.server.core.IModule;
import org.eclipse.wst.server.core.IServer;
import org.jboss.ide.eclipse.as.wtp.core.modules.IJBTModule;
@@ -47,17 +48,31 @@
}
public static IModule[] getChildModules(IModule[] module) {
- int last = module.length-1;
- if (module[last] != null && module[last].getModuleType() != null) {
- IEnterpriseApplication enterpriseApplication = (IEnterpriseApplication) module[last]
- .loadAdapter(IEnterpriseApplication.class, null);
- if( enterpriseApplication != null )
- return enterpriseApplication.getModules() == null ? new IModule[]{} : enterpriseApplication.getModules();
-
- IJBTModule jbtMod = (IJBTModule)module[last].loadAdapter(IJBTModule.class, null);
- if( jbtMod != null )
- return jbtMod.getModules();
- }
+ int last = module.length -1;
+ if( module[last] != null && module[last].getModuleType() != null)
+ return getChildModules(module[last]);
return new IModule[0];
}
+
+ public static IModule[] getChildModules(IModule module) {
+ IEnterpriseApplication enterpriseApplication = (IEnterpriseApplication)
+ module.loadAdapter(IEnterpriseApplication.class, null);
+ if( enterpriseApplication != null )
+ return enterpriseApplication.getModules() == null ? new IModule[]{} : enterpriseApplication.getModules();
+
+ IJBTModule jbtMod = (IJBTModule)module.loadAdapter(IJBTModule.class, null);
+ if( jbtMod != null )
+ return jbtMod.getModules();
+ return new IModule[0];
+ }
+
+ public static boolean isBinaryModule(IModule module) {
+ IJ2EEModule jee = (IJ2EEModule) module.loadAdapter(IJ2EEModule.class, null);
+ if( jee != null )
+ return jee.isBinary();
+ IJBTModule jbtMod = (IJBTModule)module.loadAdapter(IJBTModule.class, null);
+ if( jbtMod != null )
+ return jbtMod.isBinary();
+ return false;
+ }
}
15 years, 10 months
JBoss Tools SVN: r22923 - in trunk: hibernatetools/plugins/org.hibernate.eclipse.console and 2 other directories.
by jbosstools-commits@lists.jboss.org
Author: dgolovin
Date: 2010-06-21 17:51:06 -0400 (Mon, 21 Jun 2010)
New Revision: 22923
Modified:
trunk/archives/plugins/org.jboss.ide.eclipse.archives.core/
trunk/hibernatetools/plugins/org.hibernate.eclipse.console/
trunk/hibernatetools/tests/org.hibernate.eclipse.jdt.ui.test/
trunk/ws/tests/org.jboss.tools.ws.core.test/
Log:
configure svn:ignore properties to avoid checking in jars built during maven build
Property changes on: trunk/archives/plugins/org.jboss.ide.eclipse.archives.core
___________________________________________________________________
Name: svn:ignore
- target
buildlog.latest.txt
bin
build
*.class
+ target
buildlog.latest.txt
bin
build
*.class
archivescore.jar
archivescore-eclipse.jar
Property changes on: trunk/hibernatetools/plugins/org.hibernate.eclipse.console
___________________________________________________________________
Name: svn:ignore
- bin
build
target
+ bin
build
target
org.hibernate.eclipse.console.jar
Property changes on: trunk/hibernatetools/tests/org.hibernate.eclipse.jdt.ui.test
___________________________________________________________________
Name: svn:ignore
- bin
target
build
d
+ bin
target
build
d
org.hibernate.eclipse.jdt.ui.test.jar
Property changes on: trunk/ws/tests/org.jboss.tools.ws.core.test
___________________________________________________________________
Name: svn:ignore
- bin
target
build
d
+ bin
target
build
d
ws-core-test.jar
15 years, 10 months
JBoss Tools SVN: r22922 - in trunk: esb/plugins/org.jboss.tools.esb.ui and 10 other directories.
by jbosstools-commits@lists.jboss.org
Author: dgolovin
Date: 2010-06-21 17:47:35 -0400 (Mon, 21 Jun 2010)
New Revision: 22922
Modified:
trunk/bpel/plugins/org.eclipse.bpel.wsil.model/
trunk/esb/plugins/org.jboss.tools.esb.ui/
trunk/freemarker/plugins/org.jboss.ide.eclipse.freemarker/
trunk/hibernatetools/plugins/org.hibernate.eclipse.help/
trunk/hibernatetools/plugins/org.hibernate.eclipse.mapper/
trunk/hibernatetools/plugins/org.jboss.tools.hibernate.ui/
trunk/hibernatetools/tests/org.jboss.tools.hibernate.jpt.core.test/
trunk/hibernatetools/tests/org.jboss.tools.hibernate.ui.test/
trunk/jsf/plugins/org.jboss.tools.jsf.vpe.facelets/
trunk/jsf/plugins/org.jboss.tools.jsf.vpe.myfaces/
trunk/struts/plugins/org.jboss.tools.struts/
trunk/xulrunner/plugins/org.mozilla.xulrunner.gtk.linux.x86/xulrunner/components/
Log:
configure svn:ignore properties to avoid checking in jars built during maven build
Property changes on: trunk/bpel/plugins/org.eclipse.bpel.wsil.model
___________________________________________________________________
Name: svn:ignore
- bin
target
build
d
+ bin
target
build
d
wsli-model.jar
Property changes on: trunk/esb/plugins/org.jboss.tools.esb.ui
___________________________________________________________________
Name: svn:ignore
- bin
target
build
d
+ bin
target
build
d
esb-ui.jar
Property changes on: trunk/freemarker/plugins/org.jboss.ide.eclipse.freemarker
___________________________________________________________________
Name: svn:ignore
- bin
target
build
+ bin
target
build
freemarker-ide.jar
Property changes on: trunk/hibernatetools/plugins/org.hibernate.eclipse.help
___________________________________________________________________
Name: svn:ignore
- bin
build
target
+ bin
build
target
help.jar
Property changes on: trunk/hibernatetools/plugins/org.hibernate.eclipse.mapper
___________________________________________________________________
Name: svn:ignore
- bin
build
target
+ bin
build
target
org.hibernate.eclipse.mapper.jar
Property changes on: trunk/hibernatetools/plugins/org.jboss.tools.hibernate.ui
___________________________________________________________________
Name: svn:ignore
- bin
target
build
d
+ bin
target
build
d
org.jboss.tools.hibernate.ui.jar
Property changes on: trunk/hibernatetools/tests/org.jboss.tools.hibernate.jpt.core.test
___________________________________________________________________
Name: svn:ignore
- bin
target
build
d
+ bin
target
build
d
org.jboss.tools.hibernate.jpt.core.test.jar
Property changes on: trunk/hibernatetools/tests/org.jboss.tools.hibernate.ui.test
___________________________________________________________________
Name: svn:ignore
- bin
target
build
d
+ bin
target
build
d
org.jboss.tools.hibernate.ui.diagram.test.jar
Property changes on: trunk/jsf/plugins/org.jboss.tools.jsf.vpe.facelets
___________________________________________________________________
Name: svn:ignore
- bin
target
build
d
+ bin
target
build
d
vpefacelets.jar
Property changes on: trunk/jsf/plugins/org.jboss.tools.jsf.vpe.myfaces
___________________________________________________________________
Name: svn:ignore
- bin
target
build
d
+ bin
target
build
d
jsf-vpe-myfaces.jar
Property changes on: trunk/struts/plugins/org.jboss.tools.struts
___________________________________________________________________
Name: svn:ignore
- bin
target
build
d
+ bin
target
build
d
struts.jar
Property changes on: trunk/xulrunner/plugins/org.mozilla.xulrunner.gtk.linux.x86/xulrunner/components
___________________________________________________________________
Name: svn:ignore
+ xpti.dat
compreg.dat
15 years, 10 months
JBoss Tools SVN: r22921 - trunk/jmx/tests/org.jboss.tools.jmx.core.test.
by jbosstools-commits@lists.jboss.org
Author: dgolovin
Date: 2010-06-21 17:44:18 -0400 (Mon, 21 Jun 2010)
New Revision: 22921
Modified:
trunk/jmx/tests/org.jboss.tools.jmx.core.test/pom.xml
Log:
pom format fixed
Modified: trunk/jmx/tests/org.jboss.tools.jmx.core.test/pom.xml
===================================================================
--- trunk/jmx/tests/org.jboss.tools.jmx.core.test/pom.xml 2010-06-21 21:43:57 UTC (rev 22920)
+++ trunk/jmx/tests/org.jboss.tools.jmx.core.test/pom.xml 2010-06-21 21:44:18 UTC (rev 22921)
@@ -11,7 +11,7 @@
<artifactId>org.jboss.tools.jmx.core.test</artifactId>
<version>1.1.0-SNAPSHOT</version>
<packaging>eclipse-test-plugin</packaging>
- <build>
+ <build>
<plugins>
<plugin>
<groupId>org.sonatype.tycho</groupId>
15 years, 10 months
JBoss Tools SVN: r22920 - trunk/jst/tests/org.jboss.tools.ui.bot.ext.test.
by jbosstools-commits@lists.jboss.org
Author: dgolovin
Date: 2010-06-21 17:43:57 -0400 (Mon, 21 Jun 2010)
New Revision: 22920
Modified:
trunk/jst/tests/org.jboss.tools.ui.bot.ext.test/pom.xml
Log:
adjust version in pom to be the same as in manifest file
Modified: trunk/jst/tests/org.jboss.tools.ui.bot.ext.test/pom.xml
===================================================================
--- trunk/jst/tests/org.jboss.tools.ui.bot.ext.test/pom.xml 2010-06-21 18:00:27 UTC (rev 22919)
+++ trunk/jst/tests/org.jboss.tools.ui.bot.ext.test/pom.xml 2010-06-21 21:43:57 UTC (rev 22920)
@@ -9,6 +9,6 @@
</parent>
<groupId>org.jboss.tools</groupId>
<artifactId>org.jboss.tools.ui.bot.ext.test</artifactId>
- <version>1.0.0-SNAPSHOT</version>
+ <version>3.1.0-SNAPSHOT</version>
<packaging>eclipse-plugin</packaging>
</project>
15 years, 10 months