JBoss Tools SVN: r22225 - in trunk/cdi: plugins/org.jboss.tools.cdi.ui/src/org/jboss/tools/cdi/ui/preferences and 2 other directories.
by jbosstools-commits@lists.jboss.org
Author: akazakov
Date: 2010-05-20 16:46:39 -0400 (Thu, 20 May 2010)
New Revision: 22225
Added:
trunk/cdi/tests/org.jboss.tools.cdi.core.test/resources/tck/tests/jbt/validation/producers/NonStaticProducerOfSessionBeanBroken.java
trunk/cdi/tests/org.jboss.tools.cdi.core.test/resources/tck/tests/jbt/validation/producers/ProducerAnnotatedInjectBroken.java
Modified:
trunk/cdi/plugins/org.jboss.tools.cdi.core/src/org/jboss/tools/cdi/internal/core/validation/CDICoreValidator.java
trunk/cdi/plugins/org.jboss.tools.cdi.core/src/org/jboss/tools/cdi/internal/core/validation/errorList.txt
trunk/cdi/plugins/org.jboss.tools.cdi.ui/src/org/jboss/tools/cdi/ui/preferences/CDIConfigurationBlock.java
trunk/cdi/tests/org.jboss.tools.cdi.core.test/src/org/jboss/tools/cdi/core/test/tck/ValidationTest.java
Log:
https://jira.jboss.org/jira/browse/JBIDE-2708 Added new CDI validation rule: Non-static field of a session bean class is annotated @Produces
Modified: trunk/cdi/plugins/org.jboss.tools.cdi.core/src/org/jboss/tools/cdi/internal/core/validation/CDICoreValidator.java
===================================================================
--- trunk/cdi/plugins/org.jboss.tools.cdi.core/src/org/jboss/tools/cdi/internal/core/validation/CDICoreValidator.java 2010-05-20 20:08:36 UTC (rev 22224)
+++ trunk/cdi/plugins/org.jboss.tools.cdi.core/src/org/jboss/tools/cdi/internal/core/validation/CDICoreValidator.java 2010-05-20 20:46:39 UTC (rev 22225)
@@ -582,8 +582,7 @@
if (nameDeclaration != null) {
declaration = nameDeclaration;
}
- addError(CDIValidationMessages.RESOURCE_PRODUCER_FIELD_SETS_EL_NAME, CDIPreferences.RESOURCE_PRODUCER_FIELD_SETS_EL_NAME,
- declaration, producer.getResource());
+ addError(CDIValidationMessages.RESOURCE_PRODUCER_FIELD_SETS_EL_NAME, CDIPreferences.RESOURCE_PRODUCER_FIELD_SETS_EL_NAME, declaration, producer.getResource());
}
}
}
@@ -596,11 +595,17 @@
for (String variableSig : typeVariables) {
String variableName = Signature.getTypeVariable(variableSig);
if (typeString.equals(variableName)) {
- addError(CDIValidationMessages.PRODUCER_FIELD_TYPE_IS_VARIABLE, CDIPreferences.PRODUCER_FIELD_TYPE_IS_VARIABLE,
- typeDeclaration != null ? typeDeclaration : producer, producer.getResource());
+ addError(CDIValidationMessages.PRODUCER_FIELD_TYPE_IS_VARIABLE, CDIPreferences.PRODUCER_FIELD_TYPE_IS_VARIABLE, typeDeclaration != null ? typeDeclaration : producer, producer.getResource());
}
}
}
+ /*
+ * 3.4.2. Declaring a producer field
+ * - non-static field of a session bean class is annotated @Produces
+ */
+ if(producer.getClassBean() instanceof ISessionBean && !Flags.isStatic(producerField.getField().getFlags())) {
+ addError(CDIValidationMessages.ILLEGAL_PRODUCER_FIELD_IN_SESSION_BEAN, CDIPreferences.ILLEGAL_PRODUCER_FIELD_IN_SESSION_BEAN, producer.getProducesAnnotation(), producer.getResource());
+ }
} else {
IProducerMethod producerMethod = (IProducerMethod) producer;
List<IParameter> params = producerMethod.getParameters();
Modified: trunk/cdi/plugins/org.jboss.tools.cdi.core/src/org/jboss/tools/cdi/internal/core/validation/errorList.txt
===================================================================
--- trunk/cdi/plugins/org.jboss.tools.cdi.core/src/org/jboss/tools/cdi/internal/core/validation/errorList.txt 2010-05-20 20:08:36 UTC (rev 22224)
+++ trunk/cdi/plugins/org.jboss.tools.cdi.core/src/org/jboss/tools/cdi/internal/core/validation/errorList.txt 2010-05-20 20:46:39 UTC (rev 22225)
@@ -65,9 +65,6 @@
is not a business method of the session bean
- interceptor or decorator has a method annotated @Produces
-
-
-
3.3.3. Specializing a producer method
- method annotated @Specializes is static or does not directly override another producer method
@@ -94,6 +91,9 @@
- non-static field of a session bean class is annotated @Produces
- interceptor or decorator has a field annotated @Produces
+
+
+
3.5.1. Declaring a resource
- producer field declaration specifies an EL name (together with one of
@Resource, @PersistenceContext, @PersistenceUnit, @EJB, @WebServiceRef)
Modified: trunk/cdi/plugins/org.jboss.tools.cdi.ui/src/org/jboss/tools/cdi/ui/preferences/CDIConfigurationBlock.java
===================================================================
--- trunk/cdi/plugins/org.jboss.tools.cdi.ui/src/org/jboss/tools/cdi/ui/preferences/CDIConfigurationBlock.java 2010-05-20 20:08:36 UTC (rev 22224)
+++ trunk/cdi/plugins/org.jboss.tools.cdi.ui/src/org/jboss/tools/cdi/ui/preferences/CDIConfigurationBlock.java 2010-05-20 20:46:39 UTC (rev 22225)
@@ -86,7 +86,7 @@
{CDIPreferences.ILLEGAL_DISPOSER_IN_SESSION_BEAN, CDIPreferencesMessages.CDIValidatorConfigurationBlock_pb_illegalDisposerInSessionBean_label},
{CDIPreferences.NO_PRODUCER_MATCHING_DISPOSER, CDIPreferencesMessages.CDIValidatorConfigurationBlock_pb_noProducerMatchingDisposer_label},
{CDIPreferences.MULTIPLE_DISPOSERS_FOR_PRODUCER, CDIPreferencesMessages.CDIValidatorConfigurationBlock_pb_multipleDisposersForProducer_label},
-// {CDIPreferences.ILLEGAL_PRODUCER_FIELD_IN_SESSION_BEAN, CDIPreferencesMessages.CDIValidatorConfigurationBlock_pb_illegalProducerFieldInSessionBean_label},
+ {CDIPreferences.ILLEGAL_PRODUCER_FIELD_IN_SESSION_BEAN, CDIPreferencesMessages.CDIValidatorConfigurationBlock_pb_illegalProducerFieldInSessionBean_label},
// {CDIPreferences.MULTIPLE_INJECTION_CONSTRUCTORS, CDIPreferencesMessages.CDIValidatorConfigurationBlock_pb_multipleInjectionConstructors_label},
// {CDIPreferences.CONSTRUCTOR_PARAMETER_ILLEGALLY_ANNOTATED, CDIPreferencesMessages.CDIValidatorConfigurationBlock_pb_constructorParameterIllegallyAnnotated_label},
// {CDIPreferences.GENERIC_METHOD_ANNOTATED_INJECT, CDIPreferencesMessages.CDIValidatorConfigurationBlock_pb_genericMethodAnnotatedInject_label},
Added: trunk/cdi/tests/org.jboss.tools.cdi.core.test/resources/tck/tests/jbt/validation/producers/NonStaticProducerOfSessionBeanBroken.java
===================================================================
--- trunk/cdi/tests/org.jboss.tools.cdi.core.test/resources/tck/tests/jbt/validation/producers/NonStaticProducerOfSessionBeanBroken.java (rev 0)
+++ trunk/cdi/tests/org.jboss.tools.cdi.core.test/resources/tck/tests/jbt/validation/producers/NonStaticProducerOfSessionBeanBroken.java 2010-05-20 20:46:39 UTC (rev 22225)
@@ -0,0 +1,10 @@
+package org.jboss.jsr299.tck.tests.jbt.validation.producers;
+
+import javax.ejb.Stateless;
+import javax.enterprise.inject.Produces;
+
+@Stateless
+public class NonStaticProducerOfSessionBeanBroken {
+
+ @Produces public FunnelWeaver<String> anotherFunnelWeaver;
+}
\ No newline at end of file
Property changes on: trunk/cdi/tests/org.jboss.tools.cdi.core.test/resources/tck/tests/jbt/validation/producers/NonStaticProducerOfSessionBeanBroken.java
___________________________________________________________________
Name: svn:mime-type
+ text/plain
Added: trunk/cdi/tests/org.jboss.tools.cdi.core.test/resources/tck/tests/jbt/validation/producers/ProducerAnnotatedInjectBroken.java
===================================================================
--- trunk/cdi/tests/org.jboss.tools.cdi.core.test/resources/tck/tests/jbt/validation/producers/ProducerAnnotatedInjectBroken.java (rev 0)
+++ trunk/cdi/tests/org.jboss.tools.cdi.core.test/resources/tck/tests/jbt/validation/producers/ProducerAnnotatedInjectBroken.java 2010-05-20 20:46:39 UTC (rev 22225)
@@ -0,0 +1,9 @@
+package org.jboss.jsr299.tck.tests.jbt.validation.producers;
+
+import javax.enterprise.inject.Produces;
+import javax.inject.Inject;
+
+public class ProducerAnnotatedInjectBroken {
+
+ @Produces @Inject public FunnelWeaver<String> anotherFunnelWeaver;
+}
\ No newline at end of file
Property changes on: trunk/cdi/tests/org.jboss.tools.cdi.core.test/resources/tck/tests/jbt/validation/producers/ProducerAnnotatedInjectBroken.java
___________________________________________________________________
Name: svn:mime-type
+ text/plain
Modified: trunk/cdi/tests/org.jboss.tools.cdi.core.test/src/org/jboss/tools/cdi/core/test/tck/ValidationTest.java
===================================================================
--- trunk/cdi/tests/org.jboss.tools.cdi.core.test/src/org/jboss/tools/cdi/core/test/tck/ValidationTest.java 2010-05-20 20:08:36 UTC (rev 22224)
+++ trunk/cdi/tests/org.jboss.tools.cdi.core.test/src/org/jboss/tools/cdi/core/test/tck/ValidationTest.java 2010-05-20 20:46:39 UTC (rev 22225)
@@ -549,28 +549,6 @@
}
/**
- * 3.5.1. Declaring a resource
- * - producer field declaration specifies an EL name (together with one of @Resource, @PersistenceContext, @PersistenceUnit, @EJB, @WebServiceRef)
- *
- * @throws Exception
- */
- public void testResourceWithELName() throws Exception {
- IFile file = tckProject.getFile("JavaSource/org/jboss/jsr299/tck/tests/jbt/validation/resources/ProducerFieldsBroken.java");
- AbstractResourceMarkerTest.assertMarkerIsCreated(file, AbstractResourceMarkerTest.MARKER_TYPE, CDIValidationMessages.RESOURCE_PRODUCER_FIELD_SETS_EL_NAME, 15, 19, 24, 27, 31);
- }
-
- /**
- * 3.11. The qualifier @Named at injection points
- * - injection point other than injected field declares a @Named annotation that does not specify the value member
- *
- * @throws Exception
- */
- public void testNamedInjectPoint() throws Exception {
- IFile file = tckProject.getFile("JavaSource/org/jboss/jsr299/tck/tests/jbt/validation/inject/NamedInjectionBroken.java");
- AbstractResourceMarkerTest.assertMarkerIsCreated(file, AbstractResourceMarkerTest.MARKER_TYPE, CDIValidationMessages.PARAM_INJECTION_DECLARES_EMPTY_NAME, 10, 16);
- }
-
- /**
* 3.3.6. Declaring a disposer method
* - method has more than one parameter annotated @Disposes
*
@@ -711,6 +689,28 @@
/**
* 3.4.2. Declaring a producer field
+ * - producer field is annotated @Inject
+ *
+ * @throws Exception
+ */
+ public void testProducerAnnotatedInject() throws Exception {
+ IFile file = tckProject.getFile("JavaSource/org/jboss/jsr299/tck/tests/jbt/validation/producers/ProducerAnnotatedInjectBroken.java");
+ AbstractResourceMarkerTest.assertMarkerIsCreated(file, AbstractResourceMarkerTest.MARKER_TYPE, CDIValidationMessages.PRODUCER_ANNOTATED_INJECT, 8);
+ }
+
+ /**
+ * 3.4.2. Declaring a producer field
+ * - non-static field of a session bean class is annotated @Produces
+ *
+ * @throws Exception
+ */
+ public void testNonStaticProducerOfSessionBean() throws Exception {
+ IFile file = tckProject.getFile("JavaSource/org/jboss/jsr299/tck/tests/jbt/validation/producers/NonStaticProducerOfSessionBeanBroken.java");
+ AbstractResourceMarkerTest.assertMarkerIsCreated(file, AbstractResourceMarkerTest.MARKER_TYPE, CDIValidationMessages.ILLEGAL_PRODUCER_FIELD_IN_SESSION_BEAN, 9);
+ }
+
+ /**
+ * 3.4.2. Declaring a producer field
* - decorator has a field annotated @Produces
*
* @throws Exception
@@ -732,6 +732,17 @@
}
/**
+ * 3.5.1. Declaring a resource
+ * - producer field declaration specifies an EL name (together with one of @Resource, @PersistenceContext, @PersistenceUnit, @EJB, @WebServiceRef)
+ *
+ * @throws Exception
+ */
+ public void testResourceWithELName() throws Exception {
+ IFile file = tckProject.getFile("JavaSource/org/jboss/jsr299/tck/tests/jbt/validation/resources/ProducerFieldsBroken.java");
+ AbstractResourceMarkerTest.assertMarkerIsCreated(file, AbstractResourceMarkerTest.MARKER_TYPE, CDIValidationMessages.RESOURCE_PRODUCER_FIELD_SETS_EL_NAME, 15, 19, 24, 27, 31);
+ }
+
+ /**
* 3.9.1. Declaring an initializer method
* - an initializer method has a parameter annotated @Disposes
*
@@ -744,6 +755,17 @@
}
/**
+ * 3.11. The qualifier @Named at injection points
+ * - injection point other than injected field declares a @Named annotation that does not specify the value member
+ *
+ * @throws Exception
+ */
+ public void testNamedInjectPoint() throws Exception {
+ IFile file = tckProject.getFile("JavaSource/org/jboss/jsr299/tck/tests/jbt/validation/inject/NamedInjectionBroken.java");
+ AbstractResourceMarkerTest.assertMarkerIsCreated(file, AbstractResourceMarkerTest.MARKER_TYPE, CDIValidationMessages.PARAM_INJECTION_DECLARES_EMPTY_NAME, 10, 16);
+ }
+
+ /**
* 10.4.2. Declaring an observer method
* - an observer method is annotated @Produces
*
15 years, 11 months
JBoss Tools SVN: r22224 - in trunk/cdi: plugins/org.jboss.tools.cdi.core/src/org/jboss/tools/cdi/internal/core/validation and 2 other directories.
by jbosstools-commits@lists.jboss.org
Author: akazakov
Date: 2010-05-20 16:08:36 -0400 (Thu, 20 May 2010)
New Revision: 22224
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/internal/core/validation/CDICoreValidator.java
trunk/cdi/plugins/org.jboss.tools.cdi.core/src/org/jboss/tools/cdi/internal/core/validation/CDIValidationMessages.java
trunk/cdi/plugins/org.jboss.tools.cdi.core/src/org/jboss/tools/cdi/internal/core/validation/messages.properties
trunk/cdi/plugins/org.jboss.tools.cdi.ui/src/org/jboss/tools/cdi/ui/preferences/CDIConfigurationBlock.java
trunk/cdi/tests/org.jboss.tools.cdi.core.test/src/org/jboss/tools/cdi/core/test/tck/ValidationTest.java
Log:
https://jira.jboss.org/jira/browse/JBIDE-2708 Added new CDI validation rule: - method annotated @Specializes is static or does not directly override another producer method
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-05-20 19:34:53 UTC (rev 22223)
+++ trunk/cdi/plugins/org.jboss.tools.cdi.core/src/org/jboss/tools/cdi/core/CDIUtil.java 2010-05-20 20:08:36 UTC (rev 22224)
@@ -11,8 +11,10 @@
package org.jboss.tools.cdi.core;
import java.util.ArrayList;
+import java.util.HashMap;
import java.util.HashSet;
import java.util.List;
+import java.util.Map;
import java.util.Set;
import org.eclipse.core.resources.IProject;
@@ -338,6 +340,9 @@
if (sourceType == null) {
continue;
}
+ if(!sourceType.isInterface()) {
+ continue;
+ }
IAnnotation annotation = sourceType.getAnnotation(CDIConstants.LOCAL_ANNOTATION_TYPE_NAME);
if (annotation == null) {
annotation = sourceType.getAnnotation("Local"); //$NON-NLS-N1
@@ -359,4 +364,92 @@
}
return method.getMethod();
}
+
+ /**
+ * Finds the method which is overridden by the given method. Or null if this method overrides nothing.
+ *
+ * @param method
+ * @return
+ */
+ public static IMethod getOverridingMethodDeclaration(IBeanMethod method) {
+ IClassBean bean = method.getClassBean();
+ Map<IType, IMethod> foundMethods = new HashMap<IType, IMethod>();
+ try {
+ if (Flags.isStatic(method.getMethod().getFlags())) {
+ return null;
+ }
+ Set<IParametedType> types = bean.getLegalTypes();
+ for (IParametedType type : types) {
+ IType sourceType = type.getType();
+ if (sourceType == null || sourceType.isInterface()) {
+ continue;
+ }
+ IMethod[] methods = sourceType.getMethods();
+ for (IMethod iMethod : methods) {
+ if (method.getMethod().isSimilar(iMethod)) {
+ foundMethods.put(iMethod.getDeclaringType(), iMethod);
+ }
+ }
+ }
+ if(foundMethods.size()==1) {
+ return foundMethods.values().iterator().next();
+ } else if(foundMethods.size()>1) {
+ IType type = bean.getBeanClass();
+ IType superClass = getSuperClass(type);
+ while(superClass!=null) {
+ IMethod m = foundMethods.get(superClass);
+ if(m!=null) {
+ return m;
+ }
+ superClass = getSuperClass(superClass);
+ }
+ }
+ } catch (JavaModelException e) {
+ CDICorePlugin.getDefault().logError(e);
+ }
+ return null;
+ }
+
+ /**
+ * Finds the method which is overridden by the given method. Or null if this method overrides nothing.
+ *
+ * @param method
+ * @return
+ */
+ public static IMethod getDirectOverridingMethodDeclaration(IBeanMethod method) {
+ IClassBean bean = method.getClassBean();
+ try {
+ if (Flags.isStatic(method.getMethod().getFlags())) {
+ return null;
+ }
+ IType type = bean.getBeanClass();
+ IType superClass = getSuperClass(type);
+ if(superClass!=null) {
+ IMethod[] methods = superClass.getMethods();
+ for (IMethod iMethod : methods) {
+ if (method.getMethod().isSimilar(iMethod)) {
+ return iMethod;
+ }
+ }
+ }
+ } catch (JavaModelException e) {
+ CDICorePlugin.getDefault().logError(e);
+ }
+ return null;
+ }
+
+ private static IType getSuperClass(IType type) throws JavaModelException {
+ String superclassName = type.getSuperclassName();
+ if(superclassName!=null) {
+ String fullySuperclassName = EclipseJavaUtil.resolveType(type, superclassName);
+ if(fullySuperclassName!=null&&!fullySuperclassName.equals("java.lang.Object")) { //$NON-NLS-1$
+ if(fullySuperclassName.equals(type.getFullyQualifiedName())) {
+ return null;
+ }
+ IType superType = type.getJavaProject().findType(fullySuperclassName);
+ return superType;
+ }
+ }
+ return null;
+ }
}
\ No newline at end of file
Modified: trunk/cdi/plugins/org.jboss.tools.cdi.core/src/org/jboss/tools/cdi/internal/core/validation/CDICoreValidator.java
===================================================================
--- trunk/cdi/plugins/org.jboss.tools.cdi.core/src/org/jboss/tools/cdi/internal/core/validation/CDICoreValidator.java 2010-05-20 19:34:53 UTC (rev 22223)
+++ trunk/cdi/plugins/org.jboss.tools.cdi.core/src/org/jboss/tools/cdi/internal/core/validation/CDICoreValidator.java 2010-05-20 20:08:36 UTC (rev 22224)
@@ -27,6 +27,7 @@
import org.eclipse.core.runtime.IStatus;
import org.eclipse.core.runtime.Path;
import org.eclipse.jdt.core.Flags;
+import org.eclipse.jdt.core.IAnnotation;
import org.eclipse.jdt.core.IField;
import org.eclipse.jdt.core.IMemberValuePair;
import org.eclipse.jdt.core.IMethod;
@@ -686,6 +687,49 @@
validationContext.addLinkedCoreResource(classBean.getSourcePath().toOSString(), method.getResource().getFullPath(), false);
}
}
+
+ IAnnotationDeclaration sDeclaration = producerMethod.getSpecializesAnnotationDeclaration();
+ if(sDeclaration!=null) {
+ if(Flags.isStatic(producerMethod.getMethod().getFlags())) {
+ /*
+ * 3.3.3. Specializing a producer method
+ * - method annotated @Specializes is static
+ */
+ addError(CDIValidationMessages.ILLEGAL_SPECIALIZING_PRODUCER_STATIC, CDIPreferences.ILLEGAL_SPECIALIZING_PRODUCER, sDeclaration, producer.getResource());
+ } else {
+ /*
+ * 3.3.3. Specializing a producer method
+ * - method annotated @Specializes does not directly override another producer method
+ */
+ IMethod superMethod = CDIUtil.getDirectOverridingMethodDeclaration(producerMethod);
+ boolean overrides = false;
+ if(superMethod!=null) {
+ IType superType = superMethod.getDeclaringType();
+ if(superType.isBinary()) {
+ IAnnotation[] ants = superMethod.getAnnotations();
+ for (IAnnotation an : ants) {
+ if(CDIConstants.PRODUCES_ANNOTATION_TYPE_NAME.equals(an.getElementName())) {
+ overrides = true;
+ }
+ }
+ } else {
+ Set<IBean> beans = cdiProject.getBeans(superType.getResource().getFullPath());
+ for (IBean iBean : beans) {
+ if(iBean instanceof IProducerMethod) {
+ IProducerMethod prMethod = (IProducerMethod)iBean;
+ if(prMethod.getMethod().isSimilar(superMethod)) {
+ overrides = true;
+ }
+ }
+ }
+ }
+ }
+ if(!overrides) {
+ addError(CDIValidationMessages.ILLEGAL_SPECIALIZING_PRODUCER_OVERRIDE, CDIPreferences.ILLEGAL_SPECIALIZING_PRODUCER, sDeclaration, producer.getResource());
+ }
+ saveAllSuperTypesAsLinkedResources(producer.getClassBean());
+ }
+ }
}
} catch (JavaModelException e) {
CDICorePlugin.getDefault().logError(e);
Modified: trunk/cdi/plugins/org.jboss.tools.cdi.core/src/org/jboss/tools/cdi/internal/core/validation/CDIValidationMessages.java
===================================================================
--- trunk/cdi/plugins/org.jboss.tools.cdi.core/src/org/jboss/tools/cdi/internal/core/validation/CDIValidationMessages.java 2010-05-20 19:34:53 UTC (rev 22223)
+++ trunk/cdi/plugins/org.jboss.tools.cdi.core/src/org/jboss/tools/cdi/internal/core/validation/CDIValidationMessages.java 2010-05-20 20:08:36 UTC (rev 22224)
@@ -93,7 +93,8 @@
public static String ILLEGAL_SPECIALIZING_MANAGED_BEAN;
public static String ILLEGAL_SPECIALIZING_SESSION_BEAN;
- public static String ILLEGAL_SPECIALIZING_PRODUCER;
+ public static String ILLEGAL_SPECIALIZING_PRODUCER_STATIC;
+ public static String ILLEGAL_SPECIALIZING_PRODUCER_OVERRIDE;
public static String MISSING_TYPE_IN_SPECIALIZING_BEAN;
public static String CONFLICTING_NAME_IN_SPECIALIZING_BEAN;
public static String INTERCEPTOR_ANNOTATED_SPECIALIZES;
Modified: trunk/cdi/plugins/org.jboss.tools.cdi.core/src/org/jboss/tools/cdi/internal/core/validation/messages.properties
===================================================================
--- trunk/cdi/plugins/org.jboss.tools.cdi.core/src/org/jboss/tools/cdi/internal/core/validation/messages.properties 2010-05-20 19:34:53 UTC (rev 22223)
+++ trunk/cdi/plugins/org.jboss.tools.cdi.core/src/org/jboss/tools/cdi/internal/core/validation/messages.properties 2010-05-20 20:08:36 UTC (rev 22224)
@@ -72,7 +72,8 @@
ILLEGAL_SPECIALIZING_MANAGED_BEAN=Managed bean class annotated @Specializes does not directly extend the bean class of another managed bean
ILLEGAL_SPECIALIZING_SESSION_BEAN=Session bean class annotated @Specializes does not directly extend the bean class of another session bean
-ILLEGAL_SPECIALIZING_PRODUCER=Method annotated @Specializes is static or does not directly override another producer method
+ILLEGAL_SPECIALIZING_PRODUCER_STATIC=Producer method annotated @Specializes is static
+ILLEGAL_SPECIALIZING_PRODUCER_OVERRIDE=Producer method annotated @Specializes does not directly override another producer method
MISSING_TYPE_IN_SPECIALIZING_BEAN=Bean X specializes Y but does not have some bean type of Y
CONFLICTING_NAME_IN_SPECIALIZING_BEAN=Bean X specializes Y and Y has a name and X declares a name explicitly, using @Named
INTERCEPTOR_ANNOTATED_SPECIALIZES=Interceptor is annotated @Specializes
Modified: trunk/cdi/plugins/org.jboss.tools.cdi.ui/src/org/jboss/tools/cdi/ui/preferences/CDIConfigurationBlock.java
===================================================================
--- trunk/cdi/plugins/org.jboss.tools.cdi.ui/src/org/jboss/tools/cdi/ui/preferences/CDIConfigurationBlock.java 2010-05-20 19:34:53 UTC (rev 22223)
+++ trunk/cdi/plugins/org.jboss.tools.cdi.ui/src/org/jboss/tools/cdi/ui/preferences/CDIConfigurationBlock.java 2010-05-20 20:08:36 UTC (rev 22224)
@@ -124,7 +124,7 @@
new String[][]{
{CDIPreferences.ILLEGAL_SPECIALIZING_MANAGED_BEAN, CDIPreferencesMessages.CDIValidatorConfigurationBlock_pb_illegalSpecializingManagedBean_label},
{CDIPreferences.ILLEGAL_SPECIALIZING_SESSION_BEAN, CDIPreferencesMessages.CDIValidatorConfigurationBlock_pb_illegalSpecializingSessionBean_label},
-// {CDIPreferences.ILLEGAL_SPECIALIZING_PRODUCER, CDIPreferencesMessages.CDIValidatorConfigurationBlock_pb_illegalSpecializingProducer_label},
+ {CDIPreferences.ILLEGAL_SPECIALIZING_PRODUCER, CDIPreferencesMessages.CDIValidatorConfigurationBlock_pb_illegalSpecializingProducer_label},
// {CDIPreferences.MISSING_TYPE_IN_SPECIALIZING_BEAN, CDIPreferencesMessages.CDIValidatorConfigurationBlock_pb_missingTypeInSpecializingBean_label},
// {CDIPreferences.CONFLICTING_NAME_IN_SPECIALIZING_BEAN, CDIPreferencesMessages.CDIValidatorConfigurationBlock_pb_conflictingNameInSpecializingBean_label},
// {CDIPreferences.INTERCEPTOR_ANNOTATED_SPECIALIZES, CDIPreferencesMessages.CDIValidatorConfigurationBlock_pb_interceptorAnnotatedSpecializes_label},
Modified: trunk/cdi/tests/org.jboss.tools.cdi.core.test/src/org/jboss/tools/cdi/core/test/tck/ValidationTest.java
===================================================================
--- trunk/cdi/tests/org.jboss.tools.cdi.core.test/src/org/jboss/tools/cdi/core/test/tck/ValidationTest.java 2010-05-20 19:34:53 UTC (rev 22223)
+++ trunk/cdi/tests/org.jboss.tools.cdi.core.test/src/org/jboss/tools/cdi/core/test/tck/ValidationTest.java 2010-05-20 20:08:36 UTC (rev 22224)
@@ -527,6 +527,28 @@
}
/**
+ * 3.3.3. Specializing a producer method
+ * - method annotated @Specializes is static
+ *
+ * @throws Exception
+ */
+ public void testSpecializedStaticMethod() throws Exception {
+ IFile file = tckProject.getFile("JavaSource/org/jboss/jsr299/tck/tests/inheritance/specialization/producer/method/broken/specializesStaticMethod/FurnitureShop_Broken.java");
+ AbstractResourceMarkerTest.assertMarkerIsCreated(file, AbstractResourceMarkerTest.MARKER_TYPE, CDIValidationMessages.ILLEGAL_SPECIALIZING_PRODUCER_STATIC, 24);
+ }
+
+ /**
+ * 3.3.3. Specializing a producer method
+ * - method annotated @Specializes does not directly override another producer method
+ *
+ * @throws Exception
+ */
+ public void testSpecializedMethodIndirectlyOverridesAnotherProducerMethod() throws Exception {
+ IFile file = tckProject.getFile("JavaSource/org/jboss/jsr299/tck/tests/inheritance/specialization/producer/method/broken/indirectOverride/ShoeShop_Broken.java");
+ AbstractResourceMarkerTest.assertMarkerIsCreated(file, AbstractResourceMarkerTest.MARKER_TYPE, CDIValidationMessages.ILLEGAL_SPECIALIZING_PRODUCER_OVERRIDE, 24);
+ }
+
+ /**
* 3.5.1. Declaring a resource
* - producer field declaration specifies an EL name (together with one of @Resource, @PersistenceContext, @PersistenceUnit, @EJB, @WebServiceRef)
*
15 years, 11 months
JBoss Tools SVN: r22223 - trunk.
by jbosstools-commits@lists.jboss.org
Author: nickboldt
Date: 2010-05-20 15:34:53 -0400 (Thu, 20 May 2010)
New Revision: 22223
Modified:
trunk/pom.xml
Log:
uncomment rest of stack from pom.xml; fix order
Modified: trunk/pom.xml
===================================================================
--- trunk/pom.xml 2010-05-20 19:24:54 UTC (rev 22222)
+++ trunk/pom.xml 2010-05-20 19:34:53 UTC (rev 22223)
@@ -12,15 +12,14 @@
<version>0.0.1-SNAPSHOT</version>
<packaging>pom</packaging>
<modules>
- <!-- this order is important! -->
+ <!-- this order is important! make sure you've run genpom.xml first! -->
<module>tests</module>
<module>common</module>
<module>flow</module>
<module>jbpm</module>
- <!-- <module>jmx</module>
+ <module>jmx</module>
<module>archives</module>
<module>as</module>
- <module>drools</module>
<module>bpel</module>
<module>smooks</module>
<module>freemarker</module>
@@ -31,6 +30,7 @@
<module>jst</module>
<module>vpe</module>
<module>jsf</module>
+ <module>drools</module>
<module>esb</module>
<module>tptp</module>
<module>ws</module>
@@ -41,7 +41,7 @@
<module>examples</module>
<module>birt</module>
<module>maven</module>
- <module>site</module> -->
+ <module>site</module>
</modules>
</project>
15 years, 11 months
JBoss Tools SVN: r22222 - in trunk/documentation/guides/GettingStartedGuide/en-US: images/first_seam and 1 other directory.
by jbosstools-commits@lists.jboss.org
Author: smukhina
Date: 2010-05-20 15:24:54 -0400 (Thu, 20 May 2010)
New Revision: 22222
Modified:
trunk/documentation/guides/GettingStartedGuide/en-US/first_seam.xml
trunk/documentation/guides/GettingStartedGuide/en-US/images/first_seam/first_seam10.png
trunk/documentation/guides/GettingStartedGuide/en-US/images/first_seam/first_seam12.png
trunk/documentation/guides/GettingStartedGuide/en-US/images/first_seam/first_seam13.png
trunk/documentation/guides/GettingStartedGuide/en-US/images/first_seam/first_seam14.png
trunk/documentation/guides/GettingStartedGuide/en-US/images/first_seam/first_seam3.png
trunk/documentation/guides/GettingStartedGuide/en-US/images/first_seam/first_seam4.png
trunk/documentation/guides/GettingStartedGuide/en-US/images/first_seam/first_seam5.png
trunk/documentation/guides/GettingStartedGuide/en-US/images/first_seam/first_seam8.png
trunk/documentation/guides/GettingStartedGuide/en-US/images/first_seam/first_seam8_1.png
trunk/documentation/guides/GettingStartedGuide/en-US/images/first_seam/first_seam9.png
Log:
TOOLSDOC-74Create and deploy Seam Web section update - description and images are apdated
Modified: trunk/documentation/guides/GettingStartedGuide/en-US/first_seam.xml
===================================================================
--- trunk/documentation/guides/GettingStartedGuide/en-US/first_seam.xml 2010-05-20 19:14:16 UTC (rev 22221)
+++ trunk/documentation/guides/GettingStartedGuide/en-US/first_seam.xml 2010-05-20 19:24:54 UTC (rev 22222)
@@ -125,7 +125,9 @@
<listitem>
<para>Select <emphasis>
<property>Library Provided by Target Runtime</property>
- </emphasis> as <property>Type</property> of <property>JSF Implementation Library</property>. We will use the JSF implementation that comes with JBoss server.</para>
+ </emphasis> as <property>Type</property> of <property>JSF Implementation
+ Library</property>. We will use the JSF implementation that comes with JBoss
+ server.</para>
</listitem>
<listitem>
<para>Click <emphasis>
@@ -166,9 +168,9 @@
</imageobject>
</mediaobject>
</figure>
- <para>Select <property>JDBC Connection Properties</property>. Make sure the URL is set to
- <emphasis>
- <property>jdbc:hsqldb:hsql://localhost:1701</property>
+ <para>Select <property>HSQLDB Profile Properties</property>. Make sure the Database location
+ is set to <emphasis>
+ <property>hsql://localhost:1701</property>
</emphasis></para>
<figure>
<title>JDBC Connection Properties</title>
@@ -180,11 +182,14 @@
</figure>
<para>Try click on <property>Test Connection</property> button. It probably won’t work. This
happens if the hsql jdbc driver is not exactly the same. This can be worked around by
- modifying the HSQLDB database driver settings. To modify the settings, click the <property
- >“...”</property> next to the drop-down box.</para>
- <para>The proper Driver JAR File should be listed under <property>Driver File(s)</property>.
- Select the hsqldb.jar file found in the database/lib directory and click on <property
- >Ok</property>.</para>
+ modifying the HSQLDB database driver settings. To modify the settings, click the Edit Driver Definition Driver(
+ <inlinemediaobject><imageobject>
+ <imagedata fileref="images/first_seam/first_seam9_1.png"/>
+ </imageobject>
+ </inlinemediaobject>) .</para>
+ <para>The proper Driver JAR File should be listed under <property>Jar List</property>. Select
+ the hsqldb.jar file found in the jbdevstudio/jboss-eap/jboss-as/common/lib/ directory and
+ click <property>Ok</property>.</para>
<figure>
<title>Driver Details</title>
<mediaobject>
@@ -193,18 +198,8 @@
</imageobject>
</mediaobject>
</figure>
- <para>Select <property>Hypersonic DB</property> and click on <property>Ok</property>. Again,
- this only happens if the selected hsqldb.jar is different from the running database.</para>
- <figure>
- <title>Hypersonic DB Selecting</title>
- <mediaobject>
- <imageobject>
- <imagedata fileref="images/first_seam/first_seam11.png"/>
- </imageobject>
- </mediaobject>
- </figure>
<para>Now, the <property>Test Connection</property> should succeed. After testing the
- connection, click on Ok.</para>
+ connection, click <emphasis><property>Ok</property></emphasis>.</para>
<figure>
<title>Connection Testing</title>
<mediaobject>
Modified: trunk/documentation/guides/GettingStartedGuide/en-US/images/first_seam/first_seam10.png
===================================================================
(Binary files differ)
Modified: trunk/documentation/guides/GettingStartedGuide/en-US/images/first_seam/first_seam12.png
===================================================================
(Binary files differ)
Modified: trunk/documentation/guides/GettingStartedGuide/en-US/images/first_seam/first_seam13.png
===================================================================
(Binary files differ)
Modified: trunk/documentation/guides/GettingStartedGuide/en-US/images/first_seam/first_seam14.png
===================================================================
(Binary files differ)
Modified: trunk/documentation/guides/GettingStartedGuide/en-US/images/first_seam/first_seam3.png
===================================================================
(Binary files differ)
Modified: trunk/documentation/guides/GettingStartedGuide/en-US/images/first_seam/first_seam4.png
===================================================================
(Binary files differ)
Modified: trunk/documentation/guides/GettingStartedGuide/en-US/images/first_seam/first_seam5.png
===================================================================
(Binary files differ)
Modified: trunk/documentation/guides/GettingStartedGuide/en-US/images/first_seam/first_seam8.png
===================================================================
(Binary files differ)
Modified: trunk/documentation/guides/GettingStartedGuide/en-US/images/first_seam/first_seam8_1.png
===================================================================
(Binary files differ)
Modified: trunk/documentation/guides/GettingStartedGuide/en-US/images/first_seam/first_seam9.png
===================================================================
(Binary files differ)
15 years, 11 months
JBoss Tools SVN: r22221 - trunk.
by jbosstools-commits@lists.jboss.org
Author: nickboldt
Date: 2010-05-20 15:14:16 -0400 (Thu, 20 May 2010)
New Revision: 22221
Modified:
trunk/parent-pom.xml
Log:
perf tune the list of repos to search
Modified: trunk/parent-pom.xml
===================================================================
--- trunk/parent-pom.xml 2010-05-20 19:12:52 UTC (rev 22220)
+++ trunk/parent-pom.xml 2010-05-20 19:14:16 UTC (rev 22221)
@@ -390,22 +390,11 @@
<pluginRepositories>
<pluginRepository>
- <id>maven-central</id>
- <url>http://repo1.maven.org/maven2/
- </url>
- <snapshots>
- <enabled>true</enabled>
- </snapshots>
- <releases>
- <enabled>true</enabled>
- </releases>
- </pluginRepository>
- <pluginRepository>
<id>sonatype-maven-central</id>
<url>http://repository.sonatype.org/content/repositories/central/
</url>
<snapshots>
- <enabled>true</enabled>
+ <enabled>false</enabled>
</snapshots>
<releases>
<enabled>true</enabled>
@@ -419,7 +408,7 @@
<enabled>true</enabled>
</snapshots>
<releases>
- <enabled>true</enabled>
+ <enabled>false</enabled>
</releases>
</pluginRepository>
<pluginRepository>
@@ -430,7 +419,7 @@
<enabled>true</enabled>
</snapshots>
<releases>
- <enabled>true</enabled>
+ <enabled>false</enabled>
</releases>
</pluginRepository>
<pluginRepository>
@@ -440,7 +429,7 @@
<enabled>true</enabled>
</snapshots>
<releases>
- <enabled>true</enabled>
+ <enabled>false</enabled>
</releases>
</pluginRepository>
</pluginRepositories>
15 years, 11 months
JBoss Tools SVN: r22220 - trunk.
by jbosstools-commits@lists.jboss.org
Author: nickboldt
Date: 2010-05-20 15:12:52 -0400 (Thu, 20 May 2010)
New Revision: 22220
Modified:
trunk/parent-pom.xml
Log:
add profile to add Hudson BUILD_NUMBER into plugin ID; also add M1 suffix for first milestone
Modified: trunk/parent-pom.xml
===================================================================
--- trunk/parent-pom.xml 2010-05-20 18:06:30 UTC (rev 22219)
+++ trunk/parent-pom.xml 2010-05-20 19:12:52 UTC (rev 22220)
@@ -11,6 +11,7 @@
<tychoVersion>0.9.0-SNAPSHOT</tychoVersion>
<!-- <tychoVersion>0.8.0</tychoVersion> -->
<scmBranch>trunk</scmBranch>
+ <BUILD_ALIAS>M1</BUILD_ALIAS>
</properties>
<build>
@@ -20,7 +21,7 @@
<artifactId>maven-osgi-packaging-plugin</artifactId>
<version>${tychoVersion}</version>
<configuration>
- <format>'v'yyyyMMdd-HHmm</format>
+ <format>'v'yyyyMMdd-HHmm'-${BUILD_ALIAS}'</format>
<archiveSite>true</archiveSite>
</configuration>
</plugin>
@@ -100,6 +101,17 @@
<artifactId>org.eclipse.sdk.ide</artifactId>
<version>0.0.0</version>
</dependency>
+ <!-- http://www.jmock.org/maven.html -->
+ <dependency>
+ <groupId>org.jmock</groupId>
+ <artifactId>jmock-legacy</artifactId>
+ <version>2.5.1</version>
+ </dependency>
+ <dependency>
+ <groupId>org.jmock</groupId>
+ <artifactId>jmock-junit4</artifactId>
+ <version>2.5.1</version>
+ </dependency>
</dependencies>
<includes>
<include>**/AllTests.class</include>
@@ -156,7 +168,30 @@
</issueManagement>
<profiles>
+ <!-- TODO: verify that this profile overrides the default profile if BUILD_NUMBER is
+ set (by a Hudson job) -->
<profile>
+ <id>hudson</id>
+ <activation>
+ <property>
+ <name>BUILD_NUMBER</name>
+ </property>
+ </activation>
+ <build>
+ <plugins>
+ <plugin>
+ <groupId>org.sonatype.tycho</groupId>
+ <artifactId>maven-osgi-packaging-plugin</artifactId>
+ <version>${tychoVersion}</version>
+ <configuration>
+ <format>'v'yyyyMMdd-HHmm'-H${BUILD_NUMBER}-${BUILD_ALIAS}'</format>
+ <archiveSite>true</archiveSite>
+ </configuration>
+ </plugin>
+ </plugins>
+ </build>
+ </profile>
+ <profile>
<id>helios</id>
<activation>
<property>
15 years, 11 months
JBoss Tools SVN: r22219 - trunk/build.
by jbosstools-commits@lists.jboss.org
Author: nickboldt
Date: 2010-05-20 14:06:30 -0400 (Thu, 20 May 2010)
New Revision: 22219
Modified:
trunk/build/build.xml
Log:
make empty update site zips appear as [ERROR] in log
Modified: trunk/build/build.xml
===================================================================
--- trunk/build/build.xml 2010-05-20 16:56:35 UTC (rev 22218)
+++ trunk/build/build.xml 2010-05-20 18:06:30 UTC (rev 22219)
@@ -1126,7 +1126,7 @@
<fail>Overall update site zip contains no features!</fail>
</then>
<else>
- <echo level="info">Update site zip for ${COMPONENTS.to.build} contains no features!</echo>
+ <echo level="info"> [ERROR] Update site zip for ${COMPONENTS.to.build} contains no features!</echo>
</else>
</if>
</else>
15 years, 11 months
JBoss Tools SVN: r22218 - trunk/jmx/docs/reference/en-US.
by jbosstools-commits@lists.jboss.org
Author: abogachuk
Date: 2010-05-20 12:56:35 -0400 (Thu, 20 May 2010)
New Revision: 22218
Modified:
trunk/jmx/docs/reference/en-US/introduction.xml
Log:
corrected a error
Modified: trunk/jmx/docs/reference/en-US/introduction.xml
===================================================================
--- trunk/jmx/docs/reference/en-US/introduction.xml 2010-05-20 16:31:36 UTC (rev 22217)
+++ trunk/jmx/docs/reference/en-US/introduction.xml 2010-05-20 16:56:35 UTC (rev 22218)
@@ -1,4 +1,3 @@
-<<<<<<< .mine
<?xml version="1.0" encoding="ISO-8859-1"?>
<chapter id="intruduction" xreflabel="introduction">
<?dbhtml filename="introduction.html"?>
@@ -131,138 +130,4 @@
section.</para>
</section>
</section>
-</chapter>
-=======
-<?xml version="1.0" encoding="ISO-8859-1"?>
-<chapter id="intruduction" xreflabel="introduction">
- <?dbhtml filename="introduction.html"?>
-
- <title>Introduction</title>
- <para><property>JBoss Tools</property>' JMX project is a fork of <ulink
- url="http://code.google.com/p/eclipse-jmx/">eclipse-jmx</ulink>, a project by Jeff Mesnil.
- It was forked with permission. </para>
-
- <section>
- <title>What is JMX?</title>
- <para>
-The Java Management Extensions (JMX) technology is a standard part of the Java Platform, Standard Edition (Java SE platform). The JMX technology was added to the platform in the Java 2 Platform, Standard Edition (J2SE) 5.0 release.
-</para>
- <para>
-The JMX technology provides a simple, standard way of managing resources such as applications, devices, and services. Because the JMX technology is dynamic, you can use it to monitor and manage resources as they are created, installed and implemented. You can also use the JMX technology to monitor and manage the Java Virtual Machine (Java VM).
-</para>
- <para>
-The JMX specification defines the architecture, design patterns, APIs, and services in the Java programming language for management and monitoring of applications and networks.
-</para>
- <para>
-Using the JMX technology, a given resource is instrumented by one or more Java objects known as Managed Beans, or MBeans. These MBeans are registered in a core-managed object server, known as an MBean server. The MBean server acts as a management agent and can run on most devices that have been enabled for the Java programming language.
-</para>
-
- <para>
-The specifications define JMX agents that you use to manage any resources that have been correctly configured for management. A JMX agent consists of an MBean server, in which MBeans are registered, and a set of services for handling the MBeans. In this way, JMX agents directly control resources and make them available to remote management applications.
-</para>
- <para>
-The way in which resources are instrumented is completely independent from the management infrastructure. Resources can therefore be rendered manageable regardless of how their management applications are implemented.
-</para>
- <para>
-The JMX technology defines standard connectors (known as JMX connectors) that enable you to access JMX agents from remote management applications. JMX connectors using different protocols provide the same management interface. Consequently, a management application can manage resources transparently, regardless of the communication protocol used. JMX agents can also be used by systems or applications that are not compliant with the JMX specification, as long as those systems or applications support JMX agents.
-</para>
-<ulink
- url="http://java.sun.com/docs/books/tutorial/jmx/overview/index.html">Read more about JMX</ulink>.
- </section>
-
- <section>
- <title>What is JMX Tools?</title>
- <para><property>JBoss JMX Tools</property> allow to setup multiple JMX connections and provide view
- for exploring the JMX tree and execute operations directly from Eclipse.</para>
-
- <para>This chapter covers the basics of working with <property>JMX plugin</property>, which is
- used to manage Java applications through JMX and its RMI Connector.</para>
-
- <figure>
- <title>JMX Tools</title>
- <mediaobject>
- <imageobject>
- <imagedata fileref="images/eclipse-jmx_0.2.png"/>
- </imageobject>
- </mediaobject>
- </figure>
- </section>
-
- <section><title>Key Features of JMX Tools</title>
- <para>For a start, we propose you to look through the table of main features of JMX Tools:</para>
- <table>
-
- <title>Key Functionality for JMX Tools</title>
- <tgroup cols="3">
-
- <colspec colnum="1" align="left" colwidth="2*"/>
- <colspec colnum="2" colwidth="4*"/>
- <colspec colnum="3" align="left" colwidth="2*"/>
-
- <thead>
- <row>
- <entry>Feature</entry>
- <entry>Benefit</entry>
- <entry>Chapter</entry>
- </row>
- </thead>
-
- <tbody>
-
- <row>
- <entry><para>MBean Explorer</para></entry>
- <entry><para>MBean Explorer is a useful view with a text filter that displays domains, mbeans, attributes, and operations inside a connection.</para></entry>
- <entry>
- <link linkend="mbean_explorer">MBean Explorer</link>
- </entry>
- </row>
-
- <row>
- <entry><para>MBean Editor</para></entry>
- <entry><para>MBean Editor is a multi-page editor to manage MBeans.</para></entry>
- <entry>
- <link linkend="mbean_editor">MBean Editor</link>
- </entry>
- </row>
- </tbody>
- </tgroup>
- </table>
- </section>
-
- <section>
- <title>Requirements and Installation</title>
- <section>
- <title> Requirements</title>
- <para>Requirements to use <property>JMX Tools</property> are the following:</para>
-
- <itemizedlist>
- <listitem>
- <para><property>JMX Tools</property> is developed on Eclipse 3.4.x milestones</para>
- </listitem>
- <listitem>
- <para><property>JMX Tools</property> requires that Eclipse is run on a JDK 1.5.0 or above
- (due to dependencies on JMX packages which were introduced in Java 1.5.0)</para>
- </listitem>
- </itemizedlist>
- </section>
- <section>
- <title>Installation</title>
- <para>Here, we are going to explain how to install the <property>JMX plugin</property> into
- Eclipse.</para>
-
- <para><property>JMX Tools</property> is one module of the <property>JBoss Tools</property>
- project. <property>JMX Tools</property> has no dependency on any other part of <property>JBoss
- Tools</property>, and can be downloaded standalone. Even though the <property>JMX
- Tools</property> have no dependencies, other plugins, such as <property>AS Tools</property>,
- do depend on the JMX Tooling and even extend it. </para>
-
- <para>You can find the <property>JBoss Tools</property> plugins over at the <ulink
- url="http://labs.jboss.com/tools/download.html">download pages</ulink>. The only
- package you'll need to get is the JMX Tooling, however the <property>AS
- Tools</property> would give you a more full experience when using JMX with JBoss Servers.
- You can find further download and installation instructions on the JBoss Wiki in the <ulink
- url="http://www.jboss.org/tools/download/installation">Installing JBoss Tools</ulink>
- section.</para>
- </section>
- </section>
-</chapter>>>>>>>> .r22100
+</chapter>
\ No newline at end of file
15 years, 11 months
JBoss Tools SVN: r22217 - trunk/bpel/plugins/org.eclipse.bpel.ui/src/org/eclipse/bpel/ui.
by jbosstools-commits@lists.jboss.org
Author: bbrodt
Date: 2010-05-20 12:31:36 -0400 (Thu, 20 May 2010)
New Revision: 22217
Added:
trunk/bpel/plugins/org.eclipse.bpel.ui/src/org/eclipse/bpel/ui/BPELContentDescriber.java
Log:
https://jira.jboss.org/browse/JBIDE-6006
https://jira.jboss.org/browse/JBIDE-6093
Had to roll my own BPEL Content Describer class - XMLRootElementContentDescriber2 has some...strange behavior
Added: trunk/bpel/plugins/org.eclipse.bpel.ui/src/org/eclipse/bpel/ui/BPELContentDescriber.java
===================================================================
--- trunk/bpel/plugins/org.eclipse.bpel.ui/src/org/eclipse/bpel/ui/BPELContentDescriber.java (rev 0)
+++ trunk/bpel/plugins/org.eclipse.bpel.ui/src/org/eclipse/bpel/ui/BPELContentDescriber.java 2010-05-20 16:31:36 UTC (rev 22217)
@@ -0,0 +1,104 @@
+/*******************************************************************************
+ * Copyright (c) 2010 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.eclipse.bpel.ui;
+
+import java.io.IOException;
+import java.io.InputStream;
+import java.io.InputStreamReader;
+import java.io.Reader;
+
+import org.apache.xerces.parsers.SAXParser;
+import org.apache.xerces.xni.Augmentations;
+import org.apache.xerces.xni.QName;
+import org.apache.xerces.xni.XMLAttributes;
+import org.apache.xerces.xni.XNIException;
+import org.eclipse.core.runtime.QualifiedName;
+import org.eclipse.core.runtime.content.IContentDescription;
+import org.eclipse.core.runtime.content.ITextContentDescriber;
+import org.xml.sax.InputSource;
+
+/**
+ * @author Bob Brodt
+ *
+ * added for https://jira.jboss.org/browse/JBIDE-6006
+ */
+public class BPELContentDescriber implements ITextContentDescriber {
+
+ private static final String WSBPEL_2_NAMESPACE = "http://docs.oasis-open.org/wsbpel/2.0/process/executable"; //$NON-NLS-1$
+ private static final String ROOT_ELEMENT = "process"; //$NON-NLS-1$
+
+ private RootElementParser parser;
+
+ public BPELContentDescriber() {
+ }
+
+ public int describe(Reader contents, IContentDescription description) throws IOException {
+ return doDescribe(contents) == null ? INVALID : VALID;
+ }
+
+ public int describe(InputStream contents, IContentDescription description) throws IOException {
+ return describe(new InputStreamReader(contents), description);
+ }
+
+ private synchronized String doDescribe(Reader contents) throws IOException {
+ try {
+ InputSource source = new InputSource(contents);
+ parser = new RootElementParser();
+ parser.parse(source);
+ } catch (AcceptedException e) {
+ return e.acceptedRootElement;
+ } catch (RejectedException e) {
+ return null;
+ } catch (Exception e) {
+ return null;
+ }
+ finally {
+ parser = null;
+ }
+
+ return null;
+ }
+
+ public QualifiedName[] getSupportedOptions() {
+ return null;
+ }
+
+ private class RootElementParser extends SAXParser {
+ public void startElement(QName qName, XMLAttributes attributes, Augmentations augmentations) throws XNIException {
+
+ super.startElement(qName, attributes, augmentations);
+
+ if (ROOT_ELEMENT.equals(qName.localpart)) {
+ String namespace = fNamespaceContext.getURI(qName.prefix);
+ if (WSBPEL_2_NAMESPACE.equals(namespace))
+ throw new AcceptedException(qName.localpart);
+ else
+ throw new RejectedException();
+ } else
+ throw new RejectedException();
+ }
+ }
+
+ private class AcceptedException extends RuntimeException {
+ public String acceptedRootElement;
+
+ public AcceptedException(String acceptedRootElement) {
+ this.acceptedRootElement = acceptedRootElement;
+ }
+
+ private static final long serialVersionUID = 1L;
+ }
+
+ private class RejectedException extends RuntimeException {
+ private static final long serialVersionUID = 1L;
+ }
+}
15 years, 11 months
JBoss Tools SVN: r22216 - in trunk/bpel/plugins: org.eclipse.bpel.ui and 2 other directories.
by jbosstools-commits@lists.jboss.org
Author: bbrodt
Date: 2010-05-20 12:30:19 -0400 (Thu, 20 May 2010)
New Revision: 22216
Modified:
trunk/bpel/plugins/org.eclipse.bpel.apache.ode.deploy.ui/src/org/eclipse/bpel/apache/ode/deploy/ui/util/DeployUtils.java
trunk/bpel/plugins/org.eclipse.bpel.ui/META-INF/MANIFEST.MF
trunk/bpel/plugins/org.eclipse.bpel.ui/plugin.xml
trunk/bpel/plugins/org.eclipse.bpel.ui/src/org/eclipse/bpel/ui/BPELResourceChangeListener.java
trunk/bpel/plugins/org.eclipse.bpel.ui/src/org/eclipse/bpel/ui/IBPELUIConstants.java
Log:
https://jira.jboss.org/browse/JBIDE-6006
https://jira.jboss.org/browse/JBIDE-6093
Had to roll my own BPEL Content Describer class - XMLRootElementContentDescriber2 has some...strange behavior
Modified: trunk/bpel/plugins/org.eclipse.bpel.apache.ode.deploy.ui/src/org/eclipse/bpel/apache/ode/deploy/ui/util/DeployUtils.java
===================================================================
--- trunk/bpel/plugins/org.eclipse.bpel.apache.ode.deploy.ui/src/org/eclipse/bpel/apache/ode/deploy/ui/util/DeployUtils.java 2010-05-20 16:09:50 UTC (rev 22215)
+++ trunk/bpel/plugins/org.eclipse.bpel.apache.ode.deploy.ui/src/org/eclipse/bpel/apache/ode/deploy/ui/util/DeployUtils.java 2010-05-20 16:30:19 UTC (rev 22216)
@@ -333,10 +333,16 @@
if (type.getId().equals(BPEL_CONTENT_TYPE))
return true;
}
+
+ // https://jira.jboss.org/browse/JBIDE-6006
+ // this causes all kinds of nasty stack traces - see https://jira.jboss.org/browse/JBIDE-6093
+ // since this version of the ODE deployment editor is part of the same feature as the BPEL editor
+ // plugin, we'll go on the assumption that they will always be installed together. You'd have to
+ // something pretty dangerous to install one without the other.
// maybe the eclipse BPEL editor is not installed?
// fall back to using '.bpel' file extension
- if ("bpel".equals(((IFile)res).getFileExtension()))
- return true;
+ //if ("bpel".equals(((IFile)res).getFileExtension()))
+ // return true;
}
}
catch(Exception ex)
Modified: trunk/bpel/plugins/org.eclipse.bpel.ui/META-INF/MANIFEST.MF
===================================================================
--- trunk/bpel/plugins/org.eclipse.bpel.ui/META-INF/MANIFEST.MF 2010-05-20 16:09:50 UTC (rev 22215)
+++ trunk/bpel/plugins/org.eclipse.bpel.ui/META-INF/MANIFEST.MF 2010-05-20 16:30:19 UTC (rev 22216)
@@ -66,3 +66,4 @@
org.eclipse.bpel.ui.util.marker,
org.eclipse.bpel.ui.wizards
Bundle-RequiredExecutionEnvironment: J2SE-1.5
+Import-Package: org.eclipse.bpel.validator
Modified: trunk/bpel/plugins/org.eclipse.bpel.ui/plugin.xml
===================================================================
--- trunk/bpel/plugins/org.eclipse.bpel.ui/plugin.xml 2010-05-20 16:09:50 UTC (rev 22215)
+++ trunk/bpel/plugins/org.eclipse.bpel.ui/plugin.xml 2010-05-20 16:30:19 UTC (rev 22216)
@@ -657,11 +657,9 @@
name="BPEL Editor File"
file-extensions="bpel,bpel2,xml"
priority="normal">
+ <!-- problems with XMLRootElementContentDescriber2 - had to roll my own -->
<describer
- class="org.eclipse.core.runtime.content.XMLRootElementContentDescriber2">
- <parameter
- name="element"
- value="{http://docs.oasis-open.org/wsbpel/2.0/process/executable}process"/>
+ class="org.eclipse.bpel.ui.BPELContentDescriber">
</describer>
</content-type>
</extension>
Modified: trunk/bpel/plugins/org.eclipse.bpel.ui/src/org/eclipse/bpel/ui/BPELResourceChangeListener.java
===================================================================
--- trunk/bpel/plugins/org.eclipse.bpel.ui/src/org/eclipse/bpel/ui/BPELResourceChangeListener.java 2010-05-20 16:09:50 UTC (rev 22215)
+++ trunk/bpel/plugins/org.eclipse.bpel.ui/src/org/eclipse/bpel/ui/BPELResourceChangeListener.java 2010-05-20 16:30:19 UTC (rev 22216)
@@ -21,6 +21,7 @@
import org.eclipse.bpel.model.CorrelationSet;
import org.eclipse.bpel.model.messageproperties.Property;
import org.eclipse.bpel.ui.util.BPELUtil;
+import org.eclipse.bpel.validator.Builder;
import org.eclipse.core.resources.IContainer;
import org.eclipse.core.resources.IFile;
import org.eclipse.core.resources.IResource;
@@ -51,13 +52,9 @@
public boolean visit(final IResourceDelta delta) throws CoreException {
IResource target = delta.getResource();
- if (target.getType() == IResource.FILE) {
- String ext = target.getFileExtension();
- if (ext != null) {
- if (ext.equals(IBPELUIConstants.EXTENSION_BPEL)) {
- handleBPEL(delta);
- }
- }
+ // https://jira.jboss.org/browse/JBIDE-6006
+ if (Builder.isBPELFile(target)) {
+ handleBPEL(delta);
}
return true;
}
Modified: trunk/bpel/plugins/org.eclipse.bpel.ui/src/org/eclipse/bpel/ui/IBPELUIConstants.java
===================================================================
--- trunk/bpel/plugins/org.eclipse.bpel.ui/src/org/eclipse/bpel/ui/IBPELUIConstants.java 2010-05-20 16:09:50 UTC (rev 22215)
+++ trunk/bpel/plugins/org.eclipse.bpel.ui/src/org/eclipse/bpel/ui/IBPELUIConstants.java 2010-05-20 16:30:19 UTC (rev 22216)
@@ -17,7 +17,9 @@
public interface IBPELUIConstants {
// File extensions
- @Deprecated // use content type instead of bpel file extensions
+ // https://jira.jboss.org/browse/JBIDE-6006
+ // @Deprecated // use content type instead of bpel file extensions
+ // oops! actually not deprecated - we still need this to construct bpel file names
public final String EXTENSION_BPEL = "bpel"; //$NON-NLS-1$
public final String EXTENSION_WSDL = "wsdl"; //$NON-NLS-1$
public final String EXTENSION_WSIL = "wsil"; //$NON-NLS-1$
15 years, 11 months