Skip to main content
summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorOlivier Constant2019-07-17 03:52:15 -0400
committerOlivier Constant2019-07-17 04:13:00 -0400
commitc7ccb7dbabb1fd9a98572a0bb915f44739969d42 (patch)
treef9aa58bdb328316afebfae77a937ebcf29866b1d
parente53126a682570090ceae9bf5fa3282c15c0a7e82 (diff)
downloadorg.eclipse.emf.diffmerge.core-c7ccb7dbabb1fd9a98572a0bb915f44739969d42.tar.gz
org.eclipse.emf.diffmerge.core-c7ccb7dbabb1fd9a98572a0bb915f44739969d42.tar.xz
org.eclipse.emf.diffmerge.core-c7ccb7dbabb1fd9a98572a0bb915f44739969d42.zip
Bug 549331 - Semantic comparison fails with Sirius diagram references
Change-Id: I67601019a2b775fa5965489791c410781d5a2f23 Signed-off-by: Olivier Constant <olivier.constant@thalesgroup.com>
-rw-r--r--plugins/org.eclipse.emf.diffmerge.gmf/src/org/eclipse/emf/diffmerge/gmf/GMFMatchPolicy.java7
1 files changed, 5 insertions, 2 deletions
diff --git a/plugins/org.eclipse.emf.diffmerge.gmf/src/org/eclipse/emf/diffmerge/gmf/GMFMatchPolicy.java b/plugins/org.eclipse.emf.diffmerge.gmf/src/org/eclipse/emf/diffmerge/gmf/GMFMatchPolicy.java
index cf2b7033..5cd4a72e 100644
--- a/plugins/org.eclipse.emf.diffmerge.gmf/src/org/eclipse/emf/diffmerge/gmf/GMFMatchPolicy.java
+++ b/plugins/org.eclipse.emf.diffmerge.gmf/src/org/eclipse/emf/diffmerge/gmf/GMFMatchPolicy.java
@@ -205,9 +205,12 @@ public class GMFMatchPolicy extends ConfigurableMatchPolicy {
String containerID = getMatchID(container, scope_p);
if (containerID != null) {
Map<String, String> map = new ComparableTreeMap<String, String>();
+ Entry<?, ?> asEntry = (Entry<?, ?>) entry_p;
+ Object key = asEntry.getKey();
+ Object value = asEntry.getValue();
map.put(SEMANTIC_ID_CONTAINER_PROPERTY, containerID);
- map.put(SEMANTIC_ID_ENTRY_KEY_PROPERTY, ((Entry<?, ?>) entry_p).getKey().toString());
- map.put(SEMANTIC_ID_ENTRY_VALUE_PROPERTY, ((Entry<?, ?>) entry_p).getValue().toString());
+ map.put(SEMANTIC_ID_ENTRY_KEY_PROPERTY, key == null? null: key.toString());
+ map.put(SEMANTIC_ID_ENTRY_VALUE_PROPERTY, value == null? null: value.toString());
result = map.toString();
}
}

Back to the top