summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorRainer Pielmann2012-07-11 06:59:49 (EDT)
committer Manik Kishore2012-07-19 02:19:42 (EDT)
commite09b681bdd47527efba33296f70c18f5f2014f6f (patch)
treeb6185b02822d1e1dbaa3a9b6b3939bf488e393f8
parent56d236911ec684a859598708cabb6ba024b3dbb6 (diff)
downloadorg.eclipse.stardust.ui.web-e09b681bdd47527efba33296f70c18f5f2014f6f.zip
org.eclipse.stardust.ui.web-e09b681bdd47527efba33296f70c18f5f2014f6f.tar.gz
org.eclipse.stardust.ui.web-e09b681bdd47527efba33296f70c18f5f2014f6f.tar.bz2
CRNT-25134 Pepper: Cross-Model Support: Refactor Model Service
git-svn-id: http://emeafrazerg/svn/ipp/product/trunk/stardust/ui.web@57578 8100b5e0-4d52-466c-ae9c-bdeccbdeaf6b
-rw-r--r--web-modeler/src/main/java/org/eclipse/stardust/ui/web/modeler/service/ModelService.java18
1 files changed, 8 insertions, 10 deletions
diff --git a/web-modeler/src/main/java/org/eclipse/stardust/ui/web/modeler/service/ModelService.java b/web-modeler/src/main/java/org/eclipse/stardust/ui/web/modeler/service/ModelService.java
index 05b8775..b9766b6 100644
--- a/web-modeler/src/main/java/org/eclipse/stardust/ui/web/modeler/service/ModelService.java
+++ b/web-modeler/src/main/java/org/eclipse/stardust/ui/web/modeler/service/ModelService.java
@@ -2458,22 +2458,18 @@ public class ModelService {
ModelType model = getModelManagementStrategy().getModels().get(modelId);
JsonObject structuredDataTypeJson = commandJson
.getAsJsonObject(NEW_OBJECT_PROPERTY);
+
+ String typeId = extractString(structuredDataTypeJson,
+ ModelerConstants.ID_PROPERTY);
+ String typeName = extractString(structuredDataTypeJson,
+ ModelerConstants.NAME_PROPERTY);
synchronized (model) {
// EditingSession editSession = model.getEditSession();
//
// editSession.beginEdit();
- TypeDeclarationType structuredDataType = XpdlFactory.eINSTANCE
- .createTypeDeclarationType();
-
- structuredDataType.setId(extractString(structuredDataTypeJson,
- ModelerConstants.ID_PROPERTY));
- structuredDataType.setName(extractString(structuredDataTypeJson,
- ModelerConstants.NAME_PROPERTY));
-
- model.getTypeDeclarations().getTypeDeclaration()
- .add(structuredDataType);
+ MBFacade.createTypeDeclaration(model, typeId, typeName);
structuredDataTypeJson
.addProperty(MODEL_ID_PROPERTY, model.getId());
@@ -2491,6 +2487,8 @@ public class ModelService {
}
}
+
+
/**
*
* @param modelId