[400221] More extensible mergers... and use extensions for requirements36/10236/4
commitf8e69e5b12046badbafc4da2b5ee6870bf0ac69d
authorLaurent Goubet <laurent.goubet@obeo.fr>
Thu, 7 Feb 2013 11:37:58 +0000 (7 12:37 +0100)
committerLaurent Goubet <laurent.goubet@obeo.fr>
Mon, 11 Feb 2013 10:59:49 +0000 (11 11:59 +0100)
treeb8c6afe09d66a84f8ed3bacc277d64c3e2f3540e
parent692935db02dc43a3e4bac2280532d868f8bd74de
[400221] More extensible mergers... and use extensions for requirements

We've made the mergers extensible through bug 398863... but we do not
make use of these extensions when merging other diffs from within the
merging process (merging requires/requiredBy, merging equivalences...).

This patch transforms the merger mechanism to make sure we always use
the extensions instead of Diff.copyRightToLeft or Diff.copyLeftToRight;
and depreciates these two methods. All of the merging code has been
moved to three new specific mergers that will be easier to extend. These
three 'default' mergers are provided through the 'mergerExtension'
extension point which has been moved to the o.e.c.ide plugin.

This also changes all tests so that they use the new APIs instead of the
Diff.copy* methods.

Bug: 400221
Change-Id: I41bb9ab74001e0c94ecb26ffec88cecf599a67be
43 files changed:
plugins/org.eclipse.emf.compare.diagram.ecoretools.tests/META-INF/MANIFEST.MF
plugins/org.eclipse.emf.compare.diagram.ecoretools.tests/src/org/eclipse/emf/compare/diagram/ecoretools/tests/merge/ExtensionMergeTest.java
plugins/org.eclipse.emf.compare.diagram/META-INF/MANIFEST.MF
plugins/org.eclipse.emf.compare.diagram/plugin.xml
plugins/org.eclipse.emf.compare.diagram/src-gen/org/eclipse/emf/compare/diagram/impl/DiagramDiffImpl.java
plugins/org.eclipse.emf.compare.diagram/src/org/eclipse/emf/compare/diagram/merge/DiagramDiffMerger.java [new file with mode: 0644]
plugins/org.eclipse.emf.compare.edit/src/org/eclipse/emf/compare/command/impl/AbstractCopyCommand.java
plugins/org.eclipse.emf.compare.edit/src/org/eclipse/emf/compare/command/impl/CopyAllNonConflictingCommand.java
plugins/org.eclipse.emf.compare.edit/src/org/eclipse/emf/compare/command/impl/CopyCommand.java
plugins/org.eclipse.emf.compare.edit/src/org/eclipse/emf/compare/domain/ICompareEditingDomain.java
plugins/org.eclipse.emf.compare.edit/src/org/eclipse/emf/compare/domain/impl/EMFCompareEditingDomain.java
plugins/org.eclipse.emf.compare.ide/plugin.xml [moved from plugins/org.eclipse.emf.compare/plugin.xml with 54% similarity]
plugins/org.eclipse.emf.compare.ide/schema/MergerExtension.exsd [moved from plugins/org.eclipse.emf.compare/schema/MergerExtension.exsd with 54% similarity]
plugins/org.eclipse.emf.compare.ide/src/org/eclipse/emf/compare/ide/EMFCompareIDEPlugin.java
plugins/org.eclipse.emf.compare.tests/src/org/eclipse/emf/compare/tests/FuzzyTest.java
plugins/org.eclipse.emf.compare.tests/src/org/eclipse/emf/compare/tests/diff/LCSPerformanceTest.java
plugins/org.eclipse.emf.compare.tests/src/org/eclipse/emf/compare/tests/fragmentation/FragmentationTest.java
plugins/org.eclipse.emf.compare.tests/src/org/eclipse/emf/compare/tests/fullcomparison/DynamicInstanceComparisonTest.java
plugins/org.eclipse.emf.compare.tests/src/org/eclipse/emf/compare/tests/merge/ExtensionMergeTest.java
plugins/org.eclipse.emf.compare.tests/src/org/eclipse/emf/compare/tests/merge/IndividualMergeOutOfScopeValuesTest.java
plugins/org.eclipse.emf.compare.tests/src/org/eclipse/emf/compare/tests/merge/IndividualMergeTest.java
plugins/org.eclipse.emf.compare.tests/src/org/eclipse/emf/compare/tests/merge/MultipleMergeTest.java
plugins/org.eclipse.emf.compare.uml2.tests/src/org/eclipse/emf/compare/uml2/tests/AbstractTest.java
plugins/org.eclipse.emf.compare.uml2.tests/src/org/eclipse/emf/compare/uml2/tests/merge/ExtensionMergeTest.java
plugins/org.eclipse.emf.compare.uml2/META-INF/MANIFEST.MF
plugins/org.eclipse.emf.compare.uml2/plugin.xml
plugins/org.eclipse.emf.compare.uml2/src-gen/org/eclipse/emf/compare/uml2/impl/UMLDiffImpl.java
plugins/org.eclipse.emf.compare.uml2/src/org/eclipse/emf/compare/uml2/merge/UMLDiffMerger.java [new file with mode: 0644]
plugins/org.eclipse.emf.compare/META-INF/MANIFEST.MF
plugins/org.eclipse.emf.compare/build.properties
plugins/org.eclipse.emf.compare/src-gen/org/eclipse/emf/compare/Diff.java
plugins/org.eclipse.emf.compare/src/org/eclipse/emf/compare/extension/merge/DefaultMerger.java [deleted file]
plugins/org.eclipse.emf.compare/src/org/eclipse/emf/compare/internal/spec/AttributeChangeSpec.java
plugins/org.eclipse.emf.compare/src/org/eclipse/emf/compare/internal/spec/ReferenceChangeSpec.java
plugins/org.eclipse.emf.compare/src/org/eclipse/emf/compare/internal/spec/ResourceAttachmentChangeSpec.java
plugins/org.eclipse.emf.compare/src/org/eclipse/emf/compare/merge/AbstractMerger.java [new file with mode: 0644]
plugins/org.eclipse.emf.compare/src/org/eclipse/emf/compare/merge/AttributeChangeMerger.java [copied from plugins/org.eclipse.emf.compare/src/org/eclipse/emf/compare/internal/spec/AttributeChangeSpec.java with 50% similarity]
plugins/org.eclipse.emf.compare/src/org/eclipse/emf/compare/merge/BatchMerger.java [new file with mode: 0644]
plugins/org.eclipse.emf.compare/src/org/eclipse/emf/compare/merge/IBatchMerger.java [new file with mode: 0644]
plugins/org.eclipse.emf.compare/src/org/eclipse/emf/compare/merge/IMerger.java [moved from plugins/org.eclipse.emf.compare/src/org/eclipse/emf/compare/extension/merge/IMerger.java with 63% similarity]
plugins/org.eclipse.emf.compare/src/org/eclipse/emf/compare/merge/ReferenceChangeMerger.java [new file with mode: 0644]
plugins/org.eclipse.emf.compare/src/org/eclipse/emf/compare/merge/ResourceAttachmentChangeMerger.java [copied from plugins/org.eclipse.emf.compare/src/org/eclipse/emf/compare/internal/spec/ResourceAttachmentChangeSpec.java with 64% similarity]
plugins/org.eclipse.emf.compare/src/org/eclipse/emf/compare/utils/DiffUtil.java