Prevent duplicate error messages on decorators
diff --git a/org.eclipse.bpmn2.modeler.core/src/org/eclipse/bpmn2/modeler/core/validation/BPMN2ValidationStatusLoader.java b/org.eclipse.bpmn2.modeler.core/src/org/eclipse/bpmn2/modeler/core/validation/BPMN2ValidationStatusLoader.java
index 057f120..2e2178f 100644
--- a/org.eclipse.bpmn2.modeler.core/src/org/eclipse/bpmn2/modeler/core/validation/BPMN2ValidationStatusLoader.java
+++ b/org.eclipse.bpmn2.modeler.core/src/org/eclipse/bpmn2/modeler/core/validation/BPMN2ValidationStatusLoader.java
@@ -60,22 +60,24 @@
IStatus status = convertMarker(marker, markedObject);
// also add an adapter to each affected EObject in the result locus
- if (status instanceof ConstraintStatus) {
- ConstraintStatus cs = (ConstraintStatus) status;
- for (EObject result : cs.getResultLocus()) {
- // CAUTION: the result locus WILL contain references to object
- // features (EStructuralFeatures) that identify the feature in
- // error for the Property Sheets. We don't want to add a validation
- // status adapter to these EObjects.
- EPackage pkg = result.eClass().getEPackage();
- if (pkg != EcorePackage.eINSTANCE) {
- ValidationStatusAdapter sa = (ValidationStatusAdapter) EcoreUtil.getRegisteredAdapter(
- result, ValidationStatusAdapter.class);
- sa.addValidationStatus(status);
- touched.add(result);
- }
- }
- }
+ // TODO: do we need this? it causes duplicate messages to be created for each marker
+ // better to have the constraint handler create additional error messages as needed.
+// if (status instanceof ConstraintStatus) {
+// ConstraintStatus cs = (ConstraintStatus) status;
+// for (EObject result : cs.getResultLocus()) {
+// // CAUTION: the result locus WILL contain references to object
+// // features (EStructuralFeatures) that identify the feature in
+// // error for the Property Sheets. We don't want to add a validation
+// // status adapter to these EObjects.
+// EPackage pkg = result.eClass().getEPackage();
+// if (pkg != EcorePackage.eINSTANCE) {
+// ValidationStatusAdapter sa = (ValidationStatusAdapter) EcoreUtil.getRegisteredAdapter(
+// result, ValidationStatusAdapter.class);
+// sa.addValidationStatus(status);
+// touched.add(result);
+// }
+// }
+// }
statusAdapter.addValidationStatus(status);
touched.add(markedObject);
diff --git a/org.eclipse.bpmn2.modeler.runtime.jboss.jbpm5/src/org/eclipse/bpmn2/modeler/runtime/jboss/jbpm5/validation/ServletUtil.java b/org.eclipse.bpmn2.modeler.runtime.jboss.jbpm5/src/org/eclipse/bpmn2/modeler/runtime/jboss/jbpm5/validation/ServletUtil.java
index 798ee46..d6bddc8 100644
--- a/org.eclipse.bpmn2.modeler.runtime.jboss.jbpm5/src/org/eclipse/bpmn2/modeler/runtime/jboss/jbpm5/validation/ServletUtil.java
+++ b/org.eclipse.bpmn2.modeler.runtime.jboss.jbpm5/src/org/eclipse/bpmn2/modeler/runtime/jboss/jbpm5/validation/ServletUtil.java
@@ -1,5 +1,6 @@
package org.eclipse.bpmn2.modeler.runtime.jboss.jbpm5.validation;
+import java.util.ArrayList;
import java.util.List;
public class ServletUtil {
@@ -14,7 +15,7 @@
public static List<String> getAllProcessesInPackage(String packageName, IDiagramProfile profile) {
// TODO Auto-generated method stub
- return null;
+ return new ArrayList<String>();
}
public static String getProcessSourceContent(String packageName, String p, IDiagramProfile profile) {