summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorRainer Pielmann2012-09-05 05:25:40 (EDT)
committerStephan Born2012-09-10 08:46:52 (EDT)
commit41cb3bda875359a93676d3d3682c6ff985392061 (patch)
tree39e6deb8ae673a7e9ce31f22de57a99c3d55032c
parentb68508d09d084acfb58fe2fda212f41fa6cabb8d (diff)
downloadorg.eclipse.stardust.ide-41cb3bda875359a93676d3d3682c6ff985392061.zip
org.eclipse.stardust.ide-41cb3bda875359a93676d3d3682c6ff985392061.tar.gz
org.eclipse.stardust.ide-41cb3bda875359a93676d3d3682c6ff985392061.tar.bz2
Added methods for updating StructuredData and Primitives.
git-svn-id: http://emeafrazerg/svn/ipp/product/trunk/stardust/ide@58928 8100b5e0-4d52-466c-ae9c-bdeccbdeaf6b
-rw-r--r--model/org.eclipse.stardust.model.xpdl.builder/src/main/java/org/eclipse/stardust/model/xpdl/builder/utils/ModelBuilderFacade.java37
1 files changed, 22 insertions, 15 deletions
diff --git a/model/org.eclipse.stardust.model.xpdl.builder/src/main/java/org/eclipse/stardust/model/xpdl/builder/utils/ModelBuilderFacade.java b/model/org.eclipse.stardust.model.xpdl.builder/src/main/java/org/eclipse/stardust/model/xpdl/builder/utils/ModelBuilderFacade.java
index 16e5ce4..06ad68d 100644
--- a/model/org.eclipse.stardust.model.xpdl.builder/src/main/java/org/eclipse/stardust/model/xpdl/builder/utils/ModelBuilderFacade.java
+++ b/model/org.eclipse.stardust.model.xpdl.builder/src/main/java/org/eclipse/stardust/model/xpdl/builder/utils/ModelBuilderFacade.java
@@ -433,25 +433,32 @@ public class ModelBuilderFacade
String declarationID = stripFullId(typeFullID);
TypeDeclarationType typeDeclaration = this.findTypeDeclaration(typeFullID);
- String fileConnectionId = WebModelerConnectionManager.createFileConnection(model, typeDeclarationModel);
+ if(sourceModelID.equals(model.getId()))
+ {
+ AttributeUtil.setAttribute(data, StructuredDataConstants.TYPE_DECLARATION_ATT,
+ declarationID);
+ } else {
+ String fileConnectionId = WebModelerConnectionManager.createFileConnection(model, typeDeclarationModel);
- String bundleId = CarnotConstants.DIAGRAM_PLUGIN_ID;
- URI uri = URI.createURI("cnx://" + fileConnectionId + "/");
+ String bundleId = CarnotConstants.DIAGRAM_PLUGIN_ID;
+ URI uri = URI.createURI("cnx://" + fileConnectionId + "/");
- ReplaceEObjectDescriptor descriptor = new ReplaceEObjectDescriptor(MergeUtils.createQualifiedUri(uri, typeDeclaration, true), data,
- typeDeclaration.getId(), typeDeclaration.getName(), typeDeclaration.getDescription(),
- bundleId, null);
+ ReplaceEObjectDescriptor descriptor = new ReplaceEObjectDescriptor(MergeUtils.createQualifiedUri(uri, typeDeclaration, true), data,
+ typeDeclaration.getId(), typeDeclaration.getName(), typeDeclaration.getDescription(),
+ bundleId, null);
- AttributeUtil.setAttribute(data, "carnot:engine:path:separator", StructuredDataConstants.ACCESS_PATH_SEGMENT_SEPARATOR); //$NON-NLS-1$
- AttributeUtil.setBooleanAttribute(data, "carnot:engine:data:bidirectional", true); //$NON-NLS-1$
- AttributeUtil.setAttribute(data, IConnectionManager.URI_ATTRIBUTE_NAME, descriptor.getURI().toString());
- ExternalReferenceType reference = XpdlFactory.eINSTANCE.createExternalReferenceType();
- if (typeDeclarationModel != null)
- {
- reference.setLocation(ImportUtils.getPackageRef(descriptor, model, typeDeclarationModel).getId());
+ AttributeUtil.setAttribute(data, "carnot:engine:path:separator", StructuredDataConstants.ACCESS_PATH_SEGMENT_SEPARATOR); //$NON-NLS-1$
+ AttributeUtil.setBooleanAttribute(data, "carnot:engine:data:bidirectional", true); //$NON-NLS-1$
+ AttributeUtil.setAttribute(data, IConnectionManager.URI_ATTRIBUTE_NAME, descriptor.getURI().toString());
+ ExternalReferenceType reference = XpdlFactory.eINSTANCE.createExternalReferenceType();
+ if (typeDeclarationModel != null)
+ {
+ reference.setLocation(ImportUtils.getPackageRef(descriptor, model, typeDeclarationModel).getId());
+ }
+ reference.setXref(declarationID);
+ data.setExternalReference(reference);
}
- reference.setXref(declarationID);
- data.setExternalReference(reference);
+
}
/**