summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorSidharth Singh2012-10-04 03:22:06 (EDT)
committer Manik Kishore2012-10-04 03:22:06 (EDT)
commit132a55a00d1bceb9fe9be88e611e08b07a445245 (patch)
tree61c8937ba3756a17dfdb81e026c2aefe32e4e68b
parenta340e0e032447e68c244c2caf8edd0130c6ecbb0 (diff)
downloadorg.eclipse.stardust.ui.web-132a55a00d1bceb9fe9be88e611e08b07a445245.zip
org.eclipse.stardust.ui.web-132a55a00d1bceb9fe9be88e611e08b07a445245.tar.gz
org.eclipse.stardust.ui.web-132a55a00d1bceb9fe9be88e611e08b07a445245.tar.bz2
CRNT-26502
Made changes to createUpdateCommand for connection to pass the changes Made changes to updateDataFlowConnection and updateControlFlowConnection to use modelElement for orientation change. git-svn-id: http://emeafrazerg/svn/ipp/product/trunk/stardust/ui.web@59747 8100b5e0-4d52-466c-ae9c-bdeccbdeaf6b
-rw-r--r--web-modeler/src/main/java/org/eclipse/stardust/ui/web/modeler/marshaling/ModelElementUnmarshaller.java16
-rw-r--r--web-modeler/src/main/resources/META-INF/xhtml/js/m_connection.js15
-rw-r--r--web-modeler/src/main/resources/META-INF/xhtml/js/m_symbol.js8
3 files changed, 26 insertions, 13 deletions
diff --git a/web-modeler/src/main/java/org/eclipse/stardust/ui/web/modeler/marshaling/ModelElementUnmarshaller.java b/web-modeler/src/main/java/org/eclipse/stardust/ui/web/modeler/marshaling/ModelElementUnmarshaller.java
index 0164446..251453a 100644
--- a/web-modeler/src/main/java/org/eclipse/stardust/ui/web/modeler/marshaling/ModelElementUnmarshaller.java
+++ b/web-modeler/src/main/java/org/eclipse/stardust/ui/web/modeler/marshaling/ModelElementUnmarshaller.java
@@ -428,16 +428,16 @@ public abstract class ModelElementUnmarshaller implements ModelUnmarshaller
}
// While routing , anchor point orientation changes
- if (controlFlowConnectionJson.has(ModelerConstants.FROM_ANCHOR_POINT_ORIENTATION_PROPERTY))
+ if (controlFlowJson.has(ModelerConstants.FROM_ANCHOR_POINT_ORIENTATION_PROPERTY))
{
controlFlowConnection.setSourceAnchor(mapAnchorOrientation(extractInt(
- controlFlowConnectionJson,
+ controlFlowJson,
ModelerConstants.FROM_ANCHOR_POINT_ORIENTATION_PROPERTY)));
}
- if (controlFlowConnectionJson.has(ModelerConstants.TO_ANCHOR_POINT_ORIENTATION_PROPERTY))
+ if (controlFlowJson.has(ModelerConstants.TO_ANCHOR_POINT_ORIENTATION_PROPERTY))
{
controlFlowConnection.setTargetAnchor(mapAnchorOrientation(extractInt(
- controlFlowConnectionJson,
+ controlFlowJson,
ModelerConstants.TO_ANCHOR_POINT_ORIENTATION_PROPERTY)));
}
}
@@ -451,16 +451,16 @@ public abstract class ModelElementUnmarshaller implements ModelUnmarshaller
JsonObject dataFlowConnectionJson)
{
JsonObject dataFlowJson = dataFlowConnectionJson.getAsJsonObject(ModelerConstants.MODEL_ELEMENT_PROPERTY);
- if (dataFlowConnectionJson.has(ModelerConstants.FROM_ANCHOR_POINT_ORIENTATION_PROPERTY))
+ if (dataFlowJson.has(ModelerConstants.FROM_ANCHOR_POINT_ORIENTATION_PROPERTY))
{
dataFlowConnection.setSourceAnchor(mapAnchorOrientation(extractInt(
- dataFlowConnectionJson,
+ dataFlowJson,
ModelerConstants.FROM_ANCHOR_POINT_ORIENTATION_PROPERTY)));
}
- if (dataFlowConnectionJson.has(ModelerConstants.TO_ANCHOR_POINT_ORIENTATION_PROPERTY))
+ if (dataFlowJson.has(ModelerConstants.TO_ANCHOR_POINT_ORIENTATION_PROPERTY))
{
dataFlowConnection.setTargetAnchor(mapAnchorOrientation(extractInt(
- dataFlowConnectionJson,
+ dataFlowJson,
ModelerConstants.TO_ANCHOR_POINT_ORIENTATION_PROPERTY)));
}
diff --git a/web-modeler/src/main/resources/META-INF/xhtml/js/m_connection.js b/web-modeler/src/main/resources/META-INF/xhtml/js/m_connection.js
index 4e62341..6becb1d 100644
--- a/web-modeler/src/main/resources/META-INF/xhtml/js/m_connection.js
+++ b/web-modeler/src/main/resources/META-INF/xhtml/js/m_connection.js
@@ -445,7 +445,15 @@ define(
|| (updateConnection.modelElement.outDataMapping && this.modelElement.inDataMapping)) {
updateConnection.modelElement.inDataMapping = true;
updateConnection.modelElement.outDataMapping = true;
- updateConnection.createUpdateCommand();
+ var changes = {
+ modelElement : {
+ toAnchorPointOrientation : this.toAnchorPoint.orientation,
+ fromAnchorPointOrientation : this.fromAnchorPoint.orientation,
+ inDataMapping : updateConnection.modelElement.inDataMapping,
+ outDataMapping : updateConnection.modelElement.inDataMapping
+ }
+ }
+ updateConnection.createUpdateCommand(changes);
m_messageDisplay
.showMessage("Connection updated");
break;
@@ -1716,10 +1724,9 @@ define(
/**
*
*/
- Connection.prototype.createUpdateCommand = function() {
+ Connection.prototype.createUpdateCommand = function(changes) {
var command = m_command.createUpdateModelElementCommand(
- this.diagram.model.id, this.oid, this
- .createTransferObject());
+ this.diagram.model.id, this.oid, changes);
m_commandsController.submitCommand(command);
};
diff --git a/web-modeler/src/main/resources/META-INF/xhtml/js/m_symbol.js b/web-modeler/src/main/resources/META-INF/xhtml/js/m_symbol.js
index 249ee58..07bb2a9 100644
--- a/web-modeler/src/main/resources/META-INF/xhtml/js/m_symbol.js
+++ b/web-modeler/src/main/resources/META-INF/xhtml/js/m_symbol.js
@@ -2109,7 +2109,13 @@ define(
this.dragConnection.reroute();
// if reroute validation fails no update is required
if (updateConnection) {
- this.dragConnection.createUpdateCommand();
+ var changes = {
+ modelElement : {
+ toAnchorPointOrientation : this.dragConnection.toAnchorPoint.orientation,
+ fromAnchorPointOrientation : this.dragConnection.fromAnchorPoint.orientation
+ }
+ }
+ this.dragConnection.createUpdateCommand(changes);
m_messageDisplay.showMessage("Connection updated");
this.remove();
}