summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorRainer Pielmann2013-02-11 08:47:18 (EST)
committerSven Rottstock2013-02-11 08:47:18 (EST)
commit16e4b0488c70e2fd1849b492379f158f91bc7d12 (patch)
treecc5ddc6a4fdd887b0fc545295822db41f2055186
parent655766776ee16a36fd3c97aea486c11ad42f6e82 (diff)
downloadorg.eclipse.stardust.ide-16e4b0488c70e2fd1849b492379f158f91bc7d12.zip
org.eclipse.stardust.ide-16e4b0488c70e2fd1849b492379f158f91bc7d12.tar.gz
org.eclipse.stardust.ide-16e4b0488c70e2fd1849b492379f158f91bc7d12.tar.bz2
JiraID: CRNT-27807
Web based modeler: DnD of external data moves the data instead of creating a reference (if changes are in-memory) git-svn-id: http://emeafrazerg/svn/ipp/product/trunk/stardust/ide@62900 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.java211
1 files changed, 108 insertions, 103 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 4cd016b..ee810da 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
@@ -151,7 +151,7 @@ import org.eclipse.stardust.modeling.repository.common.util.ImportUtils;
public class ModelBuilderFacade
{
- private static final String TIMESTAMP_TYPE = "Timestamp"; //$NON-NLS-1$
+ private static final String TIMESTAMP_TYPE = "Timestamp"; //$NON-NLS-1$
private static final CarnotWorkflowModelPackage PKG_CWM = CarnotWorkflowModelPackage.eINSTANCE;
private ModelManagementStrategy modelManagementStrategy;
@@ -173,7 +173,7 @@ public class ModelBuilderFacade
/**
* Sets the team leader for an organization.
- *
+ *
* @param organization
* @param role
* @return
@@ -210,7 +210,7 @@ public class ModelBuilderFacade
/**
* Adds a participant to an organization.
- *
+ *
* @param organization
* @param participant
* @return
@@ -225,7 +225,7 @@ public class ModelBuilderFacade
/**
* Returns a list of organizations a participants belongs to.
- *
+ *
* @param model
* @param participant
* @return list of organizations
@@ -254,14 +254,14 @@ public class ModelBuilderFacade
/**
* Created a type declaration.
- *
+ *
* @param model
* model to create the type declaration in
* @param typeID
* id of the type
* @param typeName
* name of the type
- *
+ *
* @return type declaration created
*/
public TypeDeclarationType createTypeDeclaration(ModelType model, String typeID,
@@ -559,7 +559,7 @@ public class ModelBuilderFacade
/**
* Created a data of type <b>Document</b>.
- *
+ *
* @param model
* model to create the document data in
* @param dataID
@@ -568,7 +568,7 @@ public class ModelBuilderFacade
* name of the data
* @param typeDeclarationID
* id of the type declaration assigned to the document
- *
+ *
* @return document data created
*/
public DataType createDocumentData(ModelType model, String dataID, String dataName,
@@ -600,11 +600,11 @@ public class ModelBuilderFacade
/**
* Created a data of type <b>Structured Type</b>.
- *
+ *
* <p>
* The <i>typeFullID</i> id is provided as <b>ModelID:TypedeclarationID</b>.
* </p>
- *
+ *
* @param model
* model to create the document data in
* @param dataID
@@ -613,7 +613,7 @@ public class ModelBuilderFacade
* name of the data
* @param typeFullID
* full qualified id of the type declaration assigned to the document
- *
+ *
* @return structured data created
*/
public DataType createStructuredData(ModelType model, String dataID, String dataName,
@@ -654,12 +654,12 @@ public class ModelBuilderFacade
/**
* Update the type of a primitive data.
- *
+ *
* @param data
* the primitive data to update
* @param primitiveTypeID
* the id of the primitive type to assign
- *
+ *
* @return
*/
public void updatePrimitiveData(DataType data, String primitiveTypeID)
@@ -670,16 +670,16 @@ public class ModelBuilderFacade
/**
* Update the type declaration a structured data refers to.
- *
+ *
* <p>
* The <i>typeFullID</i> id is provided as <b>ModelID:TypedeclarationID</b>.
* </p>
- *
+ *
* @param data
* the structured data to update
* @param typeFullID
* full qualified id of the type declaration to assign to the data
- *
+ *
* @return
*/
public void updateStructuredDataType(DataType data, String typeFullID)
@@ -784,7 +784,7 @@ public class ModelBuilderFacade
/**
* Created a primitive data.
- *
+ *
* <p>
* As <b>primitiveTypeID</b> might be set:
* </p>
@@ -797,7 +797,7 @@ public class ModelBuilderFacade
* ModelerConstants.DECIMAL_PRIMITIVE_DATA_TYPE</li>
* <ul>
* </ul>
- *
+ *
* @param model
* model to create the data in
* @param dataID
@@ -806,7 +806,7 @@ public class ModelBuilderFacade
* name of the data
* @param primitiveTypeID
* id of the data
- *
+ *
* @return primitive data created
*/
public DataType createPrimitiveData(ModelType model, String dataID, String dataName,
@@ -851,16 +851,16 @@ public class ModelBuilderFacade
* differs from the model to import the data in, then a file connection is established
* and a reference is created. If the data exists locally in the model this is not
* necessary.
- *
+ *
* <p>
* The <i>dataFullID</i> id provided as <b>ModelID:DataID</b>.
* </p>
- *
+ *
* @param model
* model to import a data in
* @param dataFullID
* full qualified id of the data to be imported
- *
+ *
* @return local or referenced data
*/
public DataType importData(ModelType model, String dataFullID)
@@ -892,12 +892,13 @@ public class ModelBuilderFacade
ModelType loadModel = getModelManagementStrategy().loadModel(
dataModelId + ".xpdl");
- DataType dataCopy = findData(loadModel, stripFullId(dataFullID));
- if (dataCopy == null)
- {
- ElementCopier copier = new ElementCopier(loadModel, null);
+ //DataType dataCopy = findData(loadModel, stripFullId(dataFullID));
+ DataType dataCopy = findData(dataModel, stripFullId(dataFullID));
+ //if (dataCopy == null)
+ //{
+ ElementCopier copier = new ElementCopier(dataModel, null);
dataCopy = (DataType) copier.copy(data);
- }
+ //}
ReplaceModelElementDescriptor descriptor = new ReplaceModelElementDescriptor(
uri, dataCopy, bundleId, null, true);
@@ -910,11 +911,11 @@ public class ModelBuilderFacade
/**
* Creates lane in a diagram
- *
+ *
* <p>
* The <i>participantFullID</i> id is provided as <b>ModelID:ParticipantID</b>.
* </p>
- *
+ *
* <p>
* As <b>orientation</b> might be set:
* </p>
@@ -924,7 +925,7 @@ public class ModelBuilderFacade
* ModelerConstants.DIAGRAM_FLOW_ORIENTATION_VERTICAL</li>
* <ul>
* </ul>
- *
+ *
* @param model
* model to create the lane in
* @param processDefinition
@@ -1019,14 +1020,16 @@ public class ModelBuilderFacade
ModelType loadModel = getModelManagementStrategy().loadModel(
participantModelID + ".xpdl");
- IModelParticipant participantCopy = findParticipant(loadModel,
- stripFullId(participantFullID));
-
- if (participantCopy == null)
- {
- ElementCopier copier = new ElementCopier(loadModel, null);
+ /*IModelParticipant participantCopy = findParticipant(loadModel,
+ stripFullId(participantFullID));*/
+ IModelParticipant participantCopy = findParticipant(participantModel,
+ stripFullId(participantFullID));
+
+ //if (participantCopy == null)
+ //{
+ ElementCopier copier = new ElementCopier(participantModel, null);
participantCopy = (IModelParticipant) copier.copy(modelParticipant);
- }
+ //}
ReplaceModelElementDescriptor descriptor = new ReplaceModelElementDescriptor(
uri, participantCopy, bundleId, null, true);
@@ -1043,7 +1046,7 @@ public class ModelBuilderFacade
/**
* Create an activity diagram symbol
- *
+ *
* @param model
* model to create the symbol in
* @param activity
@@ -1086,7 +1089,7 @@ public class ModelBuilderFacade
/**
* Create Annotation Symbol
- *
+ *
* @param model
* @param processDefinition
* @param parentLaneID
@@ -1149,7 +1152,7 @@ public class ModelBuilderFacade
/**
* Create a data diagram symbol
- *
+ *
* @param model
* model to create the symbol in
* @param data
@@ -1194,7 +1197,7 @@ public class ModelBuilderFacade
/**
* Creates a role.
- *
+ *
* @param model
* The model to create the role in.
* @param roleID
@@ -1226,7 +1229,7 @@ public class ModelBuilderFacade
/**
* Creates an organization.
- *
+ *
* @param model
* The model to create the organization in.
* @param orgID
@@ -1244,7 +1247,7 @@ public class ModelBuilderFacade
/**
* Creates an application.
- *
+ *
* <p>
* As <b>applicationTypeID</b> might be set:
* </p>
@@ -1258,7 +1261,7 @@ public class ModelBuilderFacade
* ModelerConstants.EXTERNAL_WEB_APP_CONTEXT_TYPE_KEY</li>
* <ul>
* </ul>
- *
+ *
* @param model
* model to create the application in.
* @param applicationID
@@ -1299,7 +1302,7 @@ public class ModelBuilderFacade
/**
* Creates an activity.
- *
+ *
* <p>
* As <b>activityTypeID</b> might be set:
* </p>
@@ -1309,7 +1312,7 @@ public class ModelBuilderFacade
* <li>ModelerConstants.SUBPROCESS_ACTIVITY</li>
* <ul>
* </ul>
- *
+ *
* <p>
* The <b>xxxFullID</b> are provided like that:
* </p>
@@ -1320,7 +1323,7 @@ public class ModelBuilderFacade
* <li>The <i>subProcessFullID</i> id provided as <b>ModelID:ProcessID</b>.</p></li>
* <ul>
* </ul>
- *
+ *
* @param model
* model to create the activity in.
* @param processDefinition
@@ -1447,7 +1450,7 @@ public class ModelBuilderFacade
/**
* Creates a process.
- *
+ *
* @param model
* model to create the process in
* @param processID
@@ -1505,7 +1508,7 @@ public class ModelBuilderFacade
}
/**
- *
+ *
* @return
*/
public DataPathType createDataPath()
@@ -1514,7 +1517,7 @@ public class ModelBuilderFacade
}
/**
- *
+ *
* @param modelId
* @return
*/
@@ -1524,7 +1527,7 @@ public class ModelBuilderFacade
}
/**
- *
+ *
* @param model
* @param id
* @return
@@ -1543,7 +1546,7 @@ public class ModelBuilderFacade
}
/**
- *
+ *
* @param processFullID
* @return processDefinition
*/
@@ -1565,7 +1568,7 @@ public class ModelBuilderFacade
}
/**
- *
+ *
* @param modelId
* @param id
* @return
@@ -1576,7 +1579,7 @@ public class ModelBuilderFacade
}
/**
- *
+ *
* @param model
* @param id
* @return application
@@ -1595,7 +1598,7 @@ public class ModelBuilderFacade
}
/**
- *
+ *
* @param model
* @param fullApplicationID
* @return application
@@ -1618,7 +1621,7 @@ public class ModelBuilderFacade
}
/**
- *
+ *
* @param model
* @param id
* @return
@@ -1637,7 +1640,7 @@ public class ModelBuilderFacade
}
/**
- *
+ *
* @param diagram
* @param oid
* @return
@@ -1725,7 +1728,7 @@ public class ModelBuilderFacade
}
/**
- *
+ *
* @param model
* @param id
* @return
@@ -1746,7 +1749,7 @@ public class ModelBuilderFacade
}
/**
- *
+ *
* @param model
* @param id
* @return
@@ -1766,7 +1769,7 @@ public class ModelBuilderFacade
}
/**
- *
+ *
* @param fullTypeID
* @return typeDeclaration
*/
@@ -1789,7 +1792,7 @@ public class ModelBuilderFacade
}
/**
- *
+ *
* @param model
* @param id
* @return
@@ -1808,7 +1811,7 @@ public class ModelBuilderFacade
}
/**
- *
+ *
* @param model
* @param id
* @return
@@ -1827,7 +1830,7 @@ public class ModelBuilderFacade
}
/**
- *
+ *
* @param model
* @param dataFullID
* @return data
@@ -1849,7 +1852,7 @@ public class ModelBuilderFacade
}
/**
- *
+ *
* @param model
* @param id
* @return
@@ -1883,7 +1886,7 @@ public class ModelBuilderFacade
}
/**
- *
+ *
* @param model
* @param fullParticipantID
* @return participant
@@ -1914,7 +1917,7 @@ public class ModelBuilderFacade
}
/**
- *
+ *
* @param diagram
* @param oid
* @return
@@ -1946,7 +1949,7 @@ public class ModelBuilderFacade
}
/**
- *
+ *
* @param laneSymbol
* @param oid
* @return
@@ -1975,7 +1978,7 @@ public class ModelBuilderFacade
}
/**
- *
+ *
* @param processDefinition
* @param id
* @return
@@ -1994,7 +1997,7 @@ public class ModelBuilderFacade
}
/**
- *
+ *
* @param diagram
* @param oid
* @return
@@ -2012,7 +2015,7 @@ public class ModelBuilderFacade
}
/**
- *
+ *
* @param laneSymbol
* @param oid
* @return
@@ -2031,7 +2034,7 @@ public class ModelBuilderFacade
}
/**
- *
+ *
* @param diagram
* @param oid
* @return
@@ -2081,7 +2084,7 @@ public class ModelBuilderFacade
}
/**
- *
+ *
* @param diagram
* @param oid
* @return
@@ -2099,7 +2102,7 @@ public class ModelBuilderFacade
}
/**
- *
+ *
* @param diagram
* @param oid
* @return
@@ -2154,7 +2157,7 @@ public class ModelBuilderFacade
}
/**
- *
+ *
* @param model
* @param id
* @return
@@ -2178,7 +2181,7 @@ public class ModelBuilderFacade
}
/**
- *
+ *
* @param diagram
* @param oid
* @return
@@ -2190,7 +2193,7 @@ public class ModelBuilderFacade
}
/**
- *
+ *
* @param laneSymbol
* @param oid
* @return
@@ -2202,7 +2205,7 @@ public class ModelBuilderFacade
}
/**
- *
+ *
* @param diagram
* @param oid
* @return
@@ -2215,7 +2218,7 @@ public class ModelBuilderFacade
}
/**
- *
+ *
* @param laneSymbol
* @param oid
* @return
@@ -2228,7 +2231,7 @@ public class ModelBuilderFacade
}
/**
- *
+ *
* @param diagram
* @param oid
* @return
@@ -2240,7 +2243,7 @@ public class ModelBuilderFacade
}
/**
- *
+ *
* @param container
* @param oid
* @return
@@ -2252,7 +2255,7 @@ public class ModelBuilderFacade
}
/**
- *
+ *
* @param oid
* @param diagram
* @return
@@ -2280,7 +2283,7 @@ public class ModelBuilderFacade
}
/**
- *
+ *
* @param oid
* @param container
* @return
@@ -2339,7 +2342,7 @@ public class ModelBuilderFacade
}
/**
- *
+ *
* @param laneSymbol
* @param id
* @return
@@ -2365,7 +2368,7 @@ public class ModelBuilderFacade
}
/**
- *
+ *
* @param model
* @param id
* @return
@@ -2393,7 +2396,7 @@ public class ModelBuilderFacade
}
/**
- *
+ *
* @param laneSymbol
* @param id
* @return
@@ -2421,7 +2424,7 @@ public class ModelBuilderFacade
}
/**
- *
+ *
* @param processDefinition
* @param oid
* @return
@@ -2443,7 +2446,7 @@ public class ModelBuilderFacade
}
/**
- *
+ *
* @param processDefinition
* @param oid
* @return
@@ -2479,7 +2482,7 @@ public class ModelBuilderFacade
}
/**
- *
+ *
* @param processDefinition
* @param oid
* @return
@@ -2500,7 +2503,7 @@ public class ModelBuilderFacade
}
/**
- *
+ *
* @param poolSymbol
* @param oid
* @return
@@ -2520,7 +2523,7 @@ public class ModelBuilderFacade
}
/**
- *
+ *
* @param poolSymbol
* @param oid
* @return
@@ -2545,7 +2548,7 @@ public class ModelBuilderFacade
}
/**
- *
+ *
* @param modelId
* @param appId
* @return
@@ -2566,7 +2569,7 @@ public class ModelBuilderFacade
}
/**
- *
+ *
* @param model
* @param modelElement
* @return
@@ -2591,7 +2594,7 @@ public class ModelBuilderFacade
/**
* TODO Auxiliary method while cross-model references are not supported
- *
+ *
* @param fullId
* @return
*/
@@ -2604,7 +2607,7 @@ public class ModelBuilderFacade
/**
* Retrieves the model ID of a full ID (e.g. ModelA for ModelA:CreateCustomer).
- *
+ *
* @param fullId
* @return
*/
@@ -2899,11 +2902,11 @@ public class ModelBuilderFacade
catch (ParseException e)
{
}
- }
-
+ }
+
return date;
}
-
+
public void setBooleanAttribute(Object element, String name, boolean value)
{
if (element instanceof Extensible)
@@ -2972,7 +2975,7 @@ public class ModelBuilderFacade
}
/**
- *
+ *
* @param element
* @param attributeName
* @return
@@ -3156,13 +3159,15 @@ public class ModelBuilderFacade
ModelType loadModel = getModelManagementStrategy().loadModel(
participantModelID + ".xpdl");
- IModelParticipant participantCopy = findParticipant(loadModel,
+ /*IModelParticipant participantCopy = findParticipant(loadModel,
+ stripFullId(participantFullID));*/
+ IModelParticipant participantCopy = findParticipant(participantModel,
stripFullId(participantFullID));
- if (participantCopy == null)
- {
- ElementCopier copier = new ElementCopier(loadModel, null);
+ //if (participantCopy == null)
+ //{
+ ElementCopier copier = new ElementCopier(participantModel, null);
participantCopy = (IModelParticipant) copier.copy(modelParticipant);
- }
+ //}
ReplaceModelElementDescriptor descriptor = new ReplaceModelElementDescriptor(
uri, participantCopy, bundleId, null, true);