diff options
author | jeremie.tatibouet | 2015-05-04 10:03:37 +0000 |
---|---|---|
committer | Arnaud Cuccuru | 2015-05-05 16:47:00 +0000 |
commit | b8e467cba2b0fb654c7d8c10e43de9c5f526c6b1 (patch) | |
tree | fa343f34f5c74a424f69db637b268228eaff7671 /plugins/uml/alf | |
parent | ac3565d88897376cbc0dc639c32faca257e5b5b7 (diff) | |
download | org.eclipse.papyrus-b8e467cba2b0fb654c7d8c10e43de9c5f526c6b1.tar.gz org.eclipse.papyrus-b8e467cba2b0fb654c7d8c10e43de9c5f526c6b1.tar.xz org.eclipse.papyrus-b8e467cba2b0fb654c7d8c10e43de9c5f526c6b1.zip |
Fix model merge strategy to support the update of activity nodes and
edges issued from the compilation.
Change-Id: Ibc8a31a933d53364c6bade9fa2371a4cc13cf739
Signed-off-by: jeremie.tatibouet <jeremie.tatibouet@cea.fr>
Reviewed-on: https://git.eclipse.org/r/47154
Tested-by: Hudson CI
Reviewed-by: Arnaud Cuccuru <arnaud.cuccuru@cea.fr>
Tested-by: Arnaud Cuccuru <arnaud.cuccuru@cea.fr>
Diffstat (limited to 'plugins/uml/alf')
-rw-r--r-- | plugins/uml/alf/org.eclipse.papyrus.uml.alf/src/org/eclipse/papyrus/uml/alf/ModelMerge.java | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/plugins/uml/alf/org.eclipse.papyrus.uml.alf/src/org/eclipse/papyrus/uml/alf/ModelMerge.java b/plugins/uml/alf/org.eclipse.papyrus.uml.alf/src/org/eclipse/papyrus/uml/alf/ModelMerge.java index 5ad1c35e8cb..91a545aee65 100644 --- a/plugins/uml/alf/org.eclipse.papyrus.uml.alf/src/org/eclipse/papyrus/uml/alf/ModelMerge.java +++ b/plugins/uml/alf/org.eclipse.papyrus.uml.alf/src/org/eclipse/papyrus/uml/alf/ModelMerge.java @@ -78,6 +78,13 @@ public class ModelMerge { // NOTE: Removes the source activity as a method of its former specification. sourceActivity.setSpecification(null); targetActivity.setSpecification(specification); + // NOTE: the elements contained in the activity (i.e., nodes and edges) are not preserved between two compilations + /*1. Destroy elements*/ + targetActivity.getNodes().clear(); + targetActivity.getEdges().clear(); + /*2. Create them from the mapped specification*/ + this.updateCollection(targetActivity.getOwnedNodes(), sourceActivity.getNodes()); + this.updateCollection(targetActivity.getEdges(), sourceActivity.getEdges()); } else if (source instanceof Class && target instanceof Class) { Class sourceClass = (Class) source; Class targetClass = (Class) target; |