summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorRainer Pielmann2012-08-29 03:48:01 (EDT)
committer Stephan Born2012-08-29 03:48:01 (EDT)
commit4d95e9cf5e21814b0d9ff3557d2540a67f678870 (patch)
tree1061b8df5f0af8b492e5ae816674572cbbdfb716
parent011035e6a1b1fd4b941ccf57bfb8d288c361307e (diff)
downloadorg.eclipse.stardust.ui.web-4d95e9cf5e21814b0d9ff3557d2540a67f678870.zip
org.eclipse.stardust.ui.web-4d95e9cf5e21814b0d9ff3557d2540a67f678870.tar.gz
org.eclipse.stardust.ui.web-4d95e9cf5e21814b0d9ff3557d2540a67f678870.tar.bz2
CRNT-25964 Pepper: Delete option is not working for Activity.
git-svn-id: http://emeafrazerg/svn/ipp/product/trunk/stardust/ui.web@58750 8100b5e0-4d52-466c-ae9c-bdeccbdeaf6b
-rw-r--r--web-modeler/src/main/java/org/eclipse/stardust/ui/web/modeler/marshaling/ModelElementMarshaller.java79
1 files changed, 41 insertions, 38 deletions
diff --git a/web-modeler/src/main/java/org/eclipse/stardust/ui/web/modeler/marshaling/ModelElementMarshaller.java b/web-modeler/src/main/java/org/eclipse/stardust/ui/web/modeler/marshaling/ModelElementMarshaller.java
index 0058bb2..767d09e 100644
--- a/web-modeler/src/main/java/org/eclipse/stardust/ui/web/modeler/marshaling/ModelElementMarshaller.java
+++ b/web-modeler/src/main/java/org/eclipse/stardust/ui/web/modeler/marshaling/ModelElementMarshaller.java
@@ -7,11 +7,7 @@ import java.util.List;
import org.eclipse.emf.common.util.EList;
import org.eclipse.emf.ecore.EObject;
-import org.w3c.dom.Node;
-
-import com.google.gson.JsonArray;
-import com.google.gson.JsonObject;
-
+import org.eclipse.emf.ecore.change.ChangeDescription;
import org.eclipse.stardust.common.StringUtils;
import org.eclipse.stardust.engine.api.model.PredefinedConstants;
import org.eclipse.stardust.engine.core.struct.StructuredDataConstants;
@@ -58,10 +54,13 @@ import org.eclipse.stardust.model.xpdl.carnot.util.CarnotConstants;
import org.eclipse.stardust.model.xpdl.carnot.util.ModelUtils;
import org.eclipse.stardust.model.xpdl.util.IConnectionManager;
import org.eclipse.stardust.model.xpdl.xpdl2.FormalParameterType;
-import org.eclipse.stardust.model.xpdl.xpdl2.ModeType;
import org.eclipse.stardust.model.xpdl.xpdl2.SchemaTypeType;
import org.eclipse.stardust.model.xpdl.xpdl2.TypeDeclarationType;
import org.eclipse.stardust.modeling.repository.common.descriptors.EObjectDescriptor;
+import org.w3c.dom.Node;
+
+import com.google.gson.JsonArray;
+import com.google.gson.JsonObject;
public abstract class ModelElementMarshaller
{
@@ -565,40 +564,44 @@ public abstract class ModelElementMarshaller
for (String context : contexts)
{
- for (AccessPointType accessPoint : ActivityUtil.getAccessPoints(activity,
- true, context))
+ //Activity has no model as parent --> it has been deleted from the model
+ if (!(activity.eContainer() instanceof ChangeDescription))
{
- System.out.println(accessPoint);
-
- JsonObject accessPointJson = new JsonObject();
-
- accessPointsJson.add(accessPoint.getId(), accessPointJson);
- accessPointJson.addProperty(ModelerConstants.ID_PROPERTY,
- accessPoint.getId());
- accessPointJson.addProperty(ModelerConstants.NAME_PROPERTY,
- accessPoint.getName());
- accessPointJson.addProperty(ModelerConstants.DIRECTION_PROPERTY,
- accessPoint.getDirection().getLiteral());
- accessPointJson.addProperty(ModelerConstants.CONTEXT_PROPERTY, context);
- loadDescription(accessPointJson, accessPoint);
- }
+ for (AccessPointType accessPoint : ActivityUtil.getAccessPoints(activity,
+ true, context))
+ {
+ System.out.println(accessPoint);
+
+ JsonObject accessPointJson = new JsonObject();
+
+ accessPointsJson.add(accessPoint.getId(), accessPointJson);
+ accessPointJson.addProperty(ModelerConstants.ID_PROPERTY,
+ accessPoint.getId());
+ accessPointJson.addProperty(ModelerConstants.NAME_PROPERTY,
+ accessPoint.getName());
+ accessPointJson.addProperty(ModelerConstants.DIRECTION_PROPERTY,
+ accessPoint.getDirection().getLiteral());
+ accessPointJson.addProperty(ModelerConstants.CONTEXT_PROPERTY, context);
+ loadDescription(accessPointJson, accessPoint);
+ }
- for (AccessPointType accessPoint : ActivityUtil.getAccessPoints(activity,
- false, context))
- {
- System.out.println(accessPoint);
-
- JsonObject accessPointJson = new JsonObject();
-
- accessPointsJson.add(accessPoint.getId(), accessPointJson);
- accessPointJson.addProperty(ModelerConstants.ID_PROPERTY,
- accessPoint.getId());
- accessPointJson.addProperty(ModelerConstants.NAME_PROPERTY,
- accessPoint.getName());
- accessPointJson.addProperty(ModelerConstants.DIRECTION_PROPERTY,
- accessPoint.getDirection().getLiteral());
- accessPointJson.addProperty(ModelerConstants.CONTEXT_PROPERTY, context);
- loadDescription(accessPointJson, accessPoint);
+ for (AccessPointType accessPoint : ActivityUtil.getAccessPoints(activity,
+ false, context))
+ {
+ System.out.println(accessPoint);
+
+ JsonObject accessPointJson = new JsonObject();
+
+ accessPointsJson.add(accessPoint.getId(), accessPointJson);
+ accessPointJson.addProperty(ModelerConstants.ID_PROPERTY,
+ accessPoint.getId());
+ accessPointJson.addProperty(ModelerConstants.NAME_PROPERTY,
+ accessPoint.getName());
+ accessPointJson.addProperty(ModelerConstants.DIRECTION_PROPERTY,
+ accessPoint.getDirection().getLiteral());
+ accessPointJson.addProperty(ModelerConstants.CONTEXT_PROPERTY, context);
+ loadDescription(accessPointJson, accessPoint);
+ }
}
}