diff options
24 files changed, 529 insertions, 2 deletions
diff --git a/plugins/org.eclipse.emf.compare.diagram.papyrus.tests.git/src/org/eclipse/emf/compare/diagram/papyrus/tests/resourceattachmentchange/move/ResourceAttachmentChangeMoveOrderTests.java b/plugins/org.eclipse.emf.compare.diagram.papyrus.tests.git/src/org/eclipse/emf/compare/diagram/papyrus/tests/resourceattachmentchange/move/ResourceAttachmentChangeMoveOrderTests.java new file mode 100644 index 000000000..e3e27760b --- /dev/null +++ b/plugins/org.eclipse.emf.compare.diagram.papyrus.tests.git/src/org/eclipse/emf/compare/diagram/papyrus/tests/resourceattachmentchange/move/ResourceAttachmentChangeMoveOrderTests.java @@ -0,0 +1,243 @@ +/******************************************************************************* + * Copyright (C) 2016 Ericsson and others. + * + * All rights reserved. This 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: + * Simon Delisle - initial API and implementation + * Philip Langer - refactoring of test cases + *******************************************************************************/ +package org.eclipse.emf.compare.diagram.papyrus.tests.resourceattachmentchange.move; + +import static com.google.common.collect.Iterables.find; +import static org.junit.Assert.assertEquals; +import static org.junit.Assert.assertFalse; +import static org.junit.Assert.assertNotNull; +import static org.junit.Assert.assertTrue; + +import java.io.File; + +import org.eclipse.core.resources.IFile; +import org.eclipse.core.resources.IProject; +import org.eclipse.emf.common.util.BasicMonitor; +import org.eclipse.emf.common.util.EList; +import org.eclipse.emf.common.util.URI; +import org.eclipse.emf.compare.Comparison; +import org.eclipse.emf.compare.Diff; +import org.eclipse.emf.compare.DifferenceKind; +import org.eclipse.emf.compare.MatchResource; +import org.eclipse.emf.compare.ResourceAttachmentChange; +import org.eclipse.emf.compare.diagram.internal.merge.CompareDiagramMerger; +import org.eclipse.emf.compare.ide.ui.tests.workspace.TestProject; +import org.eclipse.emf.compare.merge.IMerger; +import org.eclipse.emf.compare.uml2.internal.merge.UMLMerger; +import org.eclipse.emf.ecore.EObject; +import org.eclipse.emf.ecore.resource.Resource; +import org.eclipse.emf.ecore.resource.impl.ResourceSetImpl; +import org.eclipse.gmf.runtime.notation.Diagram; +import org.junit.Test; + +import com.google.common.base.Predicate; + +@SuppressWarnings("restriction") +public class ResourceAttachmentChangeMoveOrderTests extends AbstractResourceAttachmentChangeMoveTests { + + /** Path to the test data. */ + private static final String TEST_DATA_PATH = "src/org/eclipse/emf/compare/diagram/papyrus/tests/resourceattachmentchange/move/data/"; + + /** Path of model files within the test data. */ + private static final String TEST_MODEL_PATH = "caseBug488089/"; + + /** Path of ancestor model files within the test data. */ + private static final String ANCESTOR_PATH = TEST_MODEL_PATH + "ancestor/"; + + /** Path of left model files within the test data. */ + private static final String LEFT_PATH = TEST_MODEL_PATH + "left/"; + + /** Path of right model files within the test data. */ + private static final String RIGHT_PATH = TEST_MODEL_PATH + "right/"; + + /** Name of component diagram 2. */ + private static final String COMPONENT_DIAGRAM_MODEL2 = "ComponentDiagramModel2"; + + /** Name of component diagram 2. */ + private static final String COMPONENT_DIAGRAM_MODEL3 = "ComponentDiagramModel3"; + + private ResourceSetImpl resourceSet; + private IProject iProject; + private TestProject testProject; + private IFile modelDi; + private IFile modelNotation; + private IFile modelUml; + private IFile model2Di; + private IFile model2Notation; + private IFile model2Uml; + private IFile model3Di; + private IFile model3Notation; + private IFile model3Uml; + + /** + * Checkout BRANCH_2 and compare with BRANCH_1 (contain the move). 2 + * {@link ResourceAttachmentChange resource attachment changes} of kind + * MOVE. Merge ComponentDiagramModel3 diff then ComponentDiagramModel2 diff. + * In the resulting model, the order should be preserved + * (ComponentDiagramModel2 before ComponentDiagramModel3). + */ + @Test + public void testOrderAfterManuallyApplyingDiffs() throws Exception { + setUpRepositoryCaseBug488089(); + repository.checkoutBranch(BRANCH_2); + Comparison comparison = compare(BRANCH_2, BRANCH_1, modelNotation); + + EList<Diff> diffs = comparison.getDifferences(); + Diff diffComponentDiagramModel2 = find(diffs, resourceAttachmentMoveDiff(COMPONENT_DIAGRAM_MODEL2)); + Diff diffComponentDiagramModel3 = find(diffs, resourceAttachmentMoveDiff(COMPONENT_DIAGRAM_MODEL3)); + + IMerger.Registry mergerRegistry; + mergerRegistry = IMerger.RegistryImpl.createStandaloneInstance(); + final IMerger umlMerger = new UMLMerger(); + umlMerger.setRanking(11); + final IMerger diagramMerger = new CompareDiagramMerger(); + diagramMerger.setRanking(11); + mergerRegistry.add(umlMerger); + mergerRegistry.add(diagramMerger); + + mergerRegistry.getHighestRankingMerger(diffComponentDiagramModel3).copyRightToLeft(diffComponentDiagramModel3, + new BasicMonitor()); + mergerRegistry.getHighestRankingMerger(diffComponentDiagramModel2).copyRightToLeft(diffComponentDiagramModel2, + new BasicMonitor()); + + checkOrderInLeftResource(comparison.getMatchedResources()); + testProject.dispose(); + } + + private void setUpRepositoryCaseBug488089() throws Exception { + resourceSet = new ResourceSetImpl(); + File workingDirectory = repository.getRepository().getWorkTree(); + testProject = new TestProject("Project", workingDirectory.getAbsolutePath()); + iProject = testProject.getProject(); + repository.connect(iProject); + + modelDi = addToProject(TEST_DATA_PATH, testProject, iProject, ANCESTOR_PATH + "model.di", ""); + modelNotation = addToProject(TEST_DATA_PATH, testProject, iProject, ANCESTOR_PATH + "model.notation", ""); + modelUml = addToProject(TEST_DATA_PATH, testProject, iProject, ANCESTOR_PATH + "model.uml", ""); + + model2Di = addToProject(TEST_DATA_PATH, testProject, iProject, ANCESTOR_PATH + "model2.di", ""); + model2Notation = addToProject(TEST_DATA_PATH, testProject, iProject, ANCESTOR_PATH + "model2.notation", ""); + model2Uml = addToProject(TEST_DATA_PATH, testProject, iProject, ANCESTOR_PATH + "model2.uml", ""); + + model3Di = addToProject(TEST_DATA_PATH, testProject, iProject, ANCESTOR_PATH + "model3.di", ""); + model3Notation = addToProject(TEST_DATA_PATH, testProject, iProject, ANCESTOR_PATH + "model3.notation", ""); + model3Uml = addToProject(TEST_DATA_PATH, testProject, iProject, ANCESTOR_PATH + "model3.uml", ""); + + repository.addAllAndCommit("1st-commit", true); + + repository.createBranch(MASTER, BRANCH_1); + repository.createBranch(MASTER, BRANCH_2); + + repository.checkoutBranch(BRANCH_2); + + modelDi = addToProject(TEST_DATA_PATH, testProject, iProject, LEFT_PATH + "model.di", ""); + modelNotation = addToProject(TEST_DATA_PATH, testProject, iProject, LEFT_PATH + "model.notation", ""); + modelUml = addToProject(TEST_DATA_PATH, testProject, iProject, LEFT_PATH + "model.uml", ""); + + model2Di = addToProject(TEST_DATA_PATH, testProject, iProject, LEFT_PATH + "model2.di", ""); + model2Notation = addToProject(TEST_DATA_PATH, testProject, iProject, LEFT_PATH + "model2.notation", ""); + model2Uml = addToProject(TEST_DATA_PATH, testProject, iProject, LEFT_PATH + "model2.uml", ""); + + model3Di = addToProject(TEST_DATA_PATH, testProject, iProject, LEFT_PATH + "model3.di", ""); + model3Notation = addToProject(TEST_DATA_PATH, testProject, iProject, LEFT_PATH + "model3.notation", ""); + model3Uml = addToProject(TEST_DATA_PATH, testProject, iProject, LEFT_PATH + "model3.uml", ""); + + repository.addAllAndCommit("2nd-commit-branch2", true); + + repository.checkoutBranch(BRANCH_1); + + modelDi = addToProject(TEST_DATA_PATH, testProject, iProject, RIGHT_PATH + "model.di", ""); + modelNotation = addToProject(TEST_DATA_PATH, testProject, iProject, RIGHT_PATH + "model.notation", ""); + modelUml = addToProject(TEST_DATA_PATH, testProject, iProject, RIGHT_PATH + "model.uml", ""); + + removeFromProject(iProject, model2Di.getName()); + removeFromProject(iProject, model2Notation.getName()); + removeFromProject(iProject, model2Uml.getName()); + removeFromProject(iProject, model3Di.getName()); + removeFromProject(iProject, model3Notation.getName()); + removeFromProject(iProject, model3Uml.getName()); + + repository.addAllAndCommit("2nd-commit-branch1", true); + } + + private Predicate<Diff> resourceAttachmentMoveDiff(final String name) { + return new Predicate<Diff>() { + public boolean apply(Diff input) { + if (input instanceof ResourceAttachmentChange && DifferenceKind.MOVE.equals(input.getKind())) { + final ResourceAttachmentChange change = (ResourceAttachmentChange) input; + final EObject left = change.getMatch().getLeft(); + if (left instanceof Diagram) { + return name.equals(((Diagram) left).getName()); + } + } + return false; + } + }; + } + + private void checkOrderInLeftResource(EList<MatchResource> comparisonResourceList) { + Resource leftResource = null; + for (MatchResource matchResource : comparisonResourceList) { + if (matchResource.getLeftURI().contains("model.notation")) { + leftResource = matchResource.getLeft(); + break; + } + } + + assertNotNull(leftResource); + Diagram diagramModel2 = (Diagram) leftResource.getContents().get(1); + Diagram diagramModel3 = (Diagram) leftResource.getContents().get(2); + assertEquals(COMPONENT_DIAGRAM_MODEL2, diagramModel2.getName()); + assertEquals(COMPONENT_DIAGRAM_MODEL3, diagramModel3.getName()); + } + + /** + * Checkout BRANCH_2 and merge with BRANCH_1 (contain the move). In the + * resulting file, the order of the elements (diagrams) should be the same + * as BRANCH_1 (componentDiagramModel2 before componentDiagramModel3). + */ + @Test + public void testOrderAfterLogicalMerge() throws Exception { + setUpRepositoryCaseBug488089(); + repository.checkoutBranch(BRANCH_2); + repository.mergeLogicalWithNewCommit(BRANCH_1); + checkContentsCaseBug488089(); + testProject.dispose(); + } + + private void checkContentsCaseBug488089() throws Exception { + assertTrue(repository.status().getConflicting().isEmpty()); + assertTrue(iProject.isAccessible()); + + assertTrue(modelDi.exists()); + assertTrue(modelNotation.exists()); + assertTrue(modelUml.exists()); + + URI modelNotationUri = URI.createPlatformResourceURI(modelNotation.getFullPath().toString(), true); + Resource resourceModelNotation = resourceSet.getResource(modelNotationUri, true); + + assertEquals(3, resourceModelNotation.getContents().size()); + Diagram diagramModel2 = (Diagram) resourceModelNotation.getContents().get(1); + Diagram diagramModel3 = (Diagram) resourceModelNotation.getContents().get(2); + + assertEquals(COMPONENT_DIAGRAM_MODEL2, diagramModel2.getName()); + assertEquals(COMPONENT_DIAGRAM_MODEL3, diagramModel3.getName()); + + assertFalse(model2Di.exists()); + assertFalse(model2Notation.exists()); + assertFalse(model2Uml.exists()); + assertFalse(model3Di.exists()); + assertFalse(model3Notation.exists()); + assertFalse(model3Uml.exists()); + } +} diff --git a/plugins/org.eclipse.emf.compare.diagram.papyrus.tests.git/src/org/eclipse/emf/compare/diagram/papyrus/tests/resourceattachmentchange/move/data/caseBug488089/ancestor/model.di b/plugins/org.eclipse.emf.compare.diagram.papyrus.tests.git/src/org/eclipse/emf/compare/diagram/papyrus/tests/resourceattachmentchange/move/data/caseBug488089/ancestor/model.di new file mode 100644 index 000000000..bf9abab34 --- /dev/null +++ b/plugins/org.eclipse.emf.compare.diagram.papyrus.tests.git/src/org/eclipse/emf/compare/diagram/papyrus/tests/resourceattachmentchange/move/data/caseBug488089/ancestor/model.di @@ -0,0 +1,2 @@ +<?xml version="1.0" encoding="UTF-8"?> +<xmi:XMI xmi:version="2.0" xmlns:xmi="http://www.omg.org/XMI"/> diff --git a/plugins/org.eclipse.emf.compare.diagram.papyrus.tests.git/src/org/eclipse/emf/compare/diagram/papyrus/tests/resourceattachmentchange/move/data/caseBug488089/ancestor/model.notation b/plugins/org.eclipse.emf.compare.diagram.papyrus.tests.git/src/org/eclipse/emf/compare/diagram/papyrus/tests/resourceattachmentchange/move/data/caseBug488089/ancestor/model.notation new file mode 100644 index 000000000..85cee8915 --- /dev/null +++ b/plugins/org.eclipse.emf.compare.diagram.papyrus.tests.git/src/org/eclipse/emf/compare/diagram/papyrus/tests/resourceattachmentchange/move/data/caseBug488089/ancestor/model.notation @@ -0,0 +1,28 @@ +<?xml version="1.0" encoding="UTF-8"?> +<notation:Diagram xmi:version="2.0" xmlns:xmi="http://www.omg.org/XMI" xmlns:configuration="http://www.eclipse.org/papyrus/infra/viewpoints/configuration" xmlns:notation="http://www.eclipse.org/gmf/runtime/1.0.2/notation" xmlns:style="http://www.eclipse.org/papyrus/infra/viewpoints/policy/style" xmlns:uml="http://www.eclipse.org/uml2/5.0.0/UML" xmi:id="_8kEeYAJyEeaTnZrqlDPR7g" type="PapyrusUMLClassDiagram" name="PackageDiagramModel" measurementUnit="Pixel"> + <children xmi:type="notation:Shape" xmi:id="_GF8OgAJ5EeaTnZrqlDPR7g" type="2007"> + <children xmi:type="notation:DecorationNode" xmi:id="_GF9coAJ5EeaTnZrqlDPR7g" type="5026"/> + <children xmi:type="notation:BasicCompartment" xmi:id="_GF9coQJ5EeaTnZrqlDPR7g" type="7016"> + <styles xmi:type="notation:TitleStyle" xmi:id="_GF9cogJ5EeaTnZrqlDPR7g"/> + <layoutConstraint xmi:type="notation:Bounds" xmi:id="_GF9cowJ5EeaTnZrqlDPR7g"/> + </children> + <element xmi:type="uml:Package" href="model2.uml#_wMbkkAJ4EeaTnZrqlDPR7g"/> + <layoutConstraint xmi:type="notation:Bounds" xmi:id="_GF8OgQJ5EeaTnZrqlDPR7g" x="156" y="124"/> + </children> + <children xmi:type="notation:Shape" xmi:id="_GaN1YAJ5EeaTnZrqlDPR7g" type="2007"> + <children xmi:type="notation:DecorationNode" xmi:id="_GaOccAJ5EeaTnZrqlDPR7g" type="5026"/> + <children xmi:type="notation:BasicCompartment" xmi:id="_GaOccQJ5EeaTnZrqlDPR7g" type="7016"> + <styles xmi:type="notation:TitleStyle" xmi:id="_GaOccgJ5EeaTnZrqlDPR7g"/> + <layoutConstraint xmi:type="notation:Bounds" xmi:id="_GaOccwJ5EeaTnZrqlDPR7g"/> + </children> + <element xmi:type="uml:Package" href="model3.uml#_wvhqkAJ4EeaTnZrqlDPR7g"/> + <layoutConstraint xmi:type="notation:Bounds" xmi:id="_GaN1YQJ5EeaTnZrqlDPR7g" x="485" y="111"/> + </children> + <styles xmi:type="notation:StringValueStyle" xmi:id="_8kEeYQJyEeaTnZrqlDPR7g" name="diagram_compatibility_version" stringValue="1.1.0"/> + <styles xmi:type="notation:DiagramStyle" xmi:id="_8kEeYgJyEeaTnZrqlDPR7g"/> + <styles xmi:type="style:PapyrusViewStyle" xmi:id="_8kEeYwJyEeaTnZrqlDPR7g"> + <owner xmi:type="uml:Model" href="model.uml#_rgwuYAJyEeaTnZrqlDPR7g"/> + <configuration xmi:type="configuration:PapyrusDiagram" href="platform:/plugin/org.eclipse.papyrus.infra.viewpoints.policy/builtin/default.configuration#_7wLmpNxhEeOqHvRyiN87hA"/> + </styles> + <element xmi:type="uml:Model" href="model.uml#_rgwuYAJyEeaTnZrqlDPR7g"/> +</notation:Diagram> diff --git a/plugins/org.eclipse.emf.compare.diagram.papyrus.tests.git/src/org/eclipse/emf/compare/diagram/papyrus/tests/resourceattachmentchange/move/data/caseBug488089/ancestor/model.uml b/plugins/org.eclipse.emf.compare.diagram.papyrus.tests.git/src/org/eclipse/emf/compare/diagram/papyrus/tests/resourceattachmentchange/move/data/caseBug488089/ancestor/model.uml new file mode 100644 index 000000000..7b18cc81c --- /dev/null +++ b/plugins/org.eclipse.emf.compare.diagram.papyrus.tests.git/src/org/eclipse/emf/compare/diagram/papyrus/tests/resourceattachmentchange/move/data/caseBug488089/ancestor/model.uml @@ -0,0 +1,5 @@ +<?xml version="1.0" encoding="UTF-8"?> +<uml:Model xmi:version="20131001" xmlns:xmi="http://www.omg.org/spec/XMI/20131001" xmlns:uml="http://www.eclipse.org/uml2/5.0.0/UML" xmi:id="_rgwuYAJyEeaTnZrqlDPR7g" name="RootElement"> + <packagedElement xmi:type="uml:Package" href="model2.uml#_wMbkkAJ4EeaTnZrqlDPR7g"/> + <packagedElement xmi:type="uml:Package" href="model3.uml#_wvhqkAJ4EeaTnZrqlDPR7g"/> +</uml:Model> diff --git a/plugins/org.eclipse.emf.compare.diagram.papyrus.tests.git/src/org/eclipse/emf/compare/diagram/papyrus/tests/resourceattachmentchange/move/data/caseBug488089/ancestor/model2.di b/plugins/org.eclipse.emf.compare.diagram.papyrus.tests.git/src/org/eclipse/emf/compare/diagram/papyrus/tests/resourceattachmentchange/move/data/caseBug488089/ancestor/model2.di new file mode 100644 index 000000000..bf9abab34 --- /dev/null +++ b/plugins/org.eclipse.emf.compare.diagram.papyrus.tests.git/src/org/eclipse/emf/compare/diagram/papyrus/tests/resourceattachmentchange/move/data/caseBug488089/ancestor/model2.di @@ -0,0 +1,2 @@ +<?xml version="1.0" encoding="UTF-8"?> +<xmi:XMI xmi:version="2.0" xmlns:xmi="http://www.omg.org/XMI"/> diff --git a/plugins/org.eclipse.emf.compare.diagram.papyrus.tests.git/src/org/eclipse/emf/compare/diagram/papyrus/tests/resourceattachmentchange/move/data/caseBug488089/ancestor/model2.notation b/plugins/org.eclipse.emf.compare.diagram.papyrus.tests.git/src/org/eclipse/emf/compare/diagram/papyrus/tests/resourceattachmentchange/move/data/caseBug488089/ancestor/model2.notation new file mode 100644 index 000000000..47dfd2849 --- /dev/null +++ b/plugins/org.eclipse.emf.compare.diagram.papyrus.tests.git/src/org/eclipse/emf/compare/diagram/papyrus/tests/resourceattachmentchange/move/data/caseBug488089/ancestor/model2.notation @@ -0,0 +1,21 @@ +<?xml version="1.0" encoding="UTF-8"?> +<notation:Diagram xmi:version="2.0" xmlns:xmi="http://www.omg.org/XMI" xmlns:notation="http://www.eclipse.org/gmf/runtime/1.0.2/notation" xmlns:style="http://www.eclipse.org/papyrus/infra/viewpoints/policy/style" xmlns:uml="http://www.eclipse.org/uml2/5.0.0/UML" xmi:id="_3m4j8AJ4EeaTnZrqlDPR7g" type="PapyrusUMLComponentDiagram" name="ComponentDiagramModel2" measurementUnit="Pixel"> + <children xmi:type="notation:Shape" xmi:id="_71mnIAJ4EeaTnZrqlDPR7g" type="2002"> + <children xmi:type="notation:DecorationNode" xmi:id="_71nOMAJ4EeaTnZrqlDPR7g" type="5004"/> + <children xmi:type="notation:DecorationNode" xmi:id="_71nOMQJ4EeaTnZrqlDPR7g" type="6030"> + <layoutConstraint xmi:type="notation:Location" xmi:id="_71nOMgJ4EeaTnZrqlDPR7g" y="5"/> + </children> + <children xmi:type="notation:BasicCompartment" xmi:id="_71n1QAJ4EeaTnZrqlDPR7g" type="7001"> + <styles xmi:type="notation:TitleStyle" xmi:id="_71n1QQJ4EeaTnZrqlDPR7g"/> + <layoutConstraint xmi:type="notation:Bounds" xmi:id="_71n1QgJ4EeaTnZrqlDPR7g"/> + </children> + <element xmi:type="uml:Component" href="model2.uml#_6RzSEAJ4EeaTnZrqlDPR7g"/> + <layoutConstraint xmi:type="notation:Bounds" xmi:id="_71mnIQJ4EeaTnZrqlDPR7g" x="183" y="124"/> + </children> + <styles xmi:type="notation:StringValueStyle" xmi:id="_3m4j8QJ4EeaTnZrqlDPR7g" name="diagram_compatibility_version" stringValue="1.1.0"/> + <styles xmi:type="notation:DiagramStyle" xmi:id="_3m4j8gJ4EeaTnZrqlDPR7g"/> + <styles xmi:type="style:PapyrusViewStyle" xmi:id="_3m4j8wJ4EeaTnZrqlDPR7g"> + <owner xmi:type="uml:Package" href="model2.uml#_wMbkkAJ4EeaTnZrqlDPR7g"/> + </styles> + <element xmi:type="uml:Package" href="model2.uml#_wMbkkAJ4EeaTnZrqlDPR7g"/> +</notation:Diagram> diff --git a/plugins/org.eclipse.emf.compare.diagram.papyrus.tests.git/src/org/eclipse/emf/compare/diagram/papyrus/tests/resourceattachmentchange/move/data/caseBug488089/ancestor/model2.uml b/plugins/org.eclipse.emf.compare.diagram.papyrus.tests.git/src/org/eclipse/emf/compare/diagram/papyrus/tests/resourceattachmentchange/move/data/caseBug488089/ancestor/model2.uml new file mode 100644 index 000000000..a0e5cceec --- /dev/null +++ b/plugins/org.eclipse.emf.compare.diagram.papyrus.tests.git/src/org/eclipse/emf/compare/diagram/papyrus/tests/resourceattachmentchange/move/data/caseBug488089/ancestor/model2.uml @@ -0,0 +1,4 @@ +<?xml version="1.0" encoding="UTF-8"?> +<uml:Package xmi:version="20131001" xmlns:xmi="http://www.omg.org/spec/XMI/20131001" xmlns:uml="http://www.eclipse.org/uml2/5.0.0/UML" xmi:id="_wMbkkAJ4EeaTnZrqlDPR7g" name="model2"> + <packagedElement xmi:type="uml:Component" xmi:id="_6RzSEAJ4EeaTnZrqlDPR7g" name="ComponentModel2"/> +</uml:Package> diff --git a/plugins/org.eclipse.emf.compare.diagram.papyrus.tests.git/src/org/eclipse/emf/compare/diagram/papyrus/tests/resourceattachmentchange/move/data/caseBug488089/ancestor/model3.di b/plugins/org.eclipse.emf.compare.diagram.papyrus.tests.git/src/org/eclipse/emf/compare/diagram/papyrus/tests/resourceattachmentchange/move/data/caseBug488089/ancestor/model3.di new file mode 100644 index 000000000..bf9abab34 --- /dev/null +++ b/plugins/org.eclipse.emf.compare.diagram.papyrus.tests.git/src/org/eclipse/emf/compare/diagram/papyrus/tests/resourceattachmentchange/move/data/caseBug488089/ancestor/model3.di @@ -0,0 +1,2 @@ +<?xml version="1.0" encoding="UTF-8"?> +<xmi:XMI xmi:version="2.0" xmlns:xmi="http://www.omg.org/XMI"/> diff --git a/plugins/org.eclipse.emf.compare.diagram.papyrus.tests.git/src/org/eclipse/emf/compare/diagram/papyrus/tests/resourceattachmentchange/move/data/caseBug488089/ancestor/model3.notation b/plugins/org.eclipse.emf.compare.diagram.papyrus.tests.git/src/org/eclipse/emf/compare/diagram/papyrus/tests/resourceattachmentchange/move/data/caseBug488089/ancestor/model3.notation new file mode 100644 index 000000000..e9241f433 --- /dev/null +++ b/plugins/org.eclipse.emf.compare.diagram.papyrus.tests.git/src/org/eclipse/emf/compare/diagram/papyrus/tests/resourceattachmentchange/move/data/caseBug488089/ancestor/model3.notation @@ -0,0 +1,21 @@ +<?xml version="1.0" encoding="UTF-8"?> +<notation:Diagram xmi:version="2.0" xmlns:xmi="http://www.omg.org/XMI" xmlns:notation="http://www.eclipse.org/gmf/runtime/1.0.2/notation" xmlns:style="http://www.eclipse.org/papyrus/infra/viewpoints/policy/style" xmlns:uml="http://www.eclipse.org/uml2/5.0.0/UML" xmi:id="__Q3NEAJ4EeaTnZrqlDPR7g" type="PapyrusUMLComponentDiagram" name="ComponentDiagramModel3" measurementUnit="Pixel"> + <children xmi:type="notation:Shape" xmi:id="_BaTl0AJ5EeaTnZrqlDPR7g" type="2002"> + <children xmi:type="notation:DecorationNode" xmi:id="_BaUM4AJ5EeaTnZrqlDPR7g" type="5004"/> + <children xmi:type="notation:DecorationNode" xmi:id="_BaUM4QJ5EeaTnZrqlDPR7g" type="6030"> + <layoutConstraint xmi:type="notation:Location" xmi:id="_BaUM4gJ5EeaTnZrqlDPR7g" y="5"/> + </children> + <children xmi:type="notation:BasicCompartment" xmi:id="_BaUM4wJ5EeaTnZrqlDPR7g" type="7001"> + <styles xmi:type="notation:TitleStyle" xmi:id="_BaUM5AJ5EeaTnZrqlDPR7g"/> + <layoutConstraint xmi:type="notation:Bounds" xmi:id="_BaUM5QJ5EeaTnZrqlDPR7g"/> + </children> + <element xmi:type="uml:Component" href="model3.uml#_AIyTkAJ5EeaTnZrqlDPR7g"/> + <layoutConstraint xmi:type="notation:Bounds" xmi:id="_BaTl0QJ5EeaTnZrqlDPR7g" x="152" y="101"/> + </children> + <styles xmi:type="notation:StringValueStyle" xmi:id="__Q3NEQJ4EeaTnZrqlDPR7g" name="diagram_compatibility_version" stringValue="1.1.0"/> + <styles xmi:type="notation:DiagramStyle" xmi:id="__Q3NEgJ4EeaTnZrqlDPR7g"/> + <styles xmi:type="style:PapyrusViewStyle" xmi:id="__Q3NEwJ4EeaTnZrqlDPR7g"> + <owner xmi:type="uml:Package" href="model3.uml#_wvhqkAJ4EeaTnZrqlDPR7g"/> + </styles> + <element xmi:type="uml:Package" href="model3.uml#_wvhqkAJ4EeaTnZrqlDPR7g"/> +</notation:Diagram> diff --git a/plugins/org.eclipse.emf.compare.diagram.papyrus.tests.git/src/org/eclipse/emf/compare/diagram/papyrus/tests/resourceattachmentchange/move/data/caseBug488089/ancestor/model3.uml b/plugins/org.eclipse.emf.compare.diagram.papyrus.tests.git/src/org/eclipse/emf/compare/diagram/papyrus/tests/resourceattachmentchange/move/data/caseBug488089/ancestor/model3.uml new file mode 100644 index 000000000..9c01228eb --- /dev/null +++ b/plugins/org.eclipse.emf.compare.diagram.papyrus.tests.git/src/org/eclipse/emf/compare/diagram/papyrus/tests/resourceattachmentchange/move/data/caseBug488089/ancestor/model3.uml @@ -0,0 +1,4 @@ +<?xml version="1.0" encoding="UTF-8"?> +<uml:Package xmi:version="20131001" xmlns:xmi="http://www.omg.org/spec/XMI/20131001" xmlns:uml="http://www.eclipse.org/uml2/5.0.0/UML" xmi:id="_wvhqkAJ4EeaTnZrqlDPR7g" name="model3"> + <packagedElement xmi:type="uml:Component" xmi:id="_AIyTkAJ5EeaTnZrqlDPR7g" name="ComponentModel3"/> +</uml:Package> diff --git a/plugins/org.eclipse.emf.compare.diagram.papyrus.tests.git/src/org/eclipse/emf/compare/diagram/papyrus/tests/resourceattachmentchange/move/data/caseBug488089/left/model.di b/plugins/org.eclipse.emf.compare.diagram.papyrus.tests.git/src/org/eclipse/emf/compare/diagram/papyrus/tests/resourceattachmentchange/move/data/caseBug488089/left/model.di new file mode 100644 index 000000000..bf9abab34 --- /dev/null +++ b/plugins/org.eclipse.emf.compare.diagram.papyrus.tests.git/src/org/eclipse/emf/compare/diagram/papyrus/tests/resourceattachmentchange/move/data/caseBug488089/left/model.di @@ -0,0 +1,2 @@ +<?xml version="1.0" encoding="UTF-8"?> +<xmi:XMI xmi:version="2.0" xmlns:xmi="http://www.omg.org/XMI"/> diff --git a/plugins/org.eclipse.emf.compare.diagram.papyrus.tests.git/src/org/eclipse/emf/compare/diagram/papyrus/tests/resourceattachmentchange/move/data/caseBug488089/left/model.notation b/plugins/org.eclipse.emf.compare.diagram.papyrus.tests.git/src/org/eclipse/emf/compare/diagram/papyrus/tests/resourceattachmentchange/move/data/caseBug488089/left/model.notation new file mode 100644 index 000000000..4d4bf7399 --- /dev/null +++ b/plugins/org.eclipse.emf.compare.diagram.papyrus.tests.git/src/org/eclipse/emf/compare/diagram/papyrus/tests/resourceattachmentchange/move/data/caseBug488089/left/model.notation @@ -0,0 +1,37 @@ +<?xml version="1.0" encoding="UTF-8"?> +<notation:Diagram xmi:version="2.0" xmlns:xmi="http://www.omg.org/XMI" xmlns:configuration="http://www.eclipse.org/papyrus/infra/viewpoints/configuration" xmlns:notation="http://www.eclipse.org/gmf/runtime/1.0.2/notation" xmlns:style="http://www.eclipse.org/papyrus/infra/viewpoints/policy/style" xmlns:uml="http://www.eclipse.org/uml2/5.0.0/UML" xmi:id="_8kEeYAJyEeaTnZrqlDPR7g" type="PapyrusUMLClassDiagram" name="PackageDiagramModel" measurementUnit="Pixel"> + <children xmi:type="notation:Shape" xmi:id="_GF8OgAJ5EeaTnZrqlDPR7g" type="2007"> + <children xmi:type="notation:DecorationNode" xmi:id="_GF9coAJ5EeaTnZrqlDPR7g" type="5026"/> + <children xmi:type="notation:BasicCompartment" xmi:id="_GF9coQJ5EeaTnZrqlDPR7g" type="7016"> + <styles xmi:type="notation:TitleStyle" xmi:id="_GF9cogJ5EeaTnZrqlDPR7g"/> + <layoutConstraint xmi:type="notation:Bounds" xmi:id="_GF9cowJ5EeaTnZrqlDPR7g"/> + </children> + <element xmi:type="uml:Package" href="model2.uml#_wMbkkAJ4EeaTnZrqlDPR7g"/> + <layoutConstraint xmi:type="notation:Bounds" xmi:id="_GF8OgQJ5EeaTnZrqlDPR7g" x="156" y="124"/> + </children> + <children xmi:type="notation:Shape" xmi:id="_GaN1YAJ5EeaTnZrqlDPR7g" type="2007"> + <children xmi:type="notation:DecorationNode" xmi:id="_GaOccAJ5EeaTnZrqlDPR7g" type="5026"/> + <children xmi:type="notation:BasicCompartment" xmi:id="_GaOccQJ5EeaTnZrqlDPR7g" type="7016"> + <styles xmi:type="notation:TitleStyle" xmi:id="_GaOccgJ5EeaTnZrqlDPR7g"/> + <layoutConstraint xmi:type="notation:Bounds" xmi:id="_GaOccwJ5EeaTnZrqlDPR7g"/> + </children> + <element xmi:type="uml:Package" href="model3.uml#_wvhqkAJ4EeaTnZrqlDPR7g"/> + <layoutConstraint xmi:type="notation:Bounds" xmi:id="_GaN1YQJ5EeaTnZrqlDPR7g" x="485" y="111"/> + </children> + <children xmi:type="notation:Shape" xmi:id="_kz7JUAJ6EeaTnZrqlDPR7g" type="2007"> + <children xmi:type="notation:DecorationNode" xmi:id="_kz7JUgJ6EeaTnZrqlDPR7g" type="5026"/> + <children xmi:type="notation:BasicCompartment" xmi:id="_kz7JUwJ6EeaTnZrqlDPR7g" type="7016"> + <styles xmi:type="notation:TitleStyle" xmi:id="_kz7JVAJ6EeaTnZrqlDPR7g"/> + <layoutConstraint xmi:type="notation:Bounds" xmi:id="_kz7JVQJ6EeaTnZrqlDPR7g"/> + </children> + <element xmi:type="uml:Package" href="model.uml#_iRqn8AJ6EeaTnZrqlDPR7g"/> + <layoutConstraint xmi:type="notation:Bounds" xmi:id="_kz7JUQJ6EeaTnZrqlDPR7g" x="344" y="326"/> + </children> + <styles xmi:type="notation:StringValueStyle" xmi:id="_8kEeYQJyEeaTnZrqlDPR7g" name="diagram_compatibility_version" stringValue="1.1.0"/> + <styles xmi:type="notation:DiagramStyle" xmi:id="_8kEeYgJyEeaTnZrqlDPR7g"/> + <styles xmi:type="style:PapyrusViewStyle" xmi:id="_8kEeYwJyEeaTnZrqlDPR7g"> + <owner xmi:type="uml:Model" href="model.uml#_rgwuYAJyEeaTnZrqlDPR7g"/> + <configuration xmi:type="configuration:PapyrusDiagram" href="platform:/plugin/org.eclipse.papyrus.infra.viewpoints.policy/builtin/default.configuration#_7wLmpNxhEeOqHvRyiN87hA"/> + </styles> + <element xmi:type="uml:Model" href="model.uml#_rgwuYAJyEeaTnZrqlDPR7g"/> +</notation:Diagram> diff --git a/plugins/org.eclipse.emf.compare.diagram.papyrus.tests.git/src/org/eclipse/emf/compare/diagram/papyrus/tests/resourceattachmentchange/move/data/caseBug488089/left/model.uml b/plugins/org.eclipse.emf.compare.diagram.papyrus.tests.git/src/org/eclipse/emf/compare/diagram/papyrus/tests/resourceattachmentchange/move/data/caseBug488089/left/model.uml new file mode 100644 index 000000000..d4fac4a23 --- /dev/null +++ b/plugins/org.eclipse.emf.compare.diagram.papyrus.tests.git/src/org/eclipse/emf/compare/diagram/papyrus/tests/resourceattachmentchange/move/data/caseBug488089/left/model.uml @@ -0,0 +1,6 @@ +<?xml version="1.0" encoding="UTF-8"?> +<uml:Model xmi:version="20131001" xmlns:xmi="http://www.omg.org/spec/XMI/20131001" xmlns:uml="http://www.eclipse.org/uml2/5.0.0/UML" xmi:id="_rgwuYAJyEeaTnZrqlDPR7g" name="RootElement"> + <packagedElement xmi:type="uml:Package" href="model2.uml#_wMbkkAJ4EeaTnZrqlDPR7g"/> + <packagedElement xmi:type="uml:Package" href="model3.uml#_wvhqkAJ4EeaTnZrqlDPR7g"/> + <packagedElement xmi:type="uml:Package" xmi:id="_iRqn8AJ6EeaTnZrqlDPR7g" name="package"/> +</uml:Model> diff --git a/plugins/org.eclipse.emf.compare.diagram.papyrus.tests.git/src/org/eclipse/emf/compare/diagram/papyrus/tests/resourceattachmentchange/move/data/caseBug488089/left/model2.di b/plugins/org.eclipse.emf.compare.diagram.papyrus.tests.git/src/org/eclipse/emf/compare/diagram/papyrus/tests/resourceattachmentchange/move/data/caseBug488089/left/model2.di new file mode 100644 index 000000000..bf9abab34 --- /dev/null +++ b/plugins/org.eclipse.emf.compare.diagram.papyrus.tests.git/src/org/eclipse/emf/compare/diagram/papyrus/tests/resourceattachmentchange/move/data/caseBug488089/left/model2.di @@ -0,0 +1,2 @@ +<?xml version="1.0" encoding="UTF-8"?> +<xmi:XMI xmi:version="2.0" xmlns:xmi="http://www.omg.org/XMI"/> diff --git a/plugins/org.eclipse.emf.compare.diagram.papyrus.tests.git/src/org/eclipse/emf/compare/diagram/papyrus/tests/resourceattachmentchange/move/data/caseBug488089/left/model2.notation b/plugins/org.eclipse.emf.compare.diagram.papyrus.tests.git/src/org/eclipse/emf/compare/diagram/papyrus/tests/resourceattachmentchange/move/data/caseBug488089/left/model2.notation new file mode 100644 index 000000000..47dfd2849 --- /dev/null +++ b/plugins/org.eclipse.emf.compare.diagram.papyrus.tests.git/src/org/eclipse/emf/compare/diagram/papyrus/tests/resourceattachmentchange/move/data/caseBug488089/left/model2.notation @@ -0,0 +1,21 @@ +<?xml version="1.0" encoding="UTF-8"?> +<notation:Diagram xmi:version="2.0" xmlns:xmi="http://www.omg.org/XMI" xmlns:notation="http://www.eclipse.org/gmf/runtime/1.0.2/notation" xmlns:style="http://www.eclipse.org/papyrus/infra/viewpoints/policy/style" xmlns:uml="http://www.eclipse.org/uml2/5.0.0/UML" xmi:id="_3m4j8AJ4EeaTnZrqlDPR7g" type="PapyrusUMLComponentDiagram" name="ComponentDiagramModel2" measurementUnit="Pixel"> + <children xmi:type="notation:Shape" xmi:id="_71mnIAJ4EeaTnZrqlDPR7g" type="2002"> + <children xmi:type="notation:DecorationNode" xmi:id="_71nOMAJ4EeaTnZrqlDPR7g" type="5004"/> + <children xmi:type="notation:DecorationNode" xmi:id="_71nOMQJ4EeaTnZrqlDPR7g" type="6030"> + <layoutConstraint xmi:type="notation:Location" xmi:id="_71nOMgJ4EeaTnZrqlDPR7g" y="5"/> + </children> + <children xmi:type="notation:BasicCompartment" xmi:id="_71n1QAJ4EeaTnZrqlDPR7g" type="7001"> + <styles xmi:type="notation:TitleStyle" xmi:id="_71n1QQJ4EeaTnZrqlDPR7g"/> + <layoutConstraint xmi:type="notation:Bounds" xmi:id="_71n1QgJ4EeaTnZrqlDPR7g"/> + </children> + <element xmi:type="uml:Component" href="model2.uml#_6RzSEAJ4EeaTnZrqlDPR7g"/> + <layoutConstraint xmi:type="notation:Bounds" xmi:id="_71mnIQJ4EeaTnZrqlDPR7g" x="183" y="124"/> + </children> + <styles xmi:type="notation:StringValueStyle" xmi:id="_3m4j8QJ4EeaTnZrqlDPR7g" name="diagram_compatibility_version" stringValue="1.1.0"/> + <styles xmi:type="notation:DiagramStyle" xmi:id="_3m4j8gJ4EeaTnZrqlDPR7g"/> + <styles xmi:type="style:PapyrusViewStyle" xmi:id="_3m4j8wJ4EeaTnZrqlDPR7g"> + <owner xmi:type="uml:Package" href="model2.uml#_wMbkkAJ4EeaTnZrqlDPR7g"/> + </styles> + <element xmi:type="uml:Package" href="model2.uml#_wMbkkAJ4EeaTnZrqlDPR7g"/> +</notation:Diagram> diff --git a/plugins/org.eclipse.emf.compare.diagram.papyrus.tests.git/src/org/eclipse/emf/compare/diagram/papyrus/tests/resourceattachmentchange/move/data/caseBug488089/left/model2.uml b/plugins/org.eclipse.emf.compare.diagram.papyrus.tests.git/src/org/eclipse/emf/compare/diagram/papyrus/tests/resourceattachmentchange/move/data/caseBug488089/left/model2.uml new file mode 100644 index 000000000..a0e5cceec --- /dev/null +++ b/plugins/org.eclipse.emf.compare.diagram.papyrus.tests.git/src/org/eclipse/emf/compare/diagram/papyrus/tests/resourceattachmentchange/move/data/caseBug488089/left/model2.uml @@ -0,0 +1,4 @@ +<?xml version="1.0" encoding="UTF-8"?> +<uml:Package xmi:version="20131001" xmlns:xmi="http://www.omg.org/spec/XMI/20131001" xmlns:uml="http://www.eclipse.org/uml2/5.0.0/UML" xmi:id="_wMbkkAJ4EeaTnZrqlDPR7g" name="model2"> + <packagedElement xmi:type="uml:Component" xmi:id="_6RzSEAJ4EeaTnZrqlDPR7g" name="ComponentModel2"/> +</uml:Package> diff --git a/plugins/org.eclipse.emf.compare.diagram.papyrus.tests.git/src/org/eclipse/emf/compare/diagram/papyrus/tests/resourceattachmentchange/move/data/caseBug488089/left/model3.di b/plugins/org.eclipse.emf.compare.diagram.papyrus.tests.git/src/org/eclipse/emf/compare/diagram/papyrus/tests/resourceattachmentchange/move/data/caseBug488089/left/model3.di new file mode 100644 index 000000000..bf9abab34 --- /dev/null +++ b/plugins/org.eclipse.emf.compare.diagram.papyrus.tests.git/src/org/eclipse/emf/compare/diagram/papyrus/tests/resourceattachmentchange/move/data/caseBug488089/left/model3.di @@ -0,0 +1,2 @@ +<?xml version="1.0" encoding="UTF-8"?> +<xmi:XMI xmi:version="2.0" xmlns:xmi="http://www.omg.org/XMI"/> diff --git a/plugins/org.eclipse.emf.compare.diagram.papyrus.tests.git/src/org/eclipse/emf/compare/diagram/papyrus/tests/resourceattachmentchange/move/data/caseBug488089/left/model3.notation b/plugins/org.eclipse.emf.compare.diagram.papyrus.tests.git/src/org/eclipse/emf/compare/diagram/papyrus/tests/resourceattachmentchange/move/data/caseBug488089/left/model3.notation new file mode 100644 index 000000000..e9241f433 --- /dev/null +++ b/plugins/org.eclipse.emf.compare.diagram.papyrus.tests.git/src/org/eclipse/emf/compare/diagram/papyrus/tests/resourceattachmentchange/move/data/caseBug488089/left/model3.notation @@ -0,0 +1,21 @@ +<?xml version="1.0" encoding="UTF-8"?> +<notation:Diagram xmi:version="2.0" xmlns:xmi="http://www.omg.org/XMI" xmlns:notation="http://www.eclipse.org/gmf/runtime/1.0.2/notation" xmlns:style="http://www.eclipse.org/papyrus/infra/viewpoints/policy/style" xmlns:uml="http://www.eclipse.org/uml2/5.0.0/UML" xmi:id="__Q3NEAJ4EeaTnZrqlDPR7g" type="PapyrusUMLComponentDiagram" name="ComponentDiagramModel3" measurementUnit="Pixel"> + <children xmi:type="notation:Shape" xmi:id="_BaTl0AJ5EeaTnZrqlDPR7g" type="2002"> + <children xmi:type="notation:DecorationNode" xmi:id="_BaUM4AJ5EeaTnZrqlDPR7g" type="5004"/> + <children xmi:type="notation:DecorationNode" xmi:id="_BaUM4QJ5EeaTnZrqlDPR7g" type="6030"> + <layoutConstraint xmi:type="notation:Location" xmi:id="_BaUM4gJ5EeaTnZrqlDPR7g" y="5"/> + </children> + <children xmi:type="notation:BasicCompartment" xmi:id="_BaUM4wJ5EeaTnZrqlDPR7g" type="7001"> + <styles xmi:type="notation:TitleStyle" xmi:id="_BaUM5AJ5EeaTnZrqlDPR7g"/> + <layoutConstraint xmi:type="notation:Bounds" xmi:id="_BaUM5QJ5EeaTnZrqlDPR7g"/> + </children> + <element xmi:type="uml:Component" href="model3.uml#_AIyTkAJ5EeaTnZrqlDPR7g"/> + <layoutConstraint xmi:type="notation:Bounds" xmi:id="_BaTl0QJ5EeaTnZrqlDPR7g" x="152" y="101"/> + </children> + <styles xmi:type="notation:StringValueStyle" xmi:id="__Q3NEQJ4EeaTnZrqlDPR7g" name="diagram_compatibility_version" stringValue="1.1.0"/> + <styles xmi:type="notation:DiagramStyle" xmi:id="__Q3NEgJ4EeaTnZrqlDPR7g"/> + <styles xmi:type="style:PapyrusViewStyle" xmi:id="__Q3NEwJ4EeaTnZrqlDPR7g"> + <owner xmi:type="uml:Package" href="model3.uml#_wvhqkAJ4EeaTnZrqlDPR7g"/> + </styles> + <element xmi:type="uml:Package" href="model3.uml#_wvhqkAJ4EeaTnZrqlDPR7g"/> +</notation:Diagram> diff --git a/plugins/org.eclipse.emf.compare.diagram.papyrus.tests.git/src/org/eclipse/emf/compare/diagram/papyrus/tests/resourceattachmentchange/move/data/caseBug488089/left/model3.uml b/plugins/org.eclipse.emf.compare.diagram.papyrus.tests.git/src/org/eclipse/emf/compare/diagram/papyrus/tests/resourceattachmentchange/move/data/caseBug488089/left/model3.uml new file mode 100644 index 000000000..9c01228eb --- /dev/null +++ b/plugins/org.eclipse.emf.compare.diagram.papyrus.tests.git/src/org/eclipse/emf/compare/diagram/papyrus/tests/resourceattachmentchange/move/data/caseBug488089/left/model3.uml @@ -0,0 +1,4 @@ +<?xml version="1.0" encoding="UTF-8"?> +<uml:Package xmi:version="20131001" xmlns:xmi="http://www.omg.org/spec/XMI/20131001" xmlns:uml="http://www.eclipse.org/uml2/5.0.0/UML" xmi:id="_wvhqkAJ4EeaTnZrqlDPR7g" name="model3"> + <packagedElement xmi:type="uml:Component" xmi:id="_AIyTkAJ5EeaTnZrqlDPR7g" name="ComponentModel3"/> +</uml:Package> diff --git a/plugins/org.eclipse.emf.compare.diagram.papyrus.tests.git/src/org/eclipse/emf/compare/diagram/papyrus/tests/resourceattachmentchange/move/data/caseBug488089/right/model.di b/plugins/org.eclipse.emf.compare.diagram.papyrus.tests.git/src/org/eclipse/emf/compare/diagram/papyrus/tests/resourceattachmentchange/move/data/caseBug488089/right/model.di new file mode 100644 index 000000000..bf9abab34 --- /dev/null +++ b/plugins/org.eclipse.emf.compare.diagram.papyrus.tests.git/src/org/eclipse/emf/compare/diagram/papyrus/tests/resourceattachmentchange/move/data/caseBug488089/right/model.di @@ -0,0 +1,2 @@ +<?xml version="1.0" encoding="UTF-8"?> +<xmi:XMI xmi:version="2.0" xmlns:xmi="http://www.omg.org/XMI"/> diff --git a/plugins/org.eclipse.emf.compare.diagram.papyrus.tests.git/src/org/eclipse/emf/compare/diagram/papyrus/tests/resourceattachmentchange/move/data/caseBug488089/right/model.notation b/plugins/org.eclipse.emf.compare.diagram.papyrus.tests.git/src/org/eclipse/emf/compare/diagram/papyrus/tests/resourceattachmentchange/move/data/caseBug488089/right/model.notation new file mode 100644 index 000000000..d2b7eb06a --- /dev/null +++ b/plugins/org.eclipse.emf.compare.diagram.papyrus.tests.git/src/org/eclipse/emf/compare/diagram/papyrus/tests/resourceattachmentchange/move/data/caseBug488089/right/model.notation @@ -0,0 +1,70 @@ +<?xml version="1.0" encoding="UTF-8"?> +<xmi:XMI xmi:version="2.0" xmlns:xmi="http://www.omg.org/XMI" xmlns:configuration="http://www.eclipse.org/papyrus/infra/viewpoints/configuration" xmlns:notation="http://www.eclipse.org/gmf/runtime/1.0.2/notation" xmlns:style="http://www.eclipse.org/papyrus/infra/viewpoints/policy/style" xmlns:uml="http://www.eclipse.org/uml2/5.0.0/UML"> + <notation:Diagram xmi:id="_8kEeYAJyEeaTnZrqlDPR7g" type="PapyrusUMLClassDiagram" name="PackageDiagramModel" measurementUnit="Pixel"> + <children xmi:type="notation:Shape" xmi:id="_GF8OgAJ5EeaTnZrqlDPR7g" type="2007"> + <children xmi:type="notation:DecorationNode" xmi:id="_GF9coAJ5EeaTnZrqlDPR7g" type="5026"/> + <children xmi:type="notation:BasicCompartment" xmi:id="_GF9coQJ5EeaTnZrqlDPR7g" type="7016"> + <styles xmi:type="notation:TitleStyle" xmi:id="_GF9cogJ5EeaTnZrqlDPR7g"/> + <layoutConstraint xmi:type="notation:Bounds" xmi:id="_GF9cowJ5EeaTnZrqlDPR7g"/> + </children> + <element xmi:type="uml:Package" href="model.uml#_wMbkkAJ4EeaTnZrqlDPR7g"/> + <layoutConstraint xmi:type="notation:Bounds" xmi:id="_GF8OgQJ5EeaTnZrqlDPR7g" x="156" y="124"/> + </children> + <children xmi:type="notation:Shape" xmi:id="_GaN1YAJ5EeaTnZrqlDPR7g" type="2007"> + <children xmi:type="notation:DecorationNode" xmi:id="_GaOccAJ5EeaTnZrqlDPR7g" type="5026"/> + <children xmi:type="notation:BasicCompartment" xmi:id="_GaOccQJ5EeaTnZrqlDPR7g" type="7016"> + <styles xmi:type="notation:TitleStyle" xmi:id="_GaOccgJ5EeaTnZrqlDPR7g"/> + <layoutConstraint xmi:type="notation:Bounds" xmi:id="_GaOccwJ5EeaTnZrqlDPR7g"/> + </children> + <element xmi:type="uml:Package" href="model.uml#_wvhqkAJ4EeaTnZrqlDPR7g"/> + <layoutConstraint xmi:type="notation:Bounds" xmi:id="_GaN1YQJ5EeaTnZrqlDPR7g" x="485" y="111"/> + </children> + <styles xmi:type="notation:StringValueStyle" xmi:id="_8kEeYQJyEeaTnZrqlDPR7g" name="diagram_compatibility_version" stringValue="1.1.0"/> + <styles xmi:type="notation:DiagramStyle" xmi:id="_8kEeYgJyEeaTnZrqlDPR7g"/> + <styles xmi:type="style:PapyrusViewStyle" xmi:id="_8kEeYwJyEeaTnZrqlDPR7g"> + <owner xmi:type="uml:Model" href="model.uml#_rgwuYAJyEeaTnZrqlDPR7g"/> + <configuration xmi:type="configuration:PapyrusDiagram" href="platform:/plugin/org.eclipse.papyrus.infra.viewpoints.policy/builtin/default.configuration#_7wLmpNxhEeOqHvRyiN87hA"/> + </styles> + <element xmi:type="uml:Model" href="model.uml#_rgwuYAJyEeaTnZrqlDPR7g"/> + </notation:Diagram> + <notation:Diagram xmi:id="_3m4j8AJ4EeaTnZrqlDPR7g" type="PapyrusUMLComponentDiagram" name="ComponentDiagramModel2" measurementUnit="Pixel"> + <children xmi:type="notation:Shape" xmi:id="_71mnIAJ4EeaTnZrqlDPR7g" type="2002"> + <children xmi:type="notation:DecorationNode" xmi:id="_71nOMAJ4EeaTnZrqlDPR7g" type="5004"/> + <children xmi:type="notation:DecorationNode" xmi:id="_71nOMQJ4EeaTnZrqlDPR7g" type="6030"> + <layoutConstraint xmi:type="notation:Location" xmi:id="_71nOMgJ4EeaTnZrqlDPR7g" y="5"/> + </children> + <children xmi:type="notation:BasicCompartment" xmi:id="_71n1QAJ4EeaTnZrqlDPR7g" type="7001"> + <styles xmi:type="notation:TitleStyle" xmi:id="_71n1QQJ4EeaTnZrqlDPR7g"/> + <layoutConstraint xmi:type="notation:Bounds" xmi:id="_71n1QgJ4EeaTnZrqlDPR7g"/> + </children> + <element xmi:type="uml:Component" href="model.uml#_6RzSEAJ4EeaTnZrqlDPR7g"/> + <layoutConstraint xmi:type="notation:Bounds" xmi:id="_71mnIQJ4EeaTnZrqlDPR7g" x="183" y="124"/> + </children> + <styles xmi:type="notation:StringValueStyle" xmi:id="_3m4j8QJ4EeaTnZrqlDPR7g" name="diagram_compatibility_version" stringValue="1.1.0"/> + <styles xmi:type="notation:DiagramStyle" xmi:id="_3m4j8gJ4EeaTnZrqlDPR7g"/> + <styles xmi:type="style:PapyrusViewStyle" xmi:id="_3m4j8wJ4EeaTnZrqlDPR7g"> + <owner xmi:type="uml:Package" href="model.uml#_wMbkkAJ4EeaTnZrqlDPR7g"/> + </styles> + <element xmi:type="uml:Package" href="model.uml#_wMbkkAJ4EeaTnZrqlDPR7g"/> + </notation:Diagram> + <notation:Diagram xmi:id="__Q3NEAJ4EeaTnZrqlDPR7g" type="PapyrusUMLComponentDiagram" name="ComponentDiagramModel3" measurementUnit="Pixel"> + <children xmi:type="notation:Shape" xmi:id="_BaTl0AJ5EeaTnZrqlDPR7g" type="2002"> + <children xmi:type="notation:DecorationNode" xmi:id="_BaUM4AJ5EeaTnZrqlDPR7g" type="5004"/> + <children xmi:type="notation:DecorationNode" xmi:id="_BaUM4QJ5EeaTnZrqlDPR7g" type="6030"> + <layoutConstraint xmi:type="notation:Location" xmi:id="_BaUM4gJ5EeaTnZrqlDPR7g" y="5"/> + </children> + <children xmi:type="notation:BasicCompartment" xmi:id="_BaUM4wJ5EeaTnZrqlDPR7g" type="7001"> + <styles xmi:type="notation:TitleStyle" xmi:id="_BaUM5AJ5EeaTnZrqlDPR7g"/> + <layoutConstraint xmi:type="notation:Bounds" xmi:id="_BaUM5QJ5EeaTnZrqlDPR7g"/> + </children> + <element xmi:type="uml:Component" href="model.uml#_AIyTkAJ5EeaTnZrqlDPR7g"/> + <layoutConstraint xmi:type="notation:Bounds" xmi:id="_BaTl0QJ5EeaTnZrqlDPR7g" x="152" y="101"/> + </children> + <styles xmi:type="notation:StringValueStyle" xmi:id="__Q3NEQJ4EeaTnZrqlDPR7g" name="diagram_compatibility_version" stringValue="1.1.0"/> + <styles xmi:type="notation:DiagramStyle" xmi:id="__Q3NEgJ4EeaTnZrqlDPR7g"/> + <styles xmi:type="style:PapyrusViewStyle" xmi:id="__Q3NEwJ4EeaTnZrqlDPR7g"> + <owner xmi:type="uml:Package" href="model.uml#_wvhqkAJ4EeaTnZrqlDPR7g"/> + </styles> + <element xmi:type="uml:Package" href="model.uml#_wvhqkAJ4EeaTnZrqlDPR7g"/> + </notation:Diagram> +</xmi:XMI> diff --git a/plugins/org.eclipse.emf.compare.diagram.papyrus.tests.git/src/org/eclipse/emf/compare/diagram/papyrus/tests/resourceattachmentchange/move/data/caseBug488089/right/model.uml b/plugins/org.eclipse.emf.compare.diagram.papyrus.tests.git/src/org/eclipse/emf/compare/diagram/papyrus/tests/resourceattachmentchange/move/data/caseBug488089/right/model.uml new file mode 100644 index 000000000..7d664b334 --- /dev/null +++ b/plugins/org.eclipse.emf.compare.diagram.papyrus.tests.git/src/org/eclipse/emf/compare/diagram/papyrus/tests/resourceattachmentchange/move/data/caseBug488089/right/model.uml @@ -0,0 +1,9 @@ +<?xml version="1.0" encoding="UTF-8"?> +<uml:Model xmi:version="20131001" xmlns:xmi="http://www.omg.org/spec/XMI/20131001" xmlns:uml="http://www.eclipse.org/uml2/5.0.0/UML" xmi:id="_rgwuYAJyEeaTnZrqlDPR7g" name="RootElement"> + <packagedElement xmi:type="uml:Package" xmi:id="_wMbkkAJ4EeaTnZrqlDPR7g" name="model2"> + <packagedElement xmi:type="uml:Component" xmi:id="_6RzSEAJ4EeaTnZrqlDPR7g" name="ComponentModel2"/> + </packagedElement> + <packagedElement xmi:type="uml:Package" xmi:id="_wvhqkAJ4EeaTnZrqlDPR7g" name="model3"> + <packagedElement xmi:type="uml:Component" xmi:id="_AIyTkAJ5EeaTnZrqlDPR7g" name="ComponentModel3"/> + </packagedElement> +</uml:Model> diff --git a/plugins/org.eclipse.emf.compare.diagram.papyrus.tests.git/src/org/eclipse/emf/compare/diagram/papyrus/tests/suite/PapyrusGitTests.java b/plugins/org.eclipse.emf.compare.diagram.papyrus.tests.git/src/org/eclipse/emf/compare/diagram/papyrus/tests/suite/PapyrusGitTests.java index 909cbdd51..ef6250e8c 100644 --- a/plugins/org.eclipse.emf.compare.diagram.papyrus.tests.git/src/org/eclipse/emf/compare/diagram/papyrus/tests/suite/PapyrusGitTests.java +++ b/plugins/org.eclipse.emf.compare.diagram.papyrus.tests.git/src/org/eclipse/emf/compare/diagram/papyrus/tests/suite/PapyrusGitTests.java @@ -24,6 +24,7 @@ import org.eclipse.emf.compare.diagram.papyrus.tests.egit.StereotypeConflictTest import org.eclipse.emf.compare.diagram.papyrus.tests.resourceattachmentchange.implication.AttachmentChangeImplicationTest; import org.eclipse.emf.compare.diagram.papyrus.tests.resourceattachmentchange.move.ResourceAttachmentChangeMoveConflictTests; import org.eclipse.emf.compare.diagram.papyrus.tests.resourceattachmentchange.move.ResourceAttachmentChangeMoveNoConflictTests; +import org.eclipse.emf.compare.diagram.papyrus.tests.resourceattachmentchange.move.ResourceAttachmentChangeMoveOrderTests; import org.eclipse.emf.ecore.EPackage; import org.eclipse.emf.ecore.resource.Resource; import org.eclipse.gmf.runtime.emf.core.resources.GMFResourceFactory; @@ -51,6 +52,7 @@ import junit.textui.TestRunner; ResourceAttachmentChangeDelete2GitMergeTest.class, ResourceAttachmentChangeMoveConflictTests.class, ResourceAttachmentChangeMoveNoConflictTests.class, + ResourceAttachmentChangeMoveOrderTests.class, StereotypeConflictTest.class, IgnoreDiFileChangesInGitMergeTest.class, MoveOfDiagramConflictDetectionTest.class diff --git a/plugins/org.eclipse.emf.compare/src/org/eclipse/emf/compare/merge/ResourceAttachmentChangeMerger.java b/plugins/org.eclipse.emf.compare/src/org/eclipse/emf/compare/merge/ResourceAttachmentChangeMerger.java index 7e52e918c..c1deb3bb2 100644 --- a/plugins/org.eclipse.emf.compare/src/org/eclipse/emf/compare/merge/ResourceAttachmentChangeMerger.java +++ b/plugins/org.eclipse.emf.compare/src/org/eclipse/emf/compare/merge/ResourceAttachmentChangeMerger.java @@ -1,5 +1,5 @@ /******************************************************************************* - * Copyright (c) 2012, 2015 Obeo. + * Copyright (c) 2012, 2016 Obeo and others. * All rights reserved. This 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 @@ -8,6 +8,7 @@ * Contributors: * Obeo - initial API and implementation * Philip Langer - fix bug 465329 + * Simon Delisle - fix bug 488089 *******************************************************************************/ package org.eclipse.emf.compare.merge; @@ -131,7 +132,19 @@ public class ResourceAttachmentChangeMerger extends AbstractMerger { final EObject sourceValue; if (comparison.isThreeWay()) { // This is a 3-way move, match.getOrigin() can't be null - sourceValue = match.getOrigin(); + if (rightToLeft) { + if (match.getRight() != null) { + sourceValue = match.getRight(); + } else { + sourceValue = match.getOrigin(); + } + } else { + if (match.getLeft() != null) { + sourceValue = match.getLeft(); + } else { + sourceValue = match.getOrigin(); + } + } } else if (rightToLeft) { // This is a 2-way move, match.getRight() & match.getLeft() can't be null sourceValue = match.getRight(); |