[475401] Modify RootIDMatchingStrategy to only return unique mappings15/54615/4
commit88d73ad228347f4d7790fb74c3b75990eec5d400
authorStefan Dirix <sdirix@eclipsesource.com>
Thu, 27 Aug 2015 11:52:24 +0000 (27 13:52 +0200)
committerAxel RICHARD <axel.richard@obeo.fr>
Wed, 2 Sep 2015 08:43:22 +0000 (2 04:43 -0400)
tree2abbfa1309efa942a815d4a78f20f424deae8e5c
parentc1fc714f2410092dd77d6c1c225750aeb5227932
[475401] Modify RootIDMatchingStrategy to only return unique mappings

The RootIDMatchingStrategy determines matching between resources by
intersecting the IDs of their root objects. The RootIDMatchingStrategy
now checks if a possible mapping is unique and does therefore not
intersect with another possible mapping.

The previous behavior of returning the first possible mapping creates
"random" results, affected by the order the given iterators return their
resources. Since this strategy can not determine which is the "better"
mapping of multiple options it should not return any of them. This way
the remaining EMFCompareFramework is not confused by "half-true"
mappings.

Includes two-way testcases.

Bug: 475401
Signed-off-by: Stefan Dirix <sdirix@eclipsesource.com>
Change-Id: I2cb886d088d6ce27cbc06ec2958fc02ef9253d36
28 files changed:
plugins/org.eclipse.emf.compare.tests/src/org/eclipse/emf/compare/tests/match/RootIDMatchingTest.java [new file with mode: 0644]
plugins/org.eclipse.emf.compare.tests/src/org/eclipse/emf/compare/tests/match/data/MatchInputData.java
plugins/org.eclipse.emf.compare.tests/src/org/eclipse/emf/compare/tests/match/data/rootid/twoway/a1/left.nodes [new file with mode: 0644]
plugins/org.eclipse.emf.compare.tests/src/org/eclipse/emf/compare/tests/match/data/rootid/twoway/a1/left2.nodes [new file with mode: 0644]
plugins/org.eclipse.emf.compare.tests/src/org/eclipse/emf/compare/tests/match/data/rootid/twoway/a1/right.nodes [new file with mode: 0644]
plugins/org.eclipse.emf.compare.tests/src/org/eclipse/emf/compare/tests/match/data/rootid/twoway/a1/right2.nodes [new file with mode: 0644]
plugins/org.eclipse.emf.compare.tests/src/org/eclipse/emf/compare/tests/match/data/rootid/twoway/a2/left.nodes [new file with mode: 0644]
plugins/org.eclipse.emf.compare.tests/src/org/eclipse/emf/compare/tests/match/data/rootid/twoway/a2/left2.nodes [new file with mode: 0644]
plugins/org.eclipse.emf.compare.tests/src/org/eclipse/emf/compare/tests/match/data/rootid/twoway/a2/right.nodes [new file with mode: 0644]
plugins/org.eclipse.emf.compare.tests/src/org/eclipse/emf/compare/tests/match/data/rootid/twoway/a2/right2.nodes [new file with mode: 0644]
plugins/org.eclipse.emf.compare.tests/src/org/eclipse/emf/compare/tests/match/data/rootid/twoway/a3/left.nodes [new file with mode: 0644]
plugins/org.eclipse.emf.compare.tests/src/org/eclipse/emf/compare/tests/match/data/rootid/twoway/a3/left2.nodes [new file with mode: 0644]
plugins/org.eclipse.emf.compare.tests/src/org/eclipse/emf/compare/tests/match/data/rootid/twoway/a3/right.nodes [new file with mode: 0644]
plugins/org.eclipse.emf.compare.tests/src/org/eclipse/emf/compare/tests/match/data/rootid/twoway/a3/right2.nodes [new file with mode: 0644]
plugins/org.eclipse.emf.compare.tests/src/org/eclipse/emf/compare/tests/match/data/rootid/twoway/a4/left.nodes [new file with mode: 0644]
plugins/org.eclipse.emf.compare.tests/src/org/eclipse/emf/compare/tests/match/data/rootid/twoway/a4/left2.nodes [new file with mode: 0644]
plugins/org.eclipse.emf.compare.tests/src/org/eclipse/emf/compare/tests/match/data/rootid/twoway/a4/right.nodes [new file with mode: 0644]
plugins/org.eclipse.emf.compare.tests/src/org/eclipse/emf/compare/tests/match/data/rootid/twoway/a4/right2.nodes [new file with mode: 0644]
plugins/org.eclipse.emf.compare.tests/src/org/eclipse/emf/compare/tests/match/data/rootid/twoway/a5/left.nodes [new file with mode: 0644]
plugins/org.eclipse.emf.compare.tests/src/org/eclipse/emf/compare/tests/match/data/rootid/twoway/a5/left2.nodes [new file with mode: 0644]
plugins/org.eclipse.emf.compare.tests/src/org/eclipse/emf/compare/tests/match/data/rootid/twoway/a5/right.nodes [new file with mode: 0644]
plugins/org.eclipse.emf.compare.tests/src/org/eclipse/emf/compare/tests/match/data/rootid/twoway/a5/right2.nodes [new file with mode: 0644]
plugins/org.eclipse.emf.compare.tests/src/org/eclipse/emf/compare/tests/match/data/rootid/twoway/a6/left.nodes [new file with mode: 0644]
plugins/org.eclipse.emf.compare.tests/src/org/eclipse/emf/compare/tests/match/data/rootid/twoway/a6/left2.nodes [new file with mode: 0644]
plugins/org.eclipse.emf.compare.tests/src/org/eclipse/emf/compare/tests/match/data/rootid/twoway/a6/right.nodes [new file with mode: 0644]
plugins/org.eclipse.emf.compare.tests/src/org/eclipse/emf/compare/tests/match/data/rootid/twoway/a6/right2.nodes [new file with mode: 0644]
plugins/org.eclipse.emf.compare.tests/src/org/eclipse/emf/compare/tests/suite/AllTests.java
plugins/org.eclipse.emf.compare/src/org/eclipse/emf/compare/match/resource/RootIDMatchingStrategy.java