JBoss Tools SVN: r29026 - in trunk/cdi: plugins/org.jboss.tools.cdi.core/src/org/jboss/tools/cdi/internal/core/validation and 3 other directories.
by jbosstools-commits@lists.jboss.org
Author: akazakov
Date: 2011-02-05 08:34:42 -0500 (Sat, 05 Feb 2011)
New Revision: 29026
Added:
trunk/cdi/tests/org.jboss.tools.cdi.core.test/resources/tck/tests/jbt/validation/inject/revalidation/
trunk/cdi/tests/org.jboss.tools.cdi.core.test/resources/tck/tests/jbt/validation/inject/revalidation/ITestBean.java
trunk/cdi/tests/org.jboss.tools.cdi.core.test/resources/tck/tests/jbt/validation/inject/revalidation/TestBeanBroken.java
trunk/cdi/tests/org.jboss.tools.cdi.core.test/resources/tck/tests/jbt/validation/inject/revalidation/TestBeanImpl.java
trunk/cdi/tests/org.jboss.tools.cdi.core.test/resources/tck/tests/jbt/validation/inject/revalidation/TestBeanImpl2.java
trunk/cdi/tests/org.jboss.tools.cdi.core.test/resources/tck/tests/jbt/validation/inject/revalidation/TestBeanImpl2.validation
trunk/cdi/tests/org.jboss.tools.cdi.core.test/resources/tck/tests/jbt/validation/inject/revalidation/TestBeanImpl2Original.validation
Modified:
trunk/cdi/plugins/org.jboss.tools.cdi.core/src/org/jboss/tools/cdi/core/IBeanManager.java
trunk/cdi/plugins/org.jboss.tools.cdi.core/src/org/jboss/tools/cdi/internal/core/validation/CDICoreValidator.java
trunk/cdi/tests/org.jboss.tools.cdi.core.test/src/org/jboss/tools/cdi/core/test/tck/validation/DeploymentProblemsValidationTests.java
Log:
https://issues.jboss.org/browse/JBIDE-8325 - fixed
Modified: trunk/cdi/plugins/org.jboss.tools.cdi.core/src/org/jboss/tools/cdi/core/IBeanManager.java
===================================================================
--- trunk/cdi/plugins/org.jboss.tools.cdi.core/src/org/jboss/tools/cdi/core/IBeanManager.java 2011-02-04 20:44:22 UTC (rev 29025)
+++ trunk/cdi/plugins/org.jboss.tools.cdi.core/src/org/jboss/tools/cdi/core/IBeanManager.java 2011-02-05 13:34:42 UTC (rev 29026)
@@ -110,9 +110,9 @@
* {@linkplain javax.enterprise.inject.Default default qualifier} is
* assumed.
*
- * @param fullQualifiedBeanType
+ * @param fullyQualifiedBeanType
* the required bean type
- * @param fullQualifiedQualifiersTypes
+ * @param fullyQualifiedQualifiersTypes
* the required qualifiers
* @param attemptToResolveAmbiguousDependency
* if there are a few beans with the given type and qualifiers
@@ -401,16 +401,16 @@
/**
* Returns the source reference to <stereotype>...</stereotype> or <class>...<class> element of
- * <alternatives> of beans.xml by its full qualified type name. For example:
+ * <alternatives> of beans.xml by its fully qualified type name. For example:
* <alternatives>
* <stereotype>org.compony.Log</stereotype>
* <class>org.compony.Item</class>
* </alternatives>
*
* @return the source reference to <stereotype>...</stereotype> or <class>...</class> element of
- * <alternatives> of beans.xml by its full qualified type name
+ * <alternatives> of beans.xml by its fully qualified type name
*/
- List<INodeReference> getAlternatives(String fullQualifiedTypeName);
+ List<INodeReference> getAlternatives(String fullyQualifiedTypeName);
/**
* Returns the source reference to <class>...</class> element of
@@ -426,15 +426,15 @@
/**
* Returns the source reference to <class>...</class> element of
- * <decorators> of beans.xml by its full qualified type name. For example:
+ * <decorators> of beans.xml by its fully qualified type name. For example:
* <decorators>
* <class>org.compony.Item</class>
* </decorators>
*
* @return the source reference to <class>...</class> element of
- * <decorators> of beans.xml by its full qualified type name.
+ * <decorators> of beans.xml by its fully qualified type name.
*/
- List<INodeReference> getDecoratorClasses(String fullQualifiedTypeName);
+ List<INodeReference> getDecoratorClasses(String fullyQualifiedTypeName);
/**
* Returns the source reference to <class>...</class> element of
@@ -450,15 +450,15 @@
/**
* Returns the source reference to <class>...</class> element of
- * <interceptors> of beans.xml by its full qualified type name. For example:
+ * <interceptors> of beans.xml by its fully qualified type name. For example:
* <interceptors>
* <class>org.compony.Item</class>
* </interceptors>
*
* @return the source reference to <class>...</class> element of
- * <interceptors> of beans.xml by its full qualified type name.
+ * <interceptors> of beans.xml by its fully qualified type name.
*/
- List<INodeReference> getInterceptorClasses(String fullQualifiedTypeName);
+ List<INodeReference> getInterceptorClasses(String fullyQualifiedTypeName);
/**
* Returns set of injection points with declared type exactly equal to fullyQualifiedTypeName.
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 2011-02-04 20:44:22 UTC (rev 29025)
+++ trunk/cdi/plugins/org.jboss.tools.cdi.core/src/org/jboss/tools/cdi/internal/core/validation/CDICoreValidator.java 2011-02-05 13:34:42 UTC (rev 29026)
@@ -245,6 +245,8 @@
}
}
}
+
+ collectAllRelatedInjections(currentFile, resources);
}
}
@@ -1281,6 +1283,26 @@
}
}
+ private void collectAllRelatedInjections(IFile validatingResource, Set<IPath> relatedResources) {
+ Set<IBean> beans = cdiProject.getBeans(validatingResource.getFullPath());
+ for (IBean bean : beans) {
+ if(bean instanceof IClassBean) {
+ Set<IParametedType> types = bean.getAllTypes();
+ for (IParametedType type : types) {
+ IType superType = type.getType();
+ if(superType!=null) {
+ Set<IInjectionPoint> injections = cdiProject.getInjections(superType.getFullyQualifiedName());
+ for (IInjectionPoint injection : injections) {
+ if(!injection.getClassBean().getBeanClass().isBinary() && injection.getClassBean()!=bean) {
+ relatedResources.add(injection.getResource().getFullPath());
+ }
+ }
+ }
+ }
+ }
+ }
+ }
+
private void validateInjectionPoint(IInjectionPoint injection) {
/*
* 3.11. The qualifier @Named at injection points
Added: trunk/cdi/tests/org.jboss.tools.cdi.core.test/resources/tck/tests/jbt/validation/inject/revalidation/ITestBean.java
===================================================================
--- trunk/cdi/tests/org.jboss.tools.cdi.core.test/resources/tck/tests/jbt/validation/inject/revalidation/ITestBean.java (rev 0)
+++ trunk/cdi/tests/org.jboss.tools.cdi.core.test/resources/tck/tests/jbt/validation/inject/revalidation/ITestBean.java 2011-02-05 13:34:42 UTC (rev 29026)
@@ -0,0 +1,5 @@
+package org.jboss.jsr299.tck.tests.jbt.validation.inject.revalidation;
+
+public interface ITestBean {
+
+}
\ No newline at end of file
Property changes on: trunk/cdi/tests/org.jboss.tools.cdi.core.test/resources/tck/tests/jbt/validation/inject/revalidation/ITestBean.java
___________________________________________________________________
Name: svn:mime-type
+ text/plain
Added: trunk/cdi/tests/org.jboss.tools.cdi.core.test/resources/tck/tests/jbt/validation/inject/revalidation/TestBeanBroken.java
===================================================================
--- trunk/cdi/tests/org.jboss.tools.cdi.core.test/resources/tck/tests/jbt/validation/inject/revalidation/TestBeanBroken.java (rev 0)
+++ trunk/cdi/tests/org.jboss.tools.cdi.core.test/resources/tck/tests/jbt/validation/inject/revalidation/TestBeanBroken.java 2011-02-05 13:34:42 UTC (rev 29026)
@@ -0,0 +1,11 @@
+package org.jboss.jsr299.tck.tests.jbt.validation.inject.revalidation;
+
+import javax.inject.Inject;
+
+public abstract class TestBeanBroken {
+
+ @Inject ITestBean foo;
+
+ public TestBeanBroken() {
+ }
+}
\ No newline at end of file
Property changes on: trunk/cdi/tests/org.jboss.tools.cdi.core.test/resources/tck/tests/jbt/validation/inject/revalidation/TestBeanBroken.java
___________________________________________________________________
Name: svn:mime-type
+ text/plain
Added: trunk/cdi/tests/org.jboss.tools.cdi.core.test/resources/tck/tests/jbt/validation/inject/revalidation/TestBeanImpl.java
===================================================================
--- trunk/cdi/tests/org.jboss.tools.cdi.core.test/resources/tck/tests/jbt/validation/inject/revalidation/TestBeanImpl.java (rev 0)
+++ trunk/cdi/tests/org.jboss.tools.cdi.core.test/resources/tck/tests/jbt/validation/inject/revalidation/TestBeanImpl.java 2011-02-05 13:34:42 UTC (rev 29026)
@@ -0,0 +1,5 @@
+package org.jboss.jsr299.tck.tests.jbt.validation.inject.revalidation;
+
+public class TestBeanImpl implements ITestBean {
+
+}
\ No newline at end of file
Property changes on: trunk/cdi/tests/org.jboss.tools.cdi.core.test/resources/tck/tests/jbt/validation/inject/revalidation/TestBeanImpl.java
___________________________________________________________________
Name: svn:mime-type
+ text/plain
Added: trunk/cdi/tests/org.jboss.tools.cdi.core.test/resources/tck/tests/jbt/validation/inject/revalidation/TestBeanImpl2.java
===================================================================
--- trunk/cdi/tests/org.jboss.tools.cdi.core.test/resources/tck/tests/jbt/validation/inject/revalidation/TestBeanImpl2.java (rev 0)
+++ trunk/cdi/tests/org.jboss.tools.cdi.core.test/resources/tck/tests/jbt/validation/inject/revalidation/TestBeanImpl2.java 2011-02-05 13:34:42 UTC (rev 29026)
@@ -0,0 +1,5 @@
+package org.jboss.jsr299.tck.tests.jbt.validation.inject.revalidation;
+
+public class TestBeanImpl2 {
+
+}
\ No newline at end of file
Property changes on: trunk/cdi/tests/org.jboss.tools.cdi.core.test/resources/tck/tests/jbt/validation/inject/revalidation/TestBeanImpl2.java
___________________________________________________________________
Name: svn:mime-type
+ text/plain
Added: trunk/cdi/tests/org.jboss.tools.cdi.core.test/resources/tck/tests/jbt/validation/inject/revalidation/TestBeanImpl2.validation
===================================================================
--- trunk/cdi/tests/org.jboss.tools.cdi.core.test/resources/tck/tests/jbt/validation/inject/revalidation/TestBeanImpl2.validation (rev 0)
+++ trunk/cdi/tests/org.jboss.tools.cdi.core.test/resources/tck/tests/jbt/validation/inject/revalidation/TestBeanImpl2.validation 2011-02-05 13:34:42 UTC (rev 29026)
@@ -0,0 +1,5 @@
+package org.jboss.jsr299.tck.tests.jbt.validation.inject.revalidation;
+
+public class TestBeanImpl2 implements ITestBean {
+
+}
\ No newline at end of file
Added: trunk/cdi/tests/org.jboss.tools.cdi.core.test/resources/tck/tests/jbt/validation/inject/revalidation/TestBeanImpl2Original.validation
===================================================================
--- trunk/cdi/tests/org.jboss.tools.cdi.core.test/resources/tck/tests/jbt/validation/inject/revalidation/TestBeanImpl2Original.validation (rev 0)
+++ trunk/cdi/tests/org.jboss.tools.cdi.core.test/resources/tck/tests/jbt/validation/inject/revalidation/TestBeanImpl2Original.validation 2011-02-05 13:34:42 UTC (rev 29026)
@@ -0,0 +1,5 @@
+package org.jboss.jsr299.tck.tests.jbt.validation.inject.revalidation;
+
+public class TestBeanImpl2 {
+
+}
\ No newline at end of file
Modified: trunk/cdi/tests/org.jboss.tools.cdi.core.test/src/org/jboss/tools/cdi/core/test/tck/validation/DeploymentProblemsValidationTests.java
===================================================================
--- trunk/cdi/tests/org.jboss.tools.cdi.core.test/src/org/jboss/tools/cdi/core/test/tck/validation/DeploymentProblemsValidationTests.java 2011-02-04 20:44:22 UTC (rev 29025)
+++ trunk/cdi/tests/org.jboss.tools.cdi.core.test/src/org/jboss/tools/cdi/core/test/tck/validation/DeploymentProblemsValidationTests.java 2011-02-05 13:34:42 UTC (rev 29026)
@@ -14,7 +14,11 @@
import java.text.MessageFormat;
import org.eclipse.core.resources.IFile;
+import org.eclipse.core.resources.IncrementalProjectBuilder;
+import org.eclipse.core.runtime.NullProgressMonitor;
import org.jboss.tools.cdi.internal.core.validation.CDIValidationMessages;
+import org.jboss.tools.test.util.JobUtils;
+import org.jboss.tools.test.util.ResourcesUtils;
/**
* @author Alexey Kazakov
@@ -242,4 +246,39 @@
IFile file = tckProject.getFile("JavaSource/org/jboss/jsr299/tck/tests/decorators/definition/broken/finalBeanMethod/TimestampLogger.java");
assertMarkerIsCreated(file, MessageFormat.format(CDIValidationMessages.DECORATOR_RESOLVES_TO_FINAL_METHOD, "MockLogger", "log(String string)"), 31);
}
+
+ /**
+ * See https://issues.jboss.org/browse/JBIDE-8325
+ * @throws Exception
+ */
+ public void testInjectionPointRevalidation() throws Exception {
+ boolean saveAutoBuild = ResourcesUtils.setBuildAutomatically(false);
+ JobUtils.waitForIdle();
+
+ IFile testInjection = tckProject.getFile("JavaSource/org/jboss/jsr299/tck/tests/jbt/validation/inject/revalidation/TestBeanBroken.java");
+ assertMarkerIsNotCreated(testInjection, CDIValidationMessages.AMBIGUOUS_INJECTION_POINTS, 7);
+ assertMarkerIsNotCreated(testInjection, CDIValidationMessages.UNSATISFIED_INJECTION_POINTS, 7);
+
+ IFile testBean = tckProject.getFile("JavaSource/org/jboss/jsr299/tck/tests/jbt/validation/inject/revalidation/TestBeanImpl2.java");
+ IFile testBeanImpl = tckProject.getFile("JavaSource/org/jboss/jsr299/tck/tests/jbt/validation/inject/revalidation/TestBeanImpl2.validation");
+ testBean.setContents(testBeanImpl.getContents(), IFile.FORCE, new NullProgressMonitor());
+ JobUtils.waitForIdle(1000);
+ tckProject.build(IncrementalProjectBuilder.INCREMENTAL_BUILD, new NullProgressMonitor());
+ JobUtils.waitForIdle(1000);
+
+ assertMarkerIsCreated(testInjection, CDIValidationMessages.AMBIGUOUS_INJECTION_POINTS, 7);
+
+ testBeanImpl = tckProject.getFile("JavaSource/org/jboss/jsr299/tck/tests/jbt/validation/inject/revalidation/TestBeanImpl2.java");
+ testBean = tckProject.getFile("JavaSource/org/jboss/jsr299/tck/tests/jbt/validation/inject/revalidation/TestBeanImpl2Original.validation");
+ testBeanImpl.setContents(testBean.getContents(), IFile.FORCE, new NullProgressMonitor());
+ JobUtils.waitForIdle(1000);
+ tckProject.build(IncrementalProjectBuilder.INCREMENTAL_BUILD, new NullProgressMonitor());
+ JobUtils.waitForIdle(1000);
+
+ assertMarkerIsNotCreated(testInjection, CDIValidationMessages.AMBIGUOUS_INJECTION_POINTS, 7);
+ assertMarkerIsNotCreated(testInjection, CDIValidationMessages.UNSATISFIED_INJECTION_POINTS, 7);
+
+ ResourcesUtils.setBuildAutomatically(saveAutoBuild);
+ JobUtils.waitForIdle();
+ }
}
\ No newline at end of file
13 years, 11 months
JBoss Tools SVN: r29025 - trunk/bpel/plugins/org.eclipse.bpel.model/src/org/eclipse/bpel/model/util.
by jbosstools-commits@lists.jboss.org
Author: bbrodt
Date: 2011-02-04 15:44:22 -0500 (Fri, 04 Feb 2011)
New Revision: 29025
Modified:
trunk/bpel/plugins/org.eclipse.bpel.model/src/org/eclipse/bpel/model/util/BPELConstants.java
Log:
made XPATH namespace strings public
Modified: trunk/bpel/plugins/org.eclipse.bpel.model/src/org/eclipse/bpel/model/util/BPELConstants.java
===================================================================
--- trunk/bpel/plugins/org.eclipse.bpel.model/src/org/eclipse/bpel/model/util/BPELConstants.java 2011-02-04 20:41:56 UTC (rev 29024)
+++ trunk/bpel/plugins/org.eclipse.bpel.model/src/org/eclipse/bpel/model/util/BPELConstants.java 2011-02-04 20:44:22 UTC (rev 29025)
@@ -31,11 +31,11 @@
/** The default query language */
- static final String XMLNS_XPATH_QUERY_LANGUAGE_2007 = "urn:oasis:names:tc:wsbpel:2.0:sublang:xpath1.0";
+ public static final String XMLNS_XPATH_QUERY_LANGUAGE_2007 = "urn:oasis:names:tc:wsbpel:2.0:sublang:xpath1.0";
+
+ /** The "old" default query language */
+ public static final String XMLNS_XPATH_QUERY_LANGUAGE_2004 = "http://www.w3.org/TR/1999/REC-xpath-19991116";
- /** The "old" default query language */
- static final String XMLNS_XPATH_QUERY_LANGUAGE_2004 = "http://www.w3.org/TR/1999/REC-xpath-19991116";
-
/** The current query language */
public static final String XMLNS_XPATH_QUERY_LANGUAGE = XMLNS_XPATH_QUERY_LANGUAGE_2007;
13 years, 11 months
JBoss Tools SVN: r29024 - trunk/bpel/plugins/org.eclipse.bpel.model/src/model.
by jbosstools-commits@lists.jboss.org
Author: bbrodt
Date: 2011-02-04 15:41:56 -0500 (Fri, 04 Feb 2011)
New Revision: 29024
Modified:
trunk/bpel/plugins/org.eclipse.bpel.model/src/model/bpel.ecore
Log:
https://issues.jboss.org/browse/JBIDE-8305
Modified: trunk/bpel/plugins/org.eclipse.bpel.model/src/model/bpel.ecore
===================================================================
--- trunk/bpel/plugins/org.eclipse.bpel.model/src/model/bpel.ecore 2011-02-04 20:17:34 UTC (rev 29023)
+++ trunk/bpel/plugins/org.eclipse.bpel.model/src/model/bpel.ecore 2011-02-04 20:41:56 UTC (rev 29024)
@@ -460,8 +460,8 @@
eType="ecore:EClass platform:/plugin/org.eclipse.wst.wsdl/model/WSDL.ecore#//Operation"/>
<eStructuralFeatures xsi:type="ecore:EReference" name="portType" lowerBound="1"
eType="ecore:EClass platform:/plugin/org.eclipse.wst.wsdl/model/WSDL.ecore#//PortType"/>
- <eStructuralFeatures xsi:type="ecore:EReference" name="messageType" lowerBound="1"
- eType="ecore:EClass platform:/plugin/org.eclipse.wst.wsdl/model/WSDL.ecore#//Message"/>
+ <eStructuralFeatures xsi:type="ecore:EReference" name="messageType" eType="ecore:EClass platform:/plugin/org.eclipse.wst.wsdl/model/WSDL.ecore#//Message"/>
+ <eStructuralFeatures xsi:type="ecore:EReference" name="xsdElement" eType="ecore:EClass platform:/plugin/org.eclipse.xsd/model/XSD.ecore#//XSDElementDeclaration"/>
<eStructuralFeatures xsi:type="ecore:EReference" name="correlationSets" eType="#//CorrelationSets"
containment="true"/>
<eStructuralFeatures xsi:type="ecore:EReference" name="fromParts" eType="#//FromParts"
13 years, 11 months
JBoss Tools SVN: r29023 - trunk/bpel/plugins/org.eclipse.bpel.validator/src/org/eclipse/bpel/validator/rules.
by jbosstools-commits@lists.jboss.org
Author: bbrodt
Date: 2011-02-04 15:17:34 -0500 (Fri, 04 Feb 2011)
New Revision: 29023
Modified:
trunk/bpel/plugins/org.eclipse.bpel.validator/src/org/eclipse/bpel/validator/rules/Factory.java
Log:
https://issues.jboss.org/browse/JBIDE-6825
Modified: trunk/bpel/plugins/org.eclipse.bpel.validator/src/org/eclipse/bpel/validator/rules/Factory.java
===================================================================
--- trunk/bpel/plugins/org.eclipse.bpel.validator/src/org/eclipse/bpel/validator/rules/Factory.java 2011-02-04 20:14:38 UTC (rev 29022)
+++ trunk/bpel/plugins/org.eclipse.bpel.validator/src/org/eclipse/bpel/validator/rules/Factory.java 2011-02-04 20:17:34 UTC (rev 29023)
@@ -47,13 +47,19 @@
public Validator create(QName qname) {
- // Bugzilla 324165
- // https://issues.jboss.org/browse/JBIDE-6825
- // handle unknown BPEL elements
- Validator validator = createValidator ( qname.getLocalPart() );
- if (validator==null)
- validator = new UnknownElementValidator();
- return validator;
+ String nsURI = qname.getNamespaceURI();
+
+ if (nsURI.equals(IConstants.XMLNS_BPEL) || nsURI.equals(IConstants.XMLNS_BPEL20_OLD)) {
+ // Bugzilla 324165
+ // https://issues.jboss.org/browse/JBIDE-6825
+ // handle unknown BPEL elements
+ Validator validator = createValidator ( qname.getLocalPart() );
+ if (validator==null)
+ validator = new UnknownElementValidator();
+ return validator;
+ }
+
+ return null;
}
@SuppressWarnings("nls")
13 years, 11 months
JBoss Tools SVN: r29022 - trunk/bpel/plugins/org.eclipse.bpel.model/src/org/eclipse/bpel/model/resource.
by jbosstools-commits@lists.jboss.org
Author: bbrodt
Date: 2011-02-04 15:14:38 -0500 (Fri, 04 Feb 2011)
New Revision: 29022
Modified:
trunk/bpel/plugins/org.eclipse.bpel.model/src/org/eclipse/bpel/model/resource/BPELReader.java
trunk/bpel/plugins/org.eclipse.bpel.model/src/org/eclipse/bpel/model/resource/BPELWriter.java
Log:
https://issues.jboss.org/browse/JBIDE-8305
Modified: trunk/bpel/plugins/org.eclipse.bpel.model/src/org/eclipse/bpel/model/resource/BPELReader.java
===================================================================
--- trunk/bpel/plugins/org.eclipse.bpel.model/src/org/eclipse/bpel/model/resource/BPELReader.java 2011-02-04 20:06:00 UTC (rev 29021)
+++ trunk/bpel/plugins/org.eclipse.bpel.model/src/org/eclipse/bpel/model/resource/BPELReader.java 2011-02-04 20:14:38 UTC (rev 29022)
@@ -829,6 +829,20 @@
QName qName = BPELUtils.createAttributeValue(activityElement, "messageType");
Message messageType = new MessageProxy(getResource().getURI(), qName);
onEvent.setMessageType(messageType);
+ }
+
+ // https://bugs.eclipse.org/bugs/show_bug.cgi?id=336003
+ // https://issues.jboss.org/browse/JBIDE-8305
+ // "element" attribute was missing from original model
+ // Set xsd element
+ if (activityElement.hasAttribute("element")) {
+ QName qName = BPELUtils.createAttributeValue(activityElement,
+ "element");
+ XSDElementDeclaration element = new XSDElementDeclarationProxy(
+ getResource().getURI(), qName);
+ onEvent.setXSDElement(element);
+ } else {
+ onEvent.setXSDElement(null);
}
// Set correlations
Modified: trunk/bpel/plugins/org.eclipse.bpel.model/src/org/eclipse/bpel/model/resource/BPELWriter.java
===================================================================
--- trunk/bpel/plugins/org.eclipse.bpel.model/src/org/eclipse/bpel/model/resource/BPELWriter.java 2011-02-04 20:06:00 UTC (rev 29021)
+++ trunk/bpel/plugins/org.eclipse.bpel.model/src/org/eclipse/bpel/model/resource/BPELWriter.java 2011-02-04 20:14:38 UTC (rev 29022)
@@ -2078,6 +2078,13 @@
onEventElement.setAttribute("messageType", qNameToString(onEvent,
onEvent.getMessageType().getQName()));
}
+ // https://bugs.eclipse.org/bugs/show_bug.cgi?id=336003
+ // https://issues.jboss.org/browse/JBIDE-8305
+ // "element" attribute was missing from original model
+ if (onEvent.getXSDElement() != null) {
+ onEventElement.setAttribute("element",
+ onEvent.getXSDElement().getQName());
+ }
if (onEvent.getCorrelationSets() != null) {
onEventElement.appendChild(correlationSets2XML(onEvent
.getCorrelationSets()));
13 years, 11 months
JBoss Tools SVN: r29021 - trunk/bpel/plugins/org.eclipse.bpel.ui.
by jbosstools-commits@lists.jboss.org
Author: bbrodt
Date: 2011-02-04 15:06:00 -0500 (Fri, 04 Feb 2011)
New Revision: 29021
Modified:
trunk/bpel/plugins/org.eclipse.bpel.ui/plugin.xml
Log:
https://issues.jboss.org/browse/JBIDE-8114
Modified: trunk/bpel/plugins/org.eclipse.bpel.ui/plugin.xml
===================================================================
--- trunk/bpel/plugins/org.eclipse.bpel.ui/plugin.xml 2011-02-04 19:57:34 UTC (rev 29020)
+++ trunk/bpel/plugins/org.eclipse.bpel.ui/plugin.xml 2011-02-04 20:06:00 UTC (rev 29021)
@@ -708,7 +708,7 @@
class="org.eclipse.bpel.ui.perspectives.BPELPerspectiveFactory"
icon="icons/obj20/bpel.png"
id="org.eclipse.bpel.ui.perspective"
- name="BPEL Perspective">
+ name="BPEL">
</perspective>
</extension>
</plugin>
13 years, 11 months
JBoss Tools SVN: r29020 - in trunk/bpel/plugins/org.eclipse.bpel.model/src/org/eclipse/bpel/model: impl and 1 other directories.
by jbosstools-commits@lists.jboss.org
Author: bbrodt
Date: 2011-02-04 14:57:34 -0500 (Fri, 04 Feb 2011)
New Revision: 29020
Modified:
trunk/bpel/plugins/org.eclipse.bpel.model/src/org/eclipse/bpel/model/BPELPackage.java
trunk/bpel/plugins/org.eclipse.bpel.model/src/org/eclipse/bpel/model/OnEvent.java
trunk/bpel/plugins/org.eclipse.bpel.model/src/org/eclipse/bpel/model/impl/BPELPackageImpl.java
trunk/bpel/plugins/org.eclipse.bpel.model/src/org/eclipse/bpel/model/impl/OnEventImpl.java
trunk/bpel/plugins/org.eclipse.bpel.model/src/org/eclipse/bpel/model/util/ReconciliationBPELReader.java
Log:
https://issues.jboss.org/browse/JBIDE-8305
Modified: trunk/bpel/plugins/org.eclipse.bpel.model/src/org/eclipse/bpel/model/BPELPackage.java
===================================================================
--- trunk/bpel/plugins/org.eclipse.bpel.model/src/org/eclipse/bpel/model/BPELPackage.java 2011-02-04 19:25:48 UTC (rev 29019)
+++ trunk/bpel/plugins/org.eclipse.bpel.model/src/org/eclipse/bpel/model/BPELPackage.java 2011-02-04 19:57:34 UTC (rev 29020)
@@ -4936,14 +4936,25 @@
*/
int ON_EVENT__MESSAGE_TYPE = EXTENSIBLE_ELEMENT_FEATURE_COUNT + 6;
+ // https://bugs.eclipse.org/bugs/show_bug.cgi?id=336003
+ // https://issues.jboss.org/browse/JBIDE-8305
+ // "element" attribute was missing from original model
/**
+ * The feature id for the '<em><b>XSD Element</b></em>' reference.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ * @ordered
+ */
+ int ON_EVENT__XSD_ELEMENT = EXTENSIBLE_ELEMENT_FEATURE_COUNT + 7;
+ /**
* The feature id for the '<em><b>Correlation Sets</b></em>' containment reference.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
* @ordered
*/
- int ON_EVENT__CORRELATION_SETS = EXTENSIBLE_ELEMENT_FEATURE_COUNT + 7;
+ int ON_EVENT__CORRELATION_SETS = EXTENSIBLE_ELEMENT_FEATURE_COUNT + 8;
/**
* The feature id for the '<em><b>From Parts</b></em>' containment reference.
@@ -4952,7 +4963,7 @@
* @generated
* @ordered
*/
- int ON_EVENT__FROM_PARTS = EXTENSIBLE_ELEMENT_FEATURE_COUNT + 8;
+ int ON_EVENT__FROM_PARTS = EXTENSIBLE_ELEMENT_FEATURE_COUNT + 9;
/**
* The feature id for the '<em><b>Message Exchange</b></em>' reference.
@@ -4961,7 +4972,7 @@
* @generated
* @ordered
*/
- int ON_EVENT__MESSAGE_EXCHANGE = EXTENSIBLE_ELEMENT_FEATURE_COUNT + 9;
+ int ON_EVENT__MESSAGE_EXCHANGE = EXTENSIBLE_ELEMENT_FEATURE_COUNT + 10;
/**
* The number of structural features of the '<em>On Event</em>' class.
@@ -4970,7 +4981,7 @@
* @generated
* @ordered
*/
- int ON_EVENT_FEATURE_COUNT = EXTENSIBLE_ELEMENT_FEATURE_COUNT + 10;
+ int ON_EVENT_FEATURE_COUNT = EXTENSIBLE_ELEMENT_FEATURE_COUNT + 11;
/**
* The feature id for the '<em><b>Documentation Element</b></em>' attribute.
Modified: trunk/bpel/plugins/org.eclipse.bpel.model/src/org/eclipse/bpel/model/OnEvent.java
===================================================================
--- trunk/bpel/plugins/org.eclipse.bpel.model/src/org/eclipse/bpel/model/OnEvent.java 2011-02-04 19:25:48 UTC (rev 29019)
+++ trunk/bpel/plugins/org.eclipse.bpel.model/src/org/eclipse/bpel/model/OnEvent.java 2011-02-04 19:57:34 UTC (rev 29020)
@@ -17,6 +17,7 @@
import org.eclipse.wst.wsdl.Message;
import org.eclipse.wst.wsdl.Operation;
import org.eclipse.wst.wsdl.PortType;
+import org.eclipse.xsd.XSDElementDeclaration;
/**
* <!-- begin-user-doc -->
@@ -223,6 +224,34 @@
*/
void setMessageType(Message value);
+ // https://bugs.eclipse.org/bugs/show_bug.cgi?id=336003
+ // https://issues.jboss.org/browse/JBIDE-8305
+ // "element" attribute was missing from original model
+ /**
+ * Returns the value of the '<em><b>XSD Element</b></em>' reference.
+ * <!-- begin-user-doc -->
+ * <p>
+ * If the meaning of the '<em>XSD Element</em>' reference isn't clear,
+ * there really should be more of a description here...
+ * </p>
+ * <!-- end-user-doc -->
+ * @return the value of the '<em>XSDElementDeclaration Type</em>' reference.
+ * @see #setXSDElement(XSDElementDeclaration)
+ * @see org.eclipse.bpel.model.BPELPackage#getOnEvent_XSDElement()
+ * @model required="true"
+ * @generated
+ */
+ XSDElementDeclaration getXSDElement();
+
+ /**
+ * Sets the value of the '{@link org.eclipse.bpel.model.OnEvent#getXSDElement <em>XSDElementDeclaration Type</em>}' reference.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @param value the new value of the '<em>XSDElementDeclaration Type</em>' reference.
+ * @see #getXSDElement()
+ * @generated
+ */
+ void setXSDElement(XSDElementDeclaration value);
/**
* Returns the value of the '<em><b>Correlation Sets</b></em>' containment reference.
* <!-- begin-user-doc -->
Modified: trunk/bpel/plugins/org.eclipse.bpel.model/src/org/eclipse/bpel/model/impl/BPELPackageImpl.java
===================================================================
--- trunk/bpel/plugins/org.eclipse.bpel.model/src/org/eclipse/bpel/model/impl/BPELPackageImpl.java 2011-02-04 19:25:48 UTC (rev 29019)
+++ trunk/bpel/plugins/org.eclipse.bpel.model/src/org/eclipse/bpel/model/impl/BPELPackageImpl.java 2011-02-04 19:57:34 UTC (rev 29020)
@@ -3448,6 +3448,10 @@
createEReference(onEventEClass, ON_EVENT__OPERATION);
createEReference(onEventEClass, ON_EVENT__PORT_TYPE);
createEReference(onEventEClass, ON_EVENT__MESSAGE_TYPE);
+ // https://bugs.eclipse.org/bugs/show_bug.cgi?id=336003
+ // https://issues.jboss.org/browse/JBIDE-8305
+ // "element" attribute was missing from original model
+ createEReference(onEventEClass, ON_EVENT__XSD_ELEMENT);
createEReference(onEventEClass, ON_EVENT__CORRELATION_SETS);
createEReference(onEventEClass, ON_EVENT__FROM_PARTS);
createEReference(onEventEClass, ON_EVENT__MESSAGE_EXCHANGE);
Modified: trunk/bpel/plugins/org.eclipse.bpel.model/src/org/eclipse/bpel/model/impl/OnEventImpl.java
===================================================================
--- trunk/bpel/plugins/org.eclipse.bpel.model/src/org/eclipse/bpel/model/impl/OnEventImpl.java 2011-02-04 19:25:48 UTC (rev 29019)
+++ trunk/bpel/plugins/org.eclipse.bpel.model/src/org/eclipse/bpel/model/impl/OnEventImpl.java 2011-02-04 19:57:34 UTC (rev 29020)
@@ -35,6 +35,7 @@
import org.eclipse.wst.wsdl.Message;
import org.eclipse.wst.wsdl.Operation;
import org.eclipse.wst.wsdl.PortType;
+import org.eclipse.xsd.XSDElementDeclaration;
/**
* <!-- begin-user-doc -->
@@ -128,6 +129,16 @@
* @ordered
*/
protected Message messageType;
+
+ /**
+ * The cached value of the '{@link #getXSDElement() <em>XSD Element</em>}' reference.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @see #getXSDElement()
+ * @generated
+ * @ordered
+ */
+ protected XSDElementDeclaration xsdElement;
/**
* The cached value of the '{@link #getCorrelationSets() <em>Correlation Sets</em>}' containment reference.
@@ -589,6 +600,59 @@
eNotify(new ENotificationImpl(this, Notification.SET,
BPELPackage.ON_EVENT__MESSAGE_TYPE, oldMessageType,
messageType));
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * https://bugs.eclipse.org/bugs/show_bug.cgi?id=336003
+ * https://issues.jboss.org/browse/JBIDE-8305
+ * "element" attribute was missing from original model
+ * <!-- end-user-doc -->
+ * @customized
+ */
+ public XSDElementDeclaration getXSDElement() {
+ Variable variable = getVariable();
+ if (variable != null && variable instanceof Variable) {
+ return (variable).getXSDElement();
+ }
+ if (xsdElement != null && xsdElement.eIsProxy()) {
+ XSDElementDeclaration oldXSDElement = xsdElement;
+ xsdElement = (XSDElementDeclaration) eResolveProxy((InternalEObject) xsdElement);
+ if (xsdElement != oldXSDElement) {
+ if (eNotificationRequired())
+ eNotify(new ENotificationImpl(this, Notification.RESOLVE,
+ BPELPackage.ON_EVENT__XSD_ELEMENT, oldXSDElement,
+ xsdElement));
+ }
+ }
+ return xsdElement;
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public XSDElementDeclaration basicGetXSDElement() {
+ return xsdElement;
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @customized
+ */
+ public void setXSDElement(XSDElementDeclaration newXSDElement) {
+ Variable variable = getVariable();
+ if (variable != null && variable instanceof Variable) {
+ (variable).setXSDElement(newXSDElement);
+ }
+ XSDElementDeclaration oldXSDElement = xsdElement;
+ xsdElement = newXSDElement;
+ if (eNotificationRequired())
+ eNotify(new ENotificationImpl(this, Notification.SET,
+ BPELPackage.ON_EVENT__XSD_ELEMENT, oldXSDElement,
+ xsdElement));
}
/**
@@ -809,6 +873,11 @@
if (resolve)
return getMessageType();
return basicGetMessageType();
+ case BPELPackage.ON_EVENT__XSD_ELEMENT:
+ // https://issues.jboss.org/browse/JBIDE-8305
+ if (resolve)
+ return getXSDElement();
+ return basicGetXSDElement();
case BPELPackage.ON_EVENT__CORRELATION_SETS:
return getCorrelationSets();
case BPELPackage.ON_EVENT__FROM_PARTS:
@@ -851,6 +920,10 @@
case BPELPackage.ON_EVENT__MESSAGE_TYPE:
setMessageType((Message) newValue);
return;
+ case BPELPackage.ON_EVENT__XSD_ELEMENT:
+ // https://issues.jboss.org/browse/JBIDE-8305
+ setXSDElement((XSDElementDeclaration) newValue);
+ return;
case BPELPackage.ON_EVENT__CORRELATION_SETS:
setCorrelationSets((CorrelationSets) newValue);
return;
@@ -892,6 +965,10 @@
return;
case BPELPackage.ON_EVENT__MESSAGE_TYPE:
setMessageType((Message) null);
+ return;
+ case BPELPackage.ON_EVENT__XSD_ELEMENT:
+ // https://issues.jboss.org/browse/JBIDE-8305
+ setXSDElement((XSDElementDeclaration) null);
return;
case BPELPackage.ON_EVENT__CORRELATION_SETS:
setCorrelationSets((CorrelationSets) null);
@@ -928,6 +1005,9 @@
return portType != null;
case BPELPackage.ON_EVENT__MESSAGE_TYPE:
return messageType != null;
+ case BPELPackage.ON_EVENT__XSD_ELEMENT:
+ // https://issues.jboss.org/browse/JBIDE-8305
+ return xsdElement != null;
case BPELPackage.ON_EVENT__CORRELATION_SETS:
return correlationSets != null;
case BPELPackage.ON_EVENT__FROM_PARTS:
Modified: trunk/bpel/plugins/org.eclipse.bpel.model/src/org/eclipse/bpel/model/util/ReconciliationBPELReader.java
===================================================================
--- trunk/bpel/plugins/org.eclipse.bpel.model/src/org/eclipse/bpel/model/util/ReconciliationBPELReader.java 2011-02-04 19:25:48 UTC (rev 29019)
+++ trunk/bpel/plugins/org.eclipse.bpel.model/src/org/eclipse/bpel/model/util/ReconciliationBPELReader.java 2011-02-04 19:57:34 UTC (rev 29020)
@@ -812,7 +812,21 @@
onEvent.setMessageType(null);
}
- // Set correlations
+ // https://bugs.eclipse.org/bugs/show_bug.cgi?id=336003
+ // https://issues.jboss.org/browse/JBIDE-8305
+ // "element" attribute was missing from original model
+ // Set xsd element
+ if (activityElement.hasAttribute("element")) {
+ QName qName = BPELUtils.createAttributeValue(activityElement,
+ "element");
+ XSDElementDeclaration element = new XSDElementDeclarationProxy(
+ getResource().getURI(), qName);
+ onEvent.setXSDElement(element);
+ } else {
+ onEvent.setXSDElement(null);
+ }
+
+ // Set correlations
Element correlationsElement = ReconciliationHelper
.getBPELChildElementByLocalName(activityElement, "correlations");
if (correlationsElement != null && onEvent.getCorrelations() == null) {
13 years, 11 months
JBoss Tools SVN: r29019 - trunk/bpel/plugins/org.eclipse.bpel.validator/src/org/eclipse/bpel/validator/rules.
by jbosstools-commits@lists.jboss.org
Author: bbrodt
Date: 2011-02-04 14:25:48 -0500 (Fri, 04 Feb 2011)
New Revision: 29019
Added:
trunk/bpel/plugins/org.eclipse.bpel.validator/src/org/eclipse/bpel/validator/rules/UnknownElementValidator.java
Modified:
trunk/bpel/plugins/org.eclipse.bpel.validator/src/org/eclipse/bpel/validator/rules/Factory.java
trunk/bpel/plugins/org.eclipse.bpel.validator/src/org/eclipse/bpel/validator/rules/messages.properties
Log:
https://issues.jboss.org/browse/JBIDE-6825
Handle unknown BPEL elements
Modified: trunk/bpel/plugins/org.eclipse.bpel.validator/src/org/eclipse/bpel/validator/rules/Factory.java
===================================================================
--- trunk/bpel/plugins/org.eclipse.bpel.validator/src/org/eclipse/bpel/validator/rules/Factory.java 2011-02-04 18:57:19 UTC (rev 29018)
+++ trunk/bpel/plugins/org.eclipse.bpel.validator/src/org/eclipse/bpel/validator/rules/Factory.java 2011-02-04 19:25:48 UTC (rev 29019)
@@ -47,13 +47,13 @@
public Validator create(QName qname) {
- String nsURI = qname.getNamespaceURI();
-
- if (nsURI.equals(IConstants.XMLNS_BPEL) || nsURI.equals(IConstants.XMLNS_BPEL20_OLD)) {
- return createValidator ( qname.getLocalPart() );
- }
-
- return null;
+ // Bugzilla 324165
+ // https://issues.jboss.org/browse/JBIDE-6825
+ // handle unknown BPEL elements
+ Validator validator = createValidator ( qname.getLocalPart() );
+ if (validator==null)
+ validator = new UnknownElementValidator();
+ return validator;
}
@SuppressWarnings("nls")
Added: trunk/bpel/plugins/org.eclipse.bpel.validator/src/org/eclipse/bpel/validator/rules/UnknownElementValidator.java
===================================================================
--- trunk/bpel/plugins/org.eclipse.bpel.validator/src/org/eclipse/bpel/validator/rules/UnknownElementValidator.java (rev 0)
+++ trunk/bpel/plugins/org.eclipse.bpel.validator/src/org/eclipse/bpel/validator/rules/UnknownElementValidator.java 2011-02-04 19:25:48 UTC (rev 29019)
@@ -0,0 +1,36 @@
+/*
+ * Copyright (c) 2010 JBoss, Inc. and others
+ * All rights reserved. This program and the accompanying materials
+ * are 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
+ */
+package org.eclipse.bpel.validator.rules;
+
+import org.eclipse.bpel.validator.model.IProblem;
+
+/*
+ * This validator handles unknown BPEL elements. Actually not a validator at all, just an error reporter.
+ *
+ * @see Bugzilla 324165
+ * @see https://issues.jboss.org/browse/JBIDE-6825
+ * @author Bob Brodt
+ * @date Aug 13, 2010
+ */
+public class UnknownElementValidator extends CValidator {
+
+ @Override
+ protected void start () {
+ super.start();
+
+ IProblem problem = createError();
+
+ problem.fill("BPELC_UNKNOWN__ELEMENT",
+ toString(mNode.nodeName()),
+ mNode.nodeName().getNamespaceURI());
+ }
+
+ @Override
+ public void checkParentNode () {
+ }
+}
Modified: trunk/bpel/plugins/org.eclipse.bpel.validator/src/org/eclipse/bpel/validator/rules/messages.properties
===================================================================
--- trunk/bpel/plugins/org.eclipse.bpel.validator/src/org/eclipse/bpel/validator/rules/messages.properties 2011-02-04 18:57:19 UTC (rev 29018)
+++ trunk/bpel/plugins/org.eclipse.bpel.validator/src/org/eclipse/bpel/validator/rules/messages.properties 2011-02-04 19:25:48 UTC (rev 29019)
@@ -922,3 +922,15 @@
BPELC_MISSING_EXTENSION__ACTIVITY.summary = Extension Activity element <{0}> must have exactly one child element.
BPELC_MISSING_EXTENSION__ACTIVITY = Extension Activity element <{0} name="{1}"> must have exactly one child element.
BPELC_MISSING_EXTENSION__ACTIVITY.fix = Make sure the Extension Activity element <{0}> has exactly one child element that is supported by this implementation
+#
+# Bugzilla 324165
+# https://issues.jboss.org/browse/JBIDE-6825
+#
+# ------------- Unknown BPEL Element ---------------------
+# BPELC_UNKNOWN__ELEMENT
+# {0}: node
+# {1}: namespace URI
+#
+BPELC_UNKNOWN__ELEMENT.summary = BPEL element <{0}> is not supported.
+BPELC_UNKNOWN__ELEMENT = BPEL element <{0}> in namespace "{1}" is not supported by this implementation.
+BPELC_UNKNOWN__ELEMENT.fix = Remove the element <{0}> or contact the vendor to obtain the necessary plug-in(s)
13 years, 11 months
JBoss Tools SVN: r29018 - in trunk/bpel/plugins/org.eclipse.bpel.model/src/org/eclipse/bpel/model: util and 1 other directory.
by jbosstools-commits@lists.jboss.org
Author: bbrodt
Date: 2011-02-04 13:57:19 -0500 (Fri, 04 Feb 2011)
New Revision: 29018
Modified:
trunk/bpel/plugins/org.eclipse.bpel.model/src/org/eclipse/bpel/model/resource/BPELWriter.java
trunk/bpel/plugins/org.eclipse.bpel.model/src/org/eclipse/bpel/model/util/ElementPlacer.java
Log:
https://issues.jboss.org/browse/JBIDE-8246
Fix serialization problems with extensionActivities that have TEXT nodes.
See also https://bugs.eclipse.org/bugs/show_bug.cgi?id=335458
Modified: trunk/bpel/plugins/org.eclipse.bpel.model/src/org/eclipse/bpel/model/resource/BPELWriter.java
===================================================================
--- trunk/bpel/plugins/org.eclipse.bpel.model/src/org/eclipse/bpel/model/resource/BPELWriter.java 2011-02-04 18:36:48 UTC (rev 29017)
+++ trunk/bpel/plugins/org.eclipse.bpel.model/src/org/eclipse/bpel/model/resource/BPELWriter.java 2011-02-04 18:57:19 UTC (rev 29018)
@@ -1332,15 +1332,18 @@
QName qName = new QName(namespace, localName);
BPELActivitySerializer serializer = extensionRegistry
.getActivitySerializer(qName);
+ DocumentFragment fragment = null;
if (serializer != null) {
- DocumentFragment fragment = document.createDocumentFragment();
+ fragment = document.createDocumentFragment();
serializer.marshall(qName, activity, fragment, getProcess(), this);
- Element child = (Element) fragment.getFirstChild();
- activityElement.appendChild(child);
- // Standard attributes
- addStandardAttributes(child, activity);
- // Standard elements
- addStandardElements(child, activity);
+ // https://bugs.eclipse.org/bugs/show_bug.cgi?id=335458
+ // https://issues.jboss.org/browse/JBIDE-8246
+ // Only append Element nodes generated by the serializer
+ // XML beautification is handled by the ElementPlacer class
+ Element child = getFirstChildElement(fragment);
+ if (child!=null) {
+ activityElement.appendChild(child);
+ }
}
return activityElement;
@@ -1634,7 +1637,8 @@
serializer.marshall(ExtensibleElement.class, qname,
extensibilityElement, fragment, getProcess(),
extensionRegistry, this);
- Element child = (Element) fragment.getFirstChild();
+ // https://bugs.eclipse.org/bugs/show_bug.cgi?id=335458
+ Element child = getFirstChildElement(fragment);
return child;
} catch (WSDLException e) {
throw new WrappedException(e);
@@ -1648,7 +1652,9 @@
DocumentFragment fragment = document.createDocumentFragment();
serializer.marshall(value, fragment, getProcess(), serviceRef
.eContainer(), this);
- Element child = (Element) fragment.getFirstChild();
+ // https://bugs.eclipse.org/bugs/show_bug.cgi?id=335458
+ // https://issues.jboss.org/browse/JBIDE-8246
+ Element child = getFirstChildElement(fragment);
return child;
} else {
CDATASection cdata = BPELUtils.createCDATASection(document,
@@ -2363,12 +2369,15 @@
.marshall(ExtensibleElement.class, qname,
extensibilityElement, fragment, getProcess(),
extensionRegistry, this);
- return (Element) fragment.getFirstChild();
+ // https://bugs.eclipse.org/bugs/show_bug.cgi?id=335458
+ // https://issues.jboss.org/browse/JBIDE-8246
+ Element child = getFirstChildElement(fragment);
+ return child;
} catch (WSDLException e) {
throw new WrappedException(e);
}
}
-
+
protected Element createBPELElement(String tagName) {
String namespaceURI = null;
@@ -2467,4 +2476,17 @@
return addNewRootPrefix("ns", namespace) + ":" + qname.getLocalPart();
}
+ // https://bugs.eclipse.org/bugs/show_bug.cgi?id=335458
+ // https://issues.jboss.org/browse/JBIDE-8246
+ private Element getFirstChildElement(DocumentFragment fragment) {
+ // https://bugs.eclipse.org/bugs/show_bug.cgi?id=335458
+ // first child may be a TEXT Node (e.g. whitespace)
+ Node child = fragment.getFirstChild();
+ while (child != null && !(child instanceof Element)) {
+ child = child.getNextSibling();
+ }
+ if (child instanceof Element)
+ return (Element) child;
+ throw new IllegalArgumentException("Document Fragment does not contain any Elements");
+ }
}
Modified: trunk/bpel/plugins/org.eclipse.bpel.model/src/org/eclipse/bpel/model/util/ElementPlacer.java
===================================================================
--- trunk/bpel/plugins/org.eclipse.bpel.model/src/org/eclipse/bpel/model/util/ElementPlacer.java 2011-02-04 18:36:48 UTC (rev 29017)
+++ trunk/bpel/plugins/org.eclipse.bpel.model/src/org/eclipse/bpel/model/util/ElementPlacer.java 2011-02-04 18:57:19 UTC (rev 29018)
@@ -214,23 +214,37 @@
// DO:
// Format children of the newChild.
+ // https://bugs.eclipse.org/bugs/show_bug.cgi?id=335458
+ // traverse the child's descendants also, inserting the
+ // proper indentation for each
+ StringBuffer childIndent = new StringBuffer(indent);
+ Node nextNewChild = newChild;
Node innerChild = newChild.getFirstChild();
- if (innerChild != null) {
+ while (innerChild != null) {
// add "\n" + indent before every child
- while (innerChild != null) {
- if (innerChild.getNodeType() == Node.TEXT_NODE) {
+ Node nextInnerChild = innerChild;
+ while (nextInnerChild != null) {
+ boolean textNodeIsWhitespaceOnly = false;
+ if (nextInnerChild.getNodeType() == Node.TEXT_NODE) {
+ String content = nextInnerChild.getTextContent();
+ textNodeIsWhitespaceOnly = (content==null || content.trim().isEmpty());
+ }
+ if (textNodeIsWhitespaceOnly) {
// remove an old indentation
- newChild.removeChild(innerChild);
+ nextNewChild.removeChild(nextInnerChild);
} else {
- newChild.insertBefore(newChild.getOwnerDocument()
- .createTextNode("\n" + indent + " "),
- innerChild);
+ nextNewChild.insertBefore(nextNewChild.getOwnerDocument()
+ .createTextNode("\n" + childIndent + " "),
+ nextInnerChild);
}
- innerChild = innerChild.getNextSibling();
+ nextInnerChild = nextInnerChild.getNextSibling();
}
// add "\n" after the last child
- newChild.appendChild(newChild.getOwnerDocument()
- .createTextNode("\n" + indent + " "));
+ nextNewChild.appendChild(nextNewChild.getOwnerDocument()
+ .createTextNode("\n" + childIndent + " "));
+ childIndent.append(" ");
+ nextNewChild = innerChild;
+ innerChild = innerChild.getFirstChild();
}
if (referenceChild != null) {
13 years, 11 months
JBoss Tools SVN: r29017 - trunk/bpel/plugins/org.eclipse.bpel.ui/src/org/eclipse/bpel/ui.
by jbosstools-commits@lists.jboss.org
Author: bbrodt
Date: 2011-02-04 13:36:48 -0500 (Fri, 04 Feb 2011)
New Revision: 29017
Modified:
trunk/bpel/plugins/org.eclipse.bpel.ui/src/org/eclipse/bpel/ui/messages.properties
Log:
add missing text for WSIL preference page description
Modified: trunk/bpel/plugins/org.eclipse.bpel.ui/src/org/eclipse/bpel/ui/messages.properties
===================================================================
--- trunk/bpel/plugins/org.eclipse.bpel.ui/src/org/eclipse/bpel/ui/messages.properties 2011-02-04 18:36:04 UTC (rev 29016)
+++ trunk/bpel/plugins/org.eclipse.bpel.ui/src/org/eclipse/bpel/ui/messages.properties 2011-02-04 18:36:48 UTC (rev 29017)
@@ -129,7 +129,10 @@
BPELPreferencePage_WSIL_EnterLocation = <enter location>
#
# This has \n for a reason. The wrapping in the widget works, but not as expected.
-BPELPreferencePage_WSIL_Description =
+BPELPreferencePage_WSIL_Description = \
+The document above contains links to other WSIL documents shown below.\n\
+You can add or remove WSIL links to/from the above document.\n\
+The result will be shown in the WSIL browser of the editor.
#
BPELUIRegistry_Expression_language_editors_must_provide_expressionLanguage_and_class__8=Expression language editors must provide expressionLanguage and class.
BPELUtil__unknown_URI__54=<unknown URI>
13 years, 11 months