summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorSidharth Singh2012-09-03 06:25:33 (EDT)
committer Stephan Born2012-09-03 06:25:33 (EDT)
commit94ce895f9b2b380eab755911fdfb43f7b0bb84af (patch)
tree2496b95d14e3e01c3524ce5c3764439f27106e28
parentfc01544712b9d5a60ec24b1f7d3785b57adcf6a7 (diff)
downloadorg.eclipse.stardust.ui.web-94ce895f9b2b380eab755911fdfb43f7b0bb84af.zip
org.eclipse.stardust.ui.web-94ce895f9b2b380eab755911fdfb43f7b0bb84af.tar.gz
org.eclipse.stardust.ui.web-94ce895f9b2b380eab755911fdfb43f7b0bb84af.tar.bz2
CRNT-26000
1)Reverted the changes commited for connection rules. git-svn-id: http://emeafrazerg/svn/ipp/product/trunk/stardust/ui.web@58868 8100b5e0-4d52-466c-ae9c-bdeccbdeaf6b
-rw-r--r--web-modeler/src/main/resources/META-INF/xhtml/js/m_connection.js110
-rw-r--r--web-modeler/src/main/resources/META-INF/xhtml/js/m_diagram.js18
-rw-r--r--web-modeler/src/main/resources/META-INF/xhtml/js/m_eventSymbol.js42
3 files changed, 67 insertions, 103 deletions
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 f5811d1..ede55e5 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
@@ -7,13 +7,13 @@ define(
"m_propertiesPanel", "m_dataFlowPropertiesPanel",
"m_controlFlowPropertiesPanel", "m_activitySymbol",
"m_gatewaySymbol", "m_eventSymbol", "m_controlFlow",
- "m_dataFlow", "m_modelerUtils", "m_messageDisplay" ],
+ "m_dataFlow", "m_modelerUtils" ],
function(m_utils, m_constants, m_canvasManager, m_drawable,
m_commandsController, m_command, m_controlFlow,
m_propertiesPanel, m_dataFlowPropertiesPanel,
m_controlFlowPropertiesPanel, m_activitySymbol,
m_gatewaySymbol, m_eventSymbol, m_controlFlow, m_dataFlow,
- m_modelerUtils, m_messageDisplay) {
+ m_modelerUtils) {
return {
createConnection : function(diagram, fromAnchorPoint) {
@@ -310,58 +310,55 @@ define(
}
if (this.toAnchorPoint.symbol != null) {
- if (this.validateAnchorPoint(this.fromAnchorPoint,
- this.toAnchorPoint)) {
- this.toAnchorPoint.symbol.connections.push(this);
-
- if (this.isDataFlow()) {
- var data;
- var activity;
-
- // TODO need better ways to identify data symbol
- if (this.fromAnchorPoint.symbol.dataFullId != null) {
- this.fromModelElementOid = this.fromAnchorPoint.symbol.oid;
- this.fromModelElementType = m_constants.DATA;
- this.toModelElementOid = this.toAnchorPoint.symbol.oid;
- if (this.toAnchorPoint.symbol.modelElement) {
- this.toModelElementType = this.toAnchorPoint.symbol.modelElement.type;
- }
- data = this.fromAnchorPoint.symbol.modelElement;
- activity = this.toAnchorPoint.symbol.modelElement;
- } else {
- this.fromModelElementOid = this.fromAnchorPoint.symbol.oid;
- if (this.fromAnchorPoint.symbol.modelElement) {
- this.fromModelElementType = this.fromAnchorPoint.symbol.modelElement.type;
- }
- this.toModelElementOid = this.toAnchorPoint.symbol.oid;
- this.toModelElementType = m_constants.DATA;
- data = this.toAnchorPoint.symbol.modelElement;
- activity = this.fromAnchorPoint.symbol.modelElement;
- }
+ this.toAnchorPoint.symbol.connections.push(this);
- this.modelElement = m_dataFlow.createDataFlow(
- this.diagram.process, data, activity);
+ if (this.isDataFlow()) {
+ var data;
+ var activity;
- this.propertiesPanel = m_dataFlowPropertiesPanel
- .getInstance();
- } else {
+ // TODO need better ways to identify data symbol
+ if (this.fromAnchorPoint.symbol.dataFullId != null) {
this.fromModelElementOid = this.fromAnchorPoint.symbol.oid;
- if (this.fromAnchorPoint.symbol.modelElement) {
- this.fromModelElementType = this.fromAnchorPoint.symbol.modelElement.type;
- }
+ this.fromModelElementType = m_constants.DATA;
this.toModelElementOid = this.toAnchorPoint.symbol.oid;
if (this.toAnchorPoint.symbol.modelElement) {
this.toModelElementType = this.toAnchorPoint.symbol.modelElement.type;
}
+ data = this.fromAnchorPoint.symbol.modelElement;
+ activity = this.toAnchorPoint.symbol.modelElement;
+ } else {
+ this.fromModelElementOid = this.fromAnchorPoint.symbol.oid;
+ if(this.fromAnchorPoint.symbol.modelElement){
+ this.fromModelElementType = this.fromAnchorPoint.symbol.modelElement.type;
+ }
+ this.toModelElementOid = this.toAnchorPoint.symbol.oid;
+ this.toModelElementType = m_constants.DATA;
+ data = this.toAnchorPoint.symbol.modelElement;
+ activity = this.fromAnchorPoint.symbol.modelElement;
+ }
+
+ this.modelElement = m_dataFlow.createDataFlow(
+ this.diagram.process, data, activity);
- this.modelElement = m_controlFlow
- .createControlFlow(this.diagram.process);
- this.propertiesPanel = m_controlFlowPropertiesPanel
- .getInstance();
+ this.propertiesPanel = m_dataFlowPropertiesPanel
+ .getInstance();
+ } else {
+ this.fromModelElementOid = this.fromAnchorPoint.symbol.oid;
+ if(this.fromAnchorPoint.symbol.modelElement){
+ this.fromModelElementType = this.fromAnchorPoint.symbol.modelElement.type;
+ }
+ this.toModelElementOid = this.toAnchorPoint.symbol.oid;
+ if (this.toAnchorPoint.symbol.modelElement) {
+ this.toModelElementType = this.toAnchorPoint.symbol.modelElement.type;
}
- this.refreshFromModelElement();
+ this.modelElement = m_controlFlow
+ .createControlFlow(this.diagram.process);
+ this.propertiesPanel = m_controlFlowPropertiesPanel
+ .getInstance();
}
+
+ this.refreshFromModelElement();
}
this.reroute();
@@ -1338,33 +1335,6 @@ define(
/**
*
*/
- Connection.prototype.validateAnchorPoint = function(
- fromAnchorPoint, toAnchorPoint) {
- if (fromAnchorPoint.symbol.type == m_constants.EVENT_SYMBOL
- || toAnchorPoint.symbol.type == m_constants.EVENT_SYMBOL) {
- if (fromAnchorPoint.symbol.modelElement.eventType == m_constants.STOP_EVENT_TYPE) {
- m_messageDisplay
- .showErrorMessage("Only in sequence flow connections are allowed on End Events.");
- return false;
- }
- if (toAnchorPoint.symbol.modelElement.eventType == m_constants.START_EVENT_TYPE) {
- m_messageDisplay
- .showErrorMessage("Only out sequence flow connections are allowed on Start Events.");
- return false;
- }
- }
-
- if (fromAnchorPoint.symbol.oid == toAnchorPoint.symbol.oid) {
- m_messageDisplay
- .showErrorMessage("A connection must connect two different symbols.");
- return false;
- }
- return true;
- }
-
- /**
- *
- */
Connection.prototype.flipFlowOrientation = function(
flowOrientation) {
// if (this.isDataFlow()) {
diff --git a/web-modeler/src/main/resources/META-INF/xhtml/js/m_diagram.js b/web-modeler/src/main/resources/META-INF/xhtml/js/m_diagram.js
index b80eba3..723399f 100644
--- a/web-modeler/src/main/resources/META-INF/xhtml/js/m_diagram.js
+++ b/web-modeler/src/main/resources/META-INF/xhtml/js/m_diagram.js
@@ -655,7 +655,7 @@ define(
if (symbol != null) {
m_utils.debug("Up to changed symbol:");
m_utils.debug(symbol);
-
+
symbol.lastModifyingUser = command.account; //m_session.getUserByAccount(command.account);
symbol.applyChanges(obj.changes.modified[i]);
@@ -1405,18 +1405,12 @@ define(
this.currentConnection.setDummySecondAnchorPoint();
} else {
- var status = this.currentConnection
- .validateAnchorPoint(
- this.currentConnection.fromAnchorPoint,
- anchorPoint);
- if (status) {
- this.currentConnection
- .setSecondAnchorPoint(anchorPoint);
- this.currentConnection.select();
+ this.currentConnection
+ .setSecondAnchorPoint(anchorPoint);
+ this.currentConnection.select();
- this.currentConnection = null;
- this.mode = this.NORMAL_MODE;
- }
+ this.currentConnection = null;
+ this.mode = this.NORMAL_MODE;
}
};
diff --git a/web-modeler/src/main/resources/META-INF/xhtml/js/m_eventSymbol.js b/web-modeler/src/main/resources/META-INF/xhtml/js/m_eventSymbol.js
index 4658021..2c6f3d4 100644
--- a/web-modeler/src/main/resources/META-INF/xhtml/js/m_eventSymbol.js
+++ b/web-modeler/src/main/resources/META-INF/xhtml/js/m_eventSymbol.js
@@ -3,7 +3,7 @@
* program and the accompanying materials are made available under the terms of
* the Eclipse Public License v1.0 which accompanies this distribution, and is
* available at http://www.eclipse.org/legal/epl-v10.html
- *
+ *
* Contributors: SunGard CSA LLC - initial API and implementation and/or initial
* documentation
******************************************************************************/
@@ -50,7 +50,7 @@ define(
};
/**
- *
+ *
*/
function EventSymbol() {
var symbol = m_symbol.createSymbol();
@@ -85,14 +85,14 @@ define(
};
/**
- *
+ *
*/
EventSymbol.prototype.toString = function() {
return "Lightdust.EventSymbol";
};
/**
- *
+ *
*/
EventSymbol.prototype.initializeFromJson = function(lane) {
m_utils.inheritMethods(this.modelElement.prototype,
@@ -112,7 +112,7 @@ define(
};
/**
- *
+ *
*/
EventSymbol.prototype.createTransferObject = function() {
var transferObject = {};
@@ -130,7 +130,7 @@ define(
};
/**
- *
+ *
*/
EventSymbol.prototype.getPath = function(withId) {
var path = "/models/" + this.diagram.model.id
@@ -145,7 +145,7 @@ define(
};
/**
- *
+ *
*/
EventSymbol.prototype.createPrimitives = function() {
this.circle = m_canvasManager.drawCircle(this.x
@@ -180,13 +180,13 @@ define(
};
/**
- *
+ *
*/
EventSymbol.prototype.initializeEventHandling = function() {
};
/**
- *
+ *
*/
EventSymbol.prototype.refreshFromModelElement = function() {
if (this.modelElement.eventType == m_constants.START_EVENT_TYPE) {
@@ -201,7 +201,7 @@ define(
};
/**
- *
+ *
*/
EventSymbol.prototype.createFlyOutMenu = function() {
// For stop event, right menu will be empty.
@@ -236,7 +236,7 @@ define(
};
/**
- *
+ *
*/
EventSymbol.prototype.highlight = function() {
this.circle.attr({
@@ -245,7 +245,7 @@ define(
};
/**
- *
+ *
*/
EventSymbol.prototype.dehighlight = function() {
this.circle.attr({
@@ -254,7 +254,7 @@ define(
};
/**
- *
+ *
*/
EventSymbol.prototype.adjustPrimitives = function(dX, dY) {
this.circle.animate({
@@ -273,14 +273,14 @@ define(
};
/**
- *
+ *
*/
EventSymbol.prototype.recalculateBoundingBox = function() {
// Noting to be done here
};
/**
- *
+ *
*/
EventSymbol.prototype.validateCreateConnection = function() {
if (this.connections.length > 0) {
@@ -294,14 +294,14 @@ define(
};
/**
- *
+ *
*/
EventSymbol.prototype.onComplete = function() {
this.onParentSymbolChange();
};
/*
- *
+ *
*/
EventSymbol.prototype.onParentSymbolChange = function() {
if (this.modelElement.eventType == m_constants.START_EVENT_TYPE
@@ -315,7 +315,7 @@ define(
}
/**
- *
+ *
*/
function EventSymbol_connectToClosure() {
this.auxiliaryProperties.callbackScope.diagram
@@ -323,7 +323,7 @@ define(
}
/**
- *
+ *
*/
function EventSymbol_connectToGatewayClosure() {
this.auxiliaryProperties.callbackScope.diagram
@@ -331,7 +331,7 @@ define(
}
/**
- *
+ *
*/
function EventSymbol_connectToActivityClosure() {
this.auxiliaryProperties.callbackScope.diagram
@@ -339,7 +339,7 @@ define(
}
/**
- *
+ *
*/
function EventSymbol_removeClosure() {
this.auxiliaryProperties.callbackScope