summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorSidharth Singh2012-09-06 03:37:13 (EDT)
committerStephan Born2012-09-06 03:37:13 (EDT)
commit5e6cb38d08b3789cba16b6271b417eef1078e245 (patch)
treeca936f94de7e01ba5c342ace38d3168d71ed3f88
parent5546ed2016dcdcf8e0e44a68defe3a06b241856b (diff)
downloadorg.eclipse.stardust.ui.web-5e6cb38d08b3789cba16b6271b417eef1078e245.zip
org.eclipse.stardust.ui.web-5e6cb38d08b3789cba16b6271b417eef1078e245.tar.gz
org.eclipse.stardust.ui.web-5e6cb38d08b3789cba16b6271b417eef1078e245.tar.bz2
CRNT-26070
1)Made changes in ModelElementUnmarshaller.java updateDataMapping to use equals in comparision. 2)Made changes in m_connection.js to remove existing non-saved connection from toAnchorPoint in setSecondAnchorPointNoComplete() 3)Made change in toDataMappingConnectionType() in ModelElementMarshaller.java git-svn-id: http://emeafrazerg/svn/ipp/product/trunk/stardust/ui.web@58956 8100b5e0-4d52-466c-ae9c-bdeccbdeaf6b
-rw-r--r--web-modeler/src/main/java/org/eclipse/stardust/ui/web/modeler/marshaling/ModelElementMarshaller.java36
-rw-r--r--web-modeler/src/main/java/org/eclipse/stardust/ui/web/modeler/marshaling/ModelElementUnmarshaller.java7
-rw-r--r--web-modeler/src/main/resources/META-INF/xhtml/js/m_connection.js23
3 files changed, 30 insertions, 36 deletions
diff --git a/web-modeler/src/main/java/org/eclipse/stardust/ui/web/modeler/marshaling/ModelElementMarshaller.java b/web-modeler/src/main/java/org/eclipse/stardust/ui/web/modeler/marshaling/ModelElementMarshaller.java
index 9d4b281..1220640 100644
--- a/web-modeler/src/main/java/org/eclipse/stardust/ui/web/modeler/marshaling/ModelElementMarshaller.java
+++ b/web-modeler/src/main/java/org/eclipse/stardust/ui/web/modeler/marshaling/ModelElementMarshaller.java
@@ -41,7 +41,7 @@ public abstract class ModelElementMarshaller
private ModelBuilderFacade modelBuilderFacade;
/**
- *
+ *
* @param modelElement
* @return
*/
@@ -270,7 +270,7 @@ public abstract class ModelElementMarshaller
}
/**
- *
+ *
* @param laneSymbol
* @return
*/
@@ -463,7 +463,7 @@ public abstract class ModelElementMarshaller
}
/**
- *
+ *
* @param activity
* @return
*/
@@ -599,7 +599,7 @@ public abstract class ModelElementMarshaller
}
/**
- *
+ *
* @param activitySymbol
* @return
*/
@@ -687,7 +687,7 @@ public abstract class ModelElementMarshaller
}
/**
- *
+ *
* @param startEventSymbol
* @return
*/
@@ -739,7 +739,7 @@ public abstract class ModelElementMarshaller
}
/**
- *
+ *
* @param startEventSymbol
* @return
*/
@@ -791,7 +791,7 @@ public abstract class ModelElementMarshaller
}
/**
- *
+ *
* @param data
* @return
*/
@@ -892,7 +892,7 @@ public abstract class ModelElementMarshaller
}
/**
- *
+ *
* @param startEventSymbol
* @return
*/
@@ -1178,7 +1178,7 @@ public abstract class ModelElementMarshaller
}
/**
- *
+ *
* @param dataMappingConnection
* @return
*/
@@ -1203,13 +1203,13 @@ public abstract class ModelElementMarshaller
for (DataMappingType dataMapping : activity.getDataMapping())
{
// Update the dataFlowJson for currentData symbol
- if (dataMapping.getData().getId() == data.getId())
+ if (dataMapping.getId().equals(data.getId()))
{
dataFlowJson = toDataMappingJson(dataMapping);
// TODO - Currently API always assumes connectionJson.getSourceNode will
// be data, to set Activity in sourceNode for OUT Mapping for data below
// code is added.
- if (dataFlowJson.has(ModelerConstants.OUT_DATA_MAPPING_PROPERTY))
+ if (dataFlowJson.get(ModelerConstants.OUT_DATA_MAPPING_PROPERTY).getAsBoolean())
{
connectionJson.addProperty(ModelerConstants.FROM_MODEL_ELEMENT_OID,
dataMappingConnection.getActivitySymbol().getElementOid());
@@ -1248,7 +1248,7 @@ public abstract class ModelElementMarshaller
}
/**
- *
+ *
* @param transitionConnection
* @return
*/
@@ -1406,7 +1406,7 @@ public abstract class ModelElementMarshaller
}
/**
- *
+ *
* @param transitionConnection
* @return
*/
@@ -1798,7 +1798,7 @@ public abstract class ModelElementMarshaller
}
/**
- *
+ *
* @param orientation
* @return
*/
@@ -1829,7 +1829,7 @@ public abstract class ModelElementMarshaller
}
/**
- *
+ *
* @param modelElementJson
* @param element
*/
@@ -1848,7 +1848,7 @@ public abstract class ModelElementMarshaller
}
/**
- *
+ *
* @param element
* @param json
* @throws JSONException
@@ -1873,9 +1873,9 @@ public abstract class ModelElementMarshaller
}
/**
- *
+ *
* TODO From DynamicConnectionCommand. Refactor?
- *
+ *
* @param activity
* @return
*/
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 7e717e2..70c20ce 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
@@ -373,9 +373,8 @@ public abstract class ModelElementUnmarshaller
.getActivity()
.getDataMapping())
{
- if (dataMapping.getId() == dataFlowConnection.getDataSymbol()
- .getData()
- .getId())
+ if (dataMapping.getId().equals(
+ dataFlowConnection.getDataSymbol().getData().getId()))
{
updateDataMapping(dataFlowJson, dataMapping);
}
@@ -737,7 +736,7 @@ public abstract class ModelElementUnmarshaller
propertiesMap.get(OrganizationType.class));
storeAttributes(organization, organizationJson);
storeDescription(organization, organizationJson);
-
+
if (organizationJson.has(ModelerConstants.TEAM_LEAD_FULL_ID_PROPERTY))
{
organization.setTeamLead((RoleType)getModelBuilderFacade().findParticipant(organizationJson.get(ModelerConstants.TEAM_LEAD_FULL_ID_PROPERTY).getAsString()));
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 7064752..c1ee650 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
@@ -317,7 +317,8 @@ define(
if (this.toAnchorPoint.symbol != null && this.validateAnchorPoint(this.fromAnchorPoint, this.toAnchorPoint)) {
// On Mouse move , the same connection is added again,
// so remove if present then add(update)
- this.toAnchorPoint.symbol.connections.pop(this);
+ m_utils.removeItemFromArray(
+ this.toAnchorPoint.symbol.connections, this);
this.toAnchorPoint.symbol.connections.push(this);
if (this.isDataFlow()) {
@@ -405,7 +406,8 @@ define(
// Identify if connection exist between same
// Data and Activity symbol
if (dataSymbol.connections[n].oid
- && (dataSymbol.connections[n].fromAnchorPoint.symbol.oid == activity.oid || dataSymbol.connections[n].toAnchorPoint.symbol.oid)) {
+ && (dataSymbol.connections[n].fromAnchorPoint.symbol.oid == activity.oid
+ || dataSymbol.connections[n].toAnchorPoint.symbol.oid == activity.oid)) {
// Use the existing connection
updateConnection = dataSymbol.connections[n];
// This will be the case always, just cross
@@ -490,10 +492,6 @@ define(
*/
Connection.prototype.refresh = function() {
this.adjustGeometry();
-
- // TODO Why here? Replace by command
-// m_commandsController.submitImmediately(this
-// .createUpdateCommand());
};
/**
@@ -750,7 +748,9 @@ define(
} else if (this.isDataFlow()) {
this.path.attr({
"stroke" : m_constants.DATA_FLOW_COLOR,
- "stroke-dasharray" : "-"
+ "stroke-dasharray" : "-",
+ "arrow-start" : "none",
+ "arrow-end" : "none"
});
// For In-Mapping path will be from Data to Activity
@@ -763,8 +763,7 @@ define(
// When dataFlow modified from properties panel the
// From,To anchor point symbols to not change
if (this.fromAnchorPoint.symbol.type == m_constants.ACTIVITY_SYMBOL) {
- this.path
- .attr("arrow-start", "block-wide-long");
+ this.path.attr("arrow-start", "block-wide-long");
this.path.attr("arrow-end", "none");
} else {
this.path.attr("arrow-start", "none");
@@ -772,16 +771,12 @@ define(
}
} else if (this.modelElement.outDataMapping) {
if (this.fromAnchorPoint.symbol.type == m_constants.DATA_SYMBOL) {
- this.path
- .attr("arrow-start", "block-wide-long");
+ this.path.attr("arrow-start", "block-wide-long");
this.path.attr("arrow-end", "none");
} else {
this.path.attr("arrow-start", "none");
this.path.attr("arrow-end", "block-wide-long");
}
- }else {
- this.path.attr("arrow-start", "none");
- this.path.attr("arrow-end", "none");
}
}
};