Skip to main content
summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMathieu Cartaud2016-06-15 04:13:57 -0400
committerMathieu Cartaud2016-06-15 10:29:59 -0400
commit6477d1125eebfd494f4a3d1a666519e24daedf9d (patch)
treedf98e6aaac6dfb813ea055617a1ce1387064f041 /plugins/org.eclipse.emf.compare.tests/src/org/eclipse
parent5722fba2307aeda65d7367dd302bcd9b20f02a7a (diff)
downloadorg.eclipse.emf.compare-6477d1125eebfd494f4a3d1a666519e24daedf9d.tar.gz
org.eclipse.emf.compare-6477d1125eebfd494f4a3d1a666519e24daedf9d.tar.xz
org.eclipse.emf.compare-6477d1125eebfd494f4a3d1a666519e24daedf9d.zip
Switch to Eclipse mars.2
Format all non generated classes to get ride of formatter incompatibilities Migrate checkstyle config for checkstyle 6.19 Change-Id: I8c2b31765053a3686de62320f893bedf4ad81d1f Signed-off-by: Mathieu Cartaud <mathieu.cartaud@obeo.fr>
Diffstat (limited to 'plugins/org.eclipse.emf.compare.tests/src/org/eclipse')
-rw-r--r--plugins/org.eclipse.emf.compare.tests/src/org/eclipse/emf/compare/tests/adapterfactory/EMFCompareAdapterFactoryTest.java12
-rw-r--r--plugins/org.eclipse.emf.compare.tests/src/org/eclipse/emf/compare/tests/command/TestTransactionalDualCompareCommandStack.java13
-rw-r--r--plugins/org.eclipse.emf.compare.tests/src/org/eclipse/emf/compare/tests/conflict/ConflictDetectionTest.java537
-rw-r--r--plugins/org.eclipse.emf.compare.tests/src/org/eclipse/emf/compare/tests/diff/ComparisonUtilTest.java8
-rw-r--r--plugins/org.eclipse.emf.compare.tests/src/org/eclipse/emf/compare/tests/diff/DiffUtilTest.java42
-rw-r--r--plugins/org.eclipse.emf.compare.tests/src/org/eclipse/emf/compare/tests/diff/ThreeWayTextDiffTest.java6
-rw-r--r--plugins/org.eclipse.emf.compare.tests/src/org/eclipse/emf/compare/tests/diff/URIDistanceTest.java6
-rw-r--r--plugins/org.eclipse.emf.compare.tests/src/org/eclipse/emf/compare/tests/edit/AbstractTestCompareItemProviderAdapter.java4
-rw-r--r--plugins/org.eclipse.emf.compare.tests/src/org/eclipse/emf/compare/tests/edit/TestAttributeChangeItemProviderSpec.java8
-rw-r--r--plugins/org.eclipse.emf.compare.tests/src/org/eclipse/emf/compare/tests/edit/TestReferenceChangeItemProviderSpec.java68
-rw-r--r--plugins/org.eclipse.emf.compare.tests/src/org/eclipse/emf/compare/tests/equi/EquiComputingTest.java84
-rw-r--r--plugins/org.eclipse.emf.compare.tests/src/org/eclipse/emf/compare/tests/fragmentation/FragmentationTest.java64
-rw-r--r--plugins/org.eclipse.emf.compare.tests/src/org/eclipse/emf/compare/tests/fragmentation/ResourceAttachmentChangeBug492261.java16
-rw-r--r--plugins/org.eclipse.emf.compare.tests/src/org/eclipse/emf/compare/tests/framework/EMFCompareAssert.java19
-rw-r--r--plugins/org.eclipse.emf.compare.tests/src/org/eclipse/emf/compare/tests/framework/junit/internal/ConflictStatement.java12
-rw-r--r--plugins/org.eclipse.emf.compare.tests/src/org/eclipse/emf/compare/tests/framework/junit/internal/DiffStatement.java12
-rw-r--r--plugins/org.eclipse.emf.compare.tests/src/org/eclipse/emf/compare/tests/framework/junit/internal/MatchStatement.java12
-rw-r--r--plugins/org.eclipse.emf.compare.tests/src/org/eclipse/emf/compare/tests/framework/junit/internal/UseCaseRunner.java4
-rw-r--r--plugins/org.eclipse.emf.compare.tests/src/org/eclipse/emf/compare/tests/fullcomparison/DistanceAxiomsTests.java7
-rw-r--r--plugins/org.eclipse.emf.compare.tests/src/org/eclipse/emf/compare/tests/fullcomparison/DynamicInstanceComparisonTest.java24
-rw-r--r--plugins/org.eclipse.emf.compare.tests/src/org/eclipse/emf/compare/tests/fullcomparison/ExtLibraryTest.java4
-rw-r--r--plugins/org.eclipse.emf.compare.tests/src/org/eclipse/emf/compare/tests/fullcomparison/IdentifierComparisonTest.java34
-rw-r--r--plugins/org.eclipse.emf.compare.tests/src/org/eclipse/emf/compare/tests/fullcomparison/MatchPerformanceComparisonTest.java12
-rw-r--r--plugins/org.eclipse.emf.compare.tests/src/org/eclipse/emf/compare/tests/fullcomparison/ProximityComparisonTest.java25
-rw-r--r--plugins/org.eclipse.emf.compare.tests/src/org/eclipse/emf/compare/tests/match/IdentifierEObjectMatcherTest.java4
-rw-r--r--plugins/org.eclipse.emf.compare.tests/src/org/eclipse/emf/compare/tests/match/ProximityIndexTest.java3
-rw-r--r--plugins/org.eclipse.emf.compare.tests/src/org/eclipse/emf/compare/tests/match/RootIDMatchingTest.java3
-rw-r--r--plugins/org.eclipse.emf.compare.tests/src/org/eclipse/emf/compare/tests/merge/Bug485266_MoveDeleteConflict_Test.java4
-rw-r--r--plugins/org.eclipse.emf.compare.tests/src/org/eclipse/emf/compare/tests/merge/ComplexMergeTest.java19
-rw-r--r--plugins/org.eclipse.emf.compare.tests/src/org/eclipse/emf/compare/tests/merge/ConflictImplicationsTest_Bug484579.java16
-rw-r--r--plugins/org.eclipse.emf.compare.tests/src/org/eclipse/emf/compare/tests/merge/ConflictMergeTest.java132
-rw-r--r--plugins/org.eclipse.emf.compare.tests/src/org/eclipse/emf/compare/tests/merge/FeatureMaps2wayMergeTest.java164
-rw-r--r--plugins/org.eclipse.emf.compare.tests/src/org/eclipse/emf/compare/tests/merge/FeatureMaps3wayMergeTest.java68
-rw-r--r--plugins/org.eclipse.emf.compare.tests/src/org/eclipse/emf/compare/tests/merge/IndividualMergeOutOfScopeValuesTest.java8
-rw-r--r--plugins/org.eclipse.emf.compare.tests/src/org/eclipse/emf/compare/tests/merge/IndividualMergeTest.java104
-rw-r--r--plugins/org.eclipse.emf.compare.tests/src/org/eclipse/emf/compare/tests/merge/MultipleMergeTest.java68
-rw-r--r--plugins/org.eclipse.emf.compare.tests/src/org/eclipse/emf/compare/tests/merge/PseudoConflictMergeTest.java48
-rw-r--r--plugins/org.eclipse.emf.compare.tests/src/org/eclipse/emf/compare/tests/merge/data/IndividualDiffInputData.java27
-rw-r--r--plugins/org.eclipse.emf.compare.tests/src/org/eclipse/emf/compare/tests/merge/data/TwoWayMergeInputData.java15
-rw-r--r--plugins/org.eclipse.emf.compare.tests/src/org/eclipse/emf/compare/tests/postprocess/PostProcessorTest.java42
-rw-r--r--plugins/org.eclipse.emf.compare.tests/src/org/eclipse/emf/compare/tests/req/ReqComputingTest.java32
-rw-r--r--plugins/org.eclipse.emf.compare.tests/src/org/eclipse/emf/compare/tests/scope/DefaultComparisonScopeTest.java20
-rw-r--r--plugins/org.eclipse.emf.compare.tests/src/org/eclipse/emf/compare/tests/suite/AllTests.java4
-rw-r--r--plugins/org.eclipse.emf.compare.tests/src/org/eclipse/emf/compare/tests/utils/GraphTest.java48
44 files changed, 939 insertions, 923 deletions
diff --git a/plugins/org.eclipse.emf.compare.tests/src/org/eclipse/emf/compare/tests/adapterfactory/EMFCompareAdapterFactoryTest.java b/plugins/org.eclipse.emf.compare.tests/src/org/eclipse/emf/compare/tests/adapterfactory/EMFCompareAdapterFactoryTest.java
index 31cd296f7..95718cb3f 100644
--- a/plugins/org.eclipse.emf.compare.tests/src/org/eclipse/emf/compare/tests/adapterfactory/EMFCompareAdapterFactoryTest.java
+++ b/plugins/org.eclipse.emf.compare.tests/src/org/eclipse/emf/compare/tests/adapterfactory/EMFCompareAdapterFactoryTest.java
@@ -52,16 +52,16 @@ public class EMFCompareAdapterFactoryTest {
key.add("http://www.eclipse.org/emf/compare");
key.add("org.eclipse.emf.compare.provider.IItemStyledLabelProvider");
- registry.put(key, new TestEMFCompareAdapterFactoryDescriptor(
- new CompareItemProviderAdapterFactorySpec2(), 10));
- registry.put(key, new TestEMFCompareAdapterFactoryDescriptor(
- new CompareItemProviderAdapterFactorySpec3(), 20));
+ registry.put(key,
+ new TestEMFCompareAdapterFactoryDescriptor(new CompareItemProviderAdapterFactorySpec2(), 10));
+ registry.put(key,
+ new TestEMFCompareAdapterFactoryDescriptor(new CompareItemProviderAdapterFactorySpec3(), 20));
final Collection<String> keyIItemLabelProvider = new ArrayList<String>();
keyIItemLabelProvider.add("http://www.eclipse.org/emf/compare");
keyIItemLabelProvider.add("org.eclipse.emf.edit.provider.IItemLabelProvider");
- registry.put(keyIItemLabelProvider, new TestEMFCompareAdapterFactoryDescriptor(
- new CompareItemProviderAdapterFactorySpec2(), 30));
+ registry.put(keyIItemLabelProvider,
+ new TestEMFCompareAdapterFactoryDescriptor(new CompareItemProviderAdapterFactorySpec2(), 30));
final AdapterFactory fAdapterFactory = new ComposedAdapterFactory(rankedRegistry);
diff --git a/plugins/org.eclipse.emf.compare.tests/src/org/eclipse/emf/compare/tests/command/TestTransactionalDualCompareCommandStack.java b/plugins/org.eclipse.emf.compare.tests/src/org/eclipse/emf/compare/tests/command/TestTransactionalDualCompareCommandStack.java
index 8d7a46929..bfc6f48ed 100644
--- a/plugins/org.eclipse.emf.compare.tests/src/org/eclipse/emf/compare/tests/command/TestTransactionalDualCompareCommandStack.java
+++ b/plugins/org.eclipse.emf.compare.tests/src/org/eclipse/emf/compare/tests/command/TestTransactionalDualCompareCommandStack.java
@@ -52,19 +52,20 @@ public class TestTransactionalDualCompareCommandStack extends AbstractTestCompar
TransactionalCommandStack leftCommandStack = new TransactionalCommandStackNoValidation();
TransactionalEditingDomain leftEditingDomain = new TransactionalEditingDomainImpl(leftAdapterFactory,
leftCommandStack, leftResourceSet);
- leftResourceSet.eAdapters().add(
- new AdapterFactoryEditingDomain.EditingDomainProvider(leftEditingDomain));
+ leftResourceSet.eAdapters()
+ .add(new AdapterFactoryEditingDomain.EditingDomainProvider(leftEditingDomain));
ComposedAdapterFactory rightAdapterFactory = new ComposedAdapterFactory(
ComposedAdapterFactory.Descriptor.Registry.INSTANCE);
TransactionalCommandStack rightCommandStack = new TransactionalCommandStackNoValidation();
TransactionalEditingDomain rightEditingDomain = new TransactionalEditingDomainImpl(
rightAdapterFactory, rightCommandStack, rightResourceSet);
- rightResourceSet.eAdapters().add(
- new AdapterFactoryEditingDomain.EditingDomainProvider(rightEditingDomain));
+ rightResourceSet.eAdapters()
+ .add(new AdapterFactoryEditingDomain.EditingDomainProvider(rightEditingDomain));
- return new TransactionalDualCompareCommandStack((AbstractTransactionalCommandStack)leftEditingDomain
- .getCommandStack(), (AbstractTransactionalCommandStack)rightEditingDomain.getCommandStack());
+ return new TransactionalDualCompareCommandStack(
+ (AbstractTransactionalCommandStack)leftEditingDomain.getCommandStack(),
+ (AbstractTransactionalCommandStack)rightEditingDomain.getCommandStack());
}
@Test
diff --git a/plugins/org.eclipse.emf.compare.tests/src/org/eclipse/emf/compare/tests/conflict/ConflictDetectionTest.java b/plugins/org.eclipse.emf.compare.tests/src/org/eclipse/emf/compare/tests/conflict/ConflictDetectionTest.java
index e1c5fc814..66d269c48 100644
--- a/plugins/org.eclipse.emf.compare.tests/src/org/eclipse/emf/compare/tests/conflict/ConflictDetectionTest.java
+++ b/plugins/org.eclipse.emf.compare.tests/src/org/eclipse/emf/compare/tests/conflict/ConflictDetectionTest.java
@@ -85,8 +85,8 @@ public class ConflictDetectionTest {
private static Predicate<? super Diff> setOfReference(final String qualifiedName,
final String referenceName, final String addedQualifiedName) {
// This is only meant for multi-valued references
- return and(ofKind(DifferenceKind.ADD), onEObject(qualifiedName), referenceValueMatch(referenceName,
- addedQualifiedName, false));
+ return and(ofKind(DifferenceKind.ADD), onEObject(qualifiedName),
+ referenceValueMatch(referenceName, addedQualifiedName, false));
}
private ConflictInputData input = new ConflictInputData();
@@ -111,10 +111,10 @@ public class ConflictDetectionTest {
"singleValuedAttribute", "origin", "left");
final Predicate<? super Diff> rightDiffDescription = removed("root.conflictHolder");
- final Diff leftDiff = Iterators.find(differences.iterator(), and(fromSide(DifferenceSource.LEFT),
- leftDiffDescription));
- final Diff rightDiff = Iterators.find(differences.iterator(), and(fromSide(DifferenceSource.RIGHT),
- rightDiffDescription));
+ final Diff leftDiff = Iterators.find(differences.iterator(),
+ and(fromSide(DifferenceSource.LEFT), leftDiffDescription));
+ final Diff rightDiff = Iterators.find(differences.iterator(),
+ and(fromSide(DifferenceSource.RIGHT), rightDiffDescription));
assertNotNull(leftDiff);
assertNotNull(rightDiff);
@@ -155,12 +155,12 @@ public class ConflictDetectionTest {
"singleValuedReference", "root.origin", null);
final Predicate<? super Diff> rightDeleteDiffDescription = removed("root.conflictHolder");
- final Diff leftReferenceDiff = Iterators.find(differences.iterator(), and(
- fromSide(DifferenceSource.LEFT), leftReferenceDiffDescription));
- final Diff rightReferenceDiff = Iterators.find(differences.iterator(), and(
- fromSide(DifferenceSource.RIGHT), rightReferenceDiffDescription));
- final Diff rightDeleteDiff = Iterators.find(differences.iterator(), and(
- fromSide(DifferenceSource.RIGHT), rightDeleteDiffDescription));
+ final Diff leftReferenceDiff = Iterators.find(differences.iterator(),
+ and(fromSide(DifferenceSource.LEFT), leftReferenceDiffDescription));
+ final Diff rightReferenceDiff = Iterators.find(differences.iterator(),
+ and(fromSide(DifferenceSource.RIGHT), rightReferenceDiffDescription));
+ final Diff rightDeleteDiff = Iterators.find(differences.iterator(),
+ and(fromSide(DifferenceSource.RIGHT), rightDeleteDiffDescription));
assertNotNull(leftReferenceDiff);
assertNotNull(rightReferenceDiff);
@@ -196,10 +196,10 @@ public class ConflictDetectionTest {
"singleValuedAttribute", null, "left");
final Predicate<? super Diff> rightDiffDescription = removed("root.conflictHolder");
- final Diff leftDiff = Iterators.find(differences.iterator(), and(fromSide(DifferenceSource.LEFT),
- leftDiffDescription));
- final Diff rightDiff = Iterators.find(differences.iterator(), and(fromSide(DifferenceSource.RIGHT),
- rightDiffDescription));
+ final Diff leftDiff = Iterators.find(differences.iterator(),
+ and(fromSide(DifferenceSource.LEFT), leftDiffDescription));
+ final Diff rightDiff = Iterators.find(differences.iterator(),
+ and(fromSide(DifferenceSource.RIGHT), rightDiffDescription));
assertNotNull(leftDiff);
assertNotNull(rightDiff);
@@ -234,10 +234,10 @@ public class ConflictDetectionTest {
"singleValuedReference", null, "root.left");
final Predicate<? super Diff> rightDiffDescription = removed("root.conflictHolder");
- final Diff leftDiff = Iterators.find(differences.iterator(), and(fromSide(DifferenceSource.LEFT),
- leftDiffDescription));
- final Diff rightDiff = Iterators.find(differences.iterator(), and(fromSide(DifferenceSource.RIGHT),
- rightDiffDescription));
+ final Diff leftDiff = Iterators.find(differences.iterator(),
+ and(fromSide(DifferenceSource.LEFT), leftDiffDescription));
+ final Diff rightDiff = Iterators.find(differences.iterator(),
+ and(fromSide(DifferenceSource.RIGHT), rightDiffDescription));
assertNotNull(leftDiff);
assertNotNull(rightDiff);
@@ -272,10 +272,10 @@ public class ConflictDetectionTest {
"singleValuedAttribute", "origin", null);
final Predicate<? super Diff> rightDiffDescription = removed("root.conflictHolder");
- final Diff leftDiff = Iterators.find(differences.iterator(), and(fromSide(DifferenceSource.LEFT),
- leftDiffDescription));
- final Diff rightDiff = Iterators.find(differences.iterator(), and(fromSide(DifferenceSource.RIGHT),
- rightDiffDescription));
+ final Diff leftDiff = Iterators.find(differences.iterator(),
+ and(fromSide(DifferenceSource.LEFT), leftDiffDescription));
+ final Diff rightDiff = Iterators.find(differences.iterator(),
+ and(fromSide(DifferenceSource.RIGHT), rightDiffDescription));
assertNotNull(leftDiff);
assertNotNull(rightDiff);
@@ -316,12 +316,12 @@ public class ConflictDetectionTest {
"singleValuedReference", "root.origin", null);
final Predicate<? super Diff> rightDeleteDiffDescription = removed("root.conflictHolder");
- final Diff leftReferenceDiff = Iterators.find(differences.iterator(), and(
- fromSide(DifferenceSource.LEFT), leftReferenceDiffDescription));
- final Diff rightReferenceDiff = Iterators.find(differences.iterator(), and(
- fromSide(DifferenceSource.RIGHT), rightReferenceDiffDescription));
- final Diff rightDeleteDiff = Iterators.find(differences.iterator(), and(
- fromSide(DifferenceSource.RIGHT), rightDeleteDiffDescription));
+ final Diff leftReferenceDiff = Iterators.find(differences.iterator(),
+ and(fromSide(DifferenceSource.LEFT), leftReferenceDiffDescription));
+ final Diff rightReferenceDiff = Iterators.find(differences.iterator(),
+ and(fromSide(DifferenceSource.RIGHT), rightReferenceDiffDescription));
+ final Diff rightDeleteDiff = Iterators.find(differences.iterator(),
+ and(fromSide(DifferenceSource.RIGHT), rightDeleteDiffDescription));
assertNotNull(leftReferenceDiff);
assertNotNull(rightReferenceDiff);
@@ -359,10 +359,10 @@ public class ConflictDetectionTest {
final Predicate<? super Diff> rightDiffDescription = changedAttribute("root.conflictHolder",
"singleValuedAttribute", "origin", "right");
- final Diff leftDiff = Iterators.find(differences.iterator(), and(fromSide(DifferenceSource.LEFT),
- leftDiffDescription));
- final Diff rightDiff = Iterators.find(differences.iterator(), and(fromSide(DifferenceSource.RIGHT),
- rightDiffDescription));
+ final Diff leftDiff = Iterators.find(differences.iterator(),
+ and(fromSide(DifferenceSource.LEFT), leftDiffDescription));
+ final Diff rightDiff = Iterators.find(differences.iterator(),
+ and(fromSide(DifferenceSource.RIGHT), rightDiffDescription));
assertNotNull(leftDiff);
assertNotNull(rightDiff);
@@ -398,10 +398,10 @@ public class ConflictDetectionTest {
final Predicate<? super Diff> rightDiffDescription = changedReference("root.conflictHolder",
"singleValuedReference", "root.origin", "root.right");
- final Diff leftDiff = Iterators.find(differences.iterator(), and(fromSide(DifferenceSource.LEFT),
- leftDiffDescription));
- final Diff rightDiff = Iterators.find(differences.iterator(), and(fromSide(DifferenceSource.RIGHT),
- rightDiffDescription));
+ final Diff leftDiff = Iterators.find(differences.iterator(),
+ and(fromSide(DifferenceSource.LEFT), leftDiffDescription));
+ final Diff rightDiff = Iterators.find(differences.iterator(),
+ and(fromSide(DifferenceSource.RIGHT), rightDiffDescription));
assertNotNull(leftDiff);
assertNotNull(rightDiff);
@@ -437,10 +437,10 @@ public class ConflictDetectionTest {
final Predicate<? super Diff> rightDiffDescription = changedAttribute("root.conflictHolder",
"singleValuedAttribute", "origin", null);
- final Diff leftDiff = Iterators.find(differences.iterator(), and(fromSide(DifferenceSource.LEFT),
- leftDiffDescription));
- final Diff rightDiff = Iterators.find(differences.iterator(), and(fromSide(DifferenceSource.RIGHT),
- rightDiffDescription));
+ final Diff leftDiff = Iterators.find(differences.iterator(),
+ and(fromSide(DifferenceSource.LEFT), leftDiffDescription));
+ final Diff rightDiff = Iterators.find(differences.iterator(),
+ and(fromSide(DifferenceSource.RIGHT), rightDiffDescription));
assertNotNull(leftDiff);
assertNotNull(rightDiff);
@@ -476,10 +476,10 @@ public class ConflictDetectionTest {
final Predicate<? super Diff> rightDiffDescription = changedReference("root.conflictHolder",
"singleValuedReference", "root.origin", null);
- final Diff leftDiff = Iterators.find(differences.iterator(), and(fromSide(DifferenceSource.LEFT),
- leftDiffDescription));
- final Diff rightDiff = Iterators.find(differences.iterator(), and(fromSide(DifferenceSource.RIGHT),
- rightDiffDescription));
+ final Diff leftDiff = Iterators.find(differences.iterator(),
+ and(fromSide(DifferenceSource.LEFT), leftDiffDescription));
+ final Diff rightDiff = Iterators.find(differences.iterator(),
+ and(fromSide(DifferenceSource.RIGHT), rightDiffDescription));
assertNotNull(leftDiff);
assertNotNull(rightDiff);
@@ -515,10 +515,10 @@ public class ConflictDetectionTest {
final Predicate<? super Diff> rightDiffDescription = changedAttribute("root.conflictHolder",
"singleValuedAttribute", null, "right");
- final Diff leftDiff = Iterators.find(differences.iterator(), and(fromSide(DifferenceSource.LEFT),
- leftDiffDescription));
- final Diff rightDiff = Iterators.find(differences.iterator(), and(fromSide(DifferenceSource.RIGHT),
- rightDiffDescription));
+ final Diff leftDiff = Iterators.find(differences.iterator(),
+ and(fromSide(DifferenceSource.LEFT), leftDiffDescription));
+ final Diff rightDiff = Iterators.find(differences.iterator(),
+ and(fromSide(DifferenceSource.RIGHT), rightDiffDescription));
assertNotNull(leftDiff);
assertNotNull(rightDiff);
@@ -554,10 +554,10 @@ public class ConflictDetectionTest {
final Predicate<? super Diff> rightDiffDescription = changedReference("root.conflictHolder",
"singleValuedReference", null, "root.right");
- final Diff leftDiff = Iterators.find(differences.iterator(), and(fromSide(DifferenceSource.LEFT),
- leftDiffDescription));
- final Diff rightDiff = Iterators.find(differences.iterator(), and(fromSide(DifferenceSource.RIGHT),
- rightDiffDescription));
+ final Diff leftDiff = Iterators.find(differences.iterator(),
+ and(fromSide(DifferenceSource.LEFT), leftDiffDescription));
+ final Diff rightDiff = Iterators.find(differences.iterator(),
+ and(fromSide(DifferenceSource.RIGHT), rightDiffDescription));
assertNotNull(leftDiff);
assertNotNull(rightDiff);
@@ -593,10 +593,10 @@ public class ConflictDetectionTest {
final Predicate<? super Diff> rightDiffDescription = setOfReference("root.conflictHolder",
"singleValueContainment", "root.conflictHolder.newright");
- final Diff leftDiff = Iterators.find(differences.iterator(), and(fromSide(DifferenceSource.LEFT),
- leftDiffDescription));
- final Diff rightDiff = Iterators.find(differences.iterator(), and(fromSide(DifferenceSource.RIGHT),
- rightDiffDescription));
+ final Diff leftDiff = Iterators.find(differences.iterator(),
+ and(fromSide(DifferenceSource.LEFT), leftDiffDescription));
+ final Diff rightDiff = Iterators.find(differences.iterator(),
+ and(fromSide(DifferenceSource.RIGHT), rightDiffDescription));
assertNotNull(leftDiff);
assertNotNull(rightDiff);
@@ -632,10 +632,10 @@ public class ConflictDetectionTest {
final Predicate<? super Diff> rightDiffDescription = changedAttribute("root.conflictHolder",
"singleValuedAttribute", "origin", "right");
- final Diff leftDiff = Iterators.find(differences.iterator(), and(fromSide(DifferenceSource.LEFT),
- leftDiffDescription));
- final Diff rightDiff = Iterators.find(differences.iterator(), and(fromSide(DifferenceSource.RIGHT),
- rightDiffDescription));
+ final Diff leftDiff = Iterators.find(differences.iterator(),
+ and(fromSide(DifferenceSource.LEFT), leftDiffDescription));
+ final Diff rightDiff = Iterators.find(differences.iterator(),
+ and(fromSide(DifferenceSource.RIGHT), rightDiffDescription));
assertNotNull(leftDiff);
assertNotNull(rightDiff);
@@ -671,10 +671,10 @@ public class ConflictDetectionTest {
final Predicate<? super Diff> rightDiffDescription = changedReference("root.conflictHolder",
"singleValuedReference", "root.origin", "root.right");
- final Diff leftDiff = Iterators.find(differences.iterator(), and(fromSide(DifferenceSource.LEFT),
- leftDiffDescription));
- final Diff rightDiff = Iterators.find(differences.iterator(), and(fromSide(DifferenceSource.RIGHT),
- rightDiffDescription));
+ final Diff leftDiff = Iterators.find(differences.iterator(),
+ and(fromSide(DifferenceSource.LEFT), leftDiffDescription));
+ final Diff rightDiff = Iterators.find(differences.iterator(),
+ and(fromSide(DifferenceSource.RIGHT), rightDiffDescription));
assertNotNull(leftDiff);
assertNotNull(rightDiff);
@@ -710,10 +710,10 @@ public class ConflictDetectionTest {
final Predicate<? super Diff> rightDiffDescription = changedAttribute("root.conflictHolder",
"singleValuedAttribute", null, "leftAndRight");
- final Diff leftDiff = Iterators.find(differences.iterator(), and(fromSide(DifferenceSource.LEFT),
- leftDiffDescription));
- final Diff rightDiff = Iterators.find(differences.iterator(), and(fromSide(DifferenceSource.RIGHT),
- rightDiffDescription));
+ final Diff leftDiff = Iterators.find(differences.iterator(),
+ and(fromSide(DifferenceSource.LEFT), leftDiffDescription));
+ final Diff rightDiff = Iterators.find(differences.iterator(),
+ and(fromSide(DifferenceSource.RIGHT), rightDiffDescription));
assertNotNull(leftDiff);
assertNotNull(rightDiff);
@@ -749,10 +749,10 @@ public class ConflictDetectionTest {
final Predicate<? super Diff> rightDiffDescription = changedReference("root.conflictHolder",
"singleValuedReference", null, "root.leftAndRight");
- final Diff leftDiff = Iterators.find(differences.iterator(), and(fromSide(DifferenceSource.LEFT),
- leftDiffDescription));
- final Diff rightDiff = Iterators.find(differences.iterator(), and(fromSide(DifferenceSource.RIGHT),
- rightDiffDescription));
+ final Diff leftDiff = Iterators.find(differences.iterator(),
+ and(fromSide(DifferenceSource.LEFT), leftDiffDescription));
+ final Diff rightDiff = Iterators.find(differences.iterator(),
+ and(fromSide(DifferenceSource.RIGHT), rightDiffDescription));
assertNotNull(leftDiff);
assertNotNull(rightDiff);
@@ -788,10 +788,10 @@ public class ConflictDetectionTest {
final Predicate<? super Diff> rightDiffDescription = changedAttribute("root.conflictHolder",
"singleValuedAttribute", "origin", null);
- final Diff leftDiff = Iterators.find(differences.iterator(), and(fromSide(DifferenceSource.LEFT),
- leftDiffDescription));
- final Diff rightDiff = Iterators.find(differences.iterator(), and(fromSide(DifferenceSource.RIGHT),
- rightDiffDescription));
+ final Diff leftDiff = Iterators.find(differences.iterator(),
+ and(fromSide(DifferenceSource.LEFT), leftDiffDescription));
+ final Diff rightDiff = Iterators.find(differences.iterator(),
+ and(fromSide(DifferenceSource.RIGHT), rightDiffDescription));
assertNotNull(leftDiff);
assertNotNull(rightDiff);
@@ -827,10 +827,10 @@ public class ConflictDetectionTest {
final Predicate<? super Diff> rightDiffDescription = changedReference("root.conflictHolder",
"singleValuedReference", "root.origin", null);
- final Diff leftDiff = Iterators.find(differences.iterator(), and(fromSide(DifferenceSource.LEFT),
- leftDiffDescription));
- final Diff rightDiff = Iterators.find(differences.iterator(), and(fromSide(DifferenceSource.RIGHT),
- rightDiffDescription));
+ final Diff leftDiff = Iterators.find(differences.iterator(),
+ and(fromSide(DifferenceSource.LEFT), leftDiffDescription));
+ final Diff rightDiff = Iterators.find(differences.iterator(),
+ and(fromSide(DifferenceSource.RIGHT), rightDiffDescription));
assertNotNull(leftDiff);
assertNotNull(rightDiff);
@@ -865,10 +865,10 @@ public class ConflictDetectionTest {
"multiValuedAttribute", "left1");
final Predicate<? super Diff> rightDiffDescription = removed("root.conflictHolder");
- final Diff leftDiff = Iterators.find(differences.iterator(), and(fromSide(DifferenceSource.LEFT),
- leftDiffDescription));
- final Diff rightDiff = Iterators.find(differences.iterator(), and(fromSide(DifferenceSource.RIGHT),
- rightDiffDescription));
+ final Diff leftDiff = Iterators.find(differences.iterator(),
+ and(fromSide(DifferenceSource.LEFT), leftDiffDescription));
+ final Diff rightDiff = Iterators.find(differences.iterator(),
+ and(fromSide(DifferenceSource.RIGHT), rightDiffDescription));
assertNotNull(leftDiff);
assertNotNull(rightDiff);
@@ -914,16 +914,16 @@ public class ConflictDetectionTest {
final Predicate<? super Diff> rightReferenceDiff3Description = removedFromReference(
"root.conflictHolder", "multiValuedReference", "root.origin3");
- final Diff leftReferenceDiff = Iterators.find(differences.iterator(), and(
- fromSide(DifferenceSource.LEFT), leftReferenceDiffDescription));
- final Diff rightDeleteDiff = Iterators.find(differences.iterator(), and(
- fromSide(DifferenceSource.RIGHT), rightDeleteDiffDescription));
- final Diff rightReferenceDiff1 = Iterators.find(differences.iterator(), and(
- fromSide(DifferenceSource.RIGHT), rightReferenceDiff1Description));
- final Diff rightReferenceDiff2 = Iterators.find(differences.iterator(), and(
- fromSide(DifferenceSource.RIGHT), rightReferenceDiff2Description));
- final Diff rightReferenceDiff3 = Iterators.find(differences.iterator(), and(
- fromSide(DifferenceSource.RIGHT), rightReferenceDiff3Description));
+ final Diff leftReferenceDiff = Iterators.find(differences.iterator(),
+ and(fromSide(DifferenceSource.LEFT), leftReferenceDiffDescription));
+ final Diff rightDeleteDiff = Iterators.find(differences.iterator(),
+ and(fromSide(DifferenceSource.RIGHT), rightDeleteDiffDescription));
+ final Diff rightReferenceDiff1 = Iterators.find(differences.iterator(),
+ and(fromSide(DifferenceSource.RIGHT), rightReferenceDiff1Description));
+ final Diff rightReferenceDiff2 = Iterators.find(differences.iterator(),
+ and(fromSide(DifferenceSource.RIGHT), rightReferenceDiff2Description));
+ final Diff rightReferenceDiff3 = Iterators.find(differences.iterator(),
+ and(fromSide(DifferenceSource.RIGHT), rightReferenceDiff3Description));
assertNotNull(leftReferenceDiff);
assertNotNull(rightDeleteDiff);
@@ -961,10 +961,10 @@ public class ConflictDetectionTest {
"multiValuedAttribute", "origin1");
final Predicate<? super Diff> rightDiffDescription = removed("root.conflictHolder");
- final Diff leftDiff = Iterators.find(differences.iterator(), and(fromSide(DifferenceSource.LEFT),
- leftDiffDescription));
- final Diff rightDiff = Iterators.find(differences.iterator(), and(fromSide(DifferenceSource.RIGHT),
- rightDiffDescription));
+ final Diff leftDiff = Iterators.find(differences.iterator(),
+ and(fromSide(DifferenceSource.LEFT), leftDiffDescription));
+ final Diff rightDiff = Iterators.find(differences.iterator(),
+ and(fromSide(DifferenceSource.RIGHT), rightDiffDescription));
assertNotNull(leftDiff);
assertNotNull(rightDiff);
@@ -1011,16 +1011,16 @@ public class ConflictDetectionTest {
final Predicate<? super Diff> rightReferenceDiff3Description = removedFromReference(
"root.conflictHolder", "multiValuedReference", "root.origin3");
- final Diff leftReferenceDiff = Iterators.find(differences.iterator(), and(
- fromSide(DifferenceSource.LEFT), leftReferenceDiffDescription));
- final Diff rightDeleteDiff = Iterators.find(differences.iterator(), and(
- fromSide(DifferenceSource.RIGHT), rightDeleteDiffDescription));
- final Diff rightReferenceDiff1 = Iterators.find(differences.iterator(), and(
- fromSide(DifferenceSource.RIGHT), rightReferenceDiff1Description));
- final Diff rightReferenceDiff2 = Iterators.find(differences.iterator(), and(
- fromSide(DifferenceSource.RIGHT), rightReferenceDiff2Description));
- final Diff rightReferenceDiff3 = Iterators.find(differences.iterator(), and(
- fromSide(DifferenceSource.RIGHT), rightReferenceDiff3Description));
+ final Diff leftReferenceDiff = Iterators.find(differences.iterator(),
+ and(fromSide(DifferenceSource.LEFT), leftReferenceDiffDescription));
+ final Diff rightDeleteDiff = Iterators.find(differences.iterator(),
+ and(fromSide(DifferenceSource.RIGHT), rightDeleteDiffDescription));
+ final Diff rightReferenceDiff1 = Iterators.find(differences.iterator(),
+ and(fromSide(DifferenceSource.RIGHT), rightReferenceDiff1Description));
+ final Diff rightReferenceDiff2 = Iterators.find(differences.iterator(),
+ and(fromSide(DifferenceSource.RIGHT), rightReferenceDiff2Description));
+ final Diff rightReferenceDiff3 = Iterators.find(differences.iterator(),
+ and(fromSide(DifferenceSource.RIGHT), rightReferenceDiff3Description));
assertNotNull(leftReferenceDiff);
assertNotNull(rightDeleteDiff);
@@ -1059,10 +1059,10 @@ public class ConflictDetectionTest {
"multiValuedAttribute", "left1");
final Predicate<? super Diff> rightDiffDescription = removed("root.conflictHolder");
- final Diff leftDiff = Iterators.find(differences.iterator(), and(fromSide(DifferenceSource.LEFT),
- leftDiffDescription));
- final Diff rightDiff = Iterators.find(differences.iterator(), and(fromSide(DifferenceSource.RIGHT),
- rightDiffDescription));
+ final Diff leftDiff = Iterators.find(differences.iterator(),
+ and(fromSide(DifferenceSource.LEFT), leftDiffDescription));
+ final Diff rightDiff = Iterators.find(differences.iterator(),
+ and(fromSide(DifferenceSource.RIGHT), rightDiffDescription));
assertNotNull(leftDiff);
assertNotNull(rightDiff);
@@ -1097,10 +1097,10 @@ public class ConflictDetectionTest {
"multiValuedReference", "root.left1");
final Predicate<? super Diff> rightDeleteDiffDescription = removed("root.conflictHolder");
- final Diff leftReferenceDiff = Iterators.find(differences.iterator(), and(
- fromSide(DifferenceSource.LEFT), leftReferenceDiffDescription));
- final Diff rightDeleteDiff = Iterators.find(differences.iterator(), and(
- fromSide(DifferenceSource.RIGHT), rightDeleteDiffDescription));
+ final Diff leftReferenceDiff = Iterators.find(differences.iterator(),
+ and(fromSide(DifferenceSource.LEFT), leftReferenceDiffDescription));
+ final Diff rightDeleteDiff = Iterators.find(differences.iterator(),
+ and(fromSide(DifferenceSource.RIGHT), rightDeleteDiffDescription));
assertNotNull(leftReferenceDiff);
assertNotNull(rightDeleteDiff);
@@ -1143,14 +1143,14 @@ public class ConflictDetectionTest {
"root.conflictHolder", "multiValuedAttribute", "origin3");
final Predicate<? super Diff> rightDiffDescription = removed("root.conflictHolder");
- final Diff leftAttributeDiff1 = Iterators.find(differences.iterator(), and(
- fromSide(DifferenceSource.LEFT), leftAttributeDiff1Description));
- final Diff leftAttributeDiff2 = Iterators.find(differences.iterator(), and(
- fromSide(DifferenceSource.LEFT), leftAttributeDiff2Description));
- final Diff leftAttributeDiff3 = Iterators.find(differences.iterator(), and(
- fromSide(DifferenceSource.LEFT), leftAttributeDiff3Description));
- final Diff rightDiff = Iterators.find(differences.iterator(), and(fromSide(DifferenceSource.RIGHT),
- rightDiffDescription));
+ final Diff leftAttributeDiff1 = Iterators.find(differences.iterator(),
+ and(fromSide(DifferenceSource.LEFT), leftAttributeDiff1Description));
+ final Diff leftAttributeDiff2 = Iterators.find(differences.iterator(),
+ and(fromSide(DifferenceSource.LEFT), leftAttributeDiff2Description));
+ final Diff leftAttributeDiff3 = Iterators.find(differences.iterator(),
+ and(fromSide(DifferenceSource.LEFT), leftAttributeDiff3Description));
+ final Diff rightDiff = Iterators.find(differences.iterator(),
+ and(fromSide(DifferenceSource.RIGHT), rightDiffDescription));
assertNotNull(leftAttributeDiff1);
assertNotNull(leftAttributeDiff2);
@@ -1197,20 +1197,20 @@ public class ConflictDetectionTest {
"multiValuedReference", "root.origin3");
final Predicate<? super Diff> rightDeleteDiffDescription = removed("root.conflictHolder");
- final Diff leftReferenceDiff1 = Iterators.find(differences.iterator(), and(
- fromSide(DifferenceSource.LEFT), referenceDiff1Description));
- final Diff leftReferenceDiff2 = Iterators.find(differences.iterator(), and(
- fromSide(DifferenceSource.LEFT), referenceDiff2Description));
- final Diff leftReferenceDiff3 = Iterators.find(differences.iterator(), and(
- fromSide(DifferenceSource.LEFT), referenceDiff3Description));
- final Diff rightDeleteDiff = Iterators.find(differences.iterator(), and(
- fromSide(DifferenceSource.RIGHT), rightDeleteDiffDescription));
- final Diff rightReferenceDiff1 = Iterators.find(differences.iterator(), and(
- fromSide(DifferenceSource.RIGHT), referenceDiff1Description));
- final Diff rightReferenceDiff2 = Iterators.find(differences.iterator(), and(
- fromSide(DifferenceSource.RIGHT), referenceDiff2Description));
- final Diff rightReferenceDiff3 = Iterators.find(differences.iterator(), and(
- fromSide(DifferenceSource.RIGHT), referenceDiff3Description));
+ final Diff leftReferenceDiff1 = Iterators.find(differences.iterator(),
+ and(fromSide(DifferenceSource.LEFT), referenceDiff1Description));
+ final Diff leftReferenceDiff2 = Iterators.find(differences.iterator(),
+ and(fromSide(DifferenceSource.LEFT), referenceDiff2Description));
+ final Diff leftReferenceDiff3 = Iterators.find(differences.iterator(),
+ and(fromSide(DifferenceSource.LEFT), referenceDiff3Description));
+ final Diff rightDeleteDiff = Iterators.find(differences.iterator(),
+ and(fromSide(DifferenceSource.RIGHT), rightDeleteDiffDescription));
+ final Diff rightReferenceDiff1 = Iterators.find(differences.iterator(),
+ and(fromSide(DifferenceSource.RIGHT), referenceDiff1Description));
+ final Diff rightReferenceDiff2 = Iterators.find(differences.iterator(),
+ and(fromSide(DifferenceSource.RIGHT), referenceDiff2Description));
+ final Diff rightReferenceDiff3 = Iterators.find(differences.iterator(),
+ and(fromSide(DifferenceSource.RIGHT), referenceDiff3Description));
assertNotNull(leftReferenceDiff1);
assertNotNull(leftReferenceDiff2);
@@ -1255,10 +1255,10 @@ public class ConflictDetectionTest {
"multiValuedAttribute", "origin1");
final Predicate<? super Diff> rightDiffDescription = removed("root.conflictHolder");
- final Diff leftDiff = Iterators.find(differences.iterator(), and(fromSide(DifferenceSource.LEFT),
- leftDiffDescription));
- final Diff rightDiff = Iterators.find(differences.iterator(), and(fromSide(DifferenceSource.RIGHT),
- rightDiffDescription));
+ final Diff leftDiff = Iterators.find(differences.iterator(),
+ and(fromSide(DifferenceSource.LEFT), leftDiffDescription));
+ final Diff rightDiff = Iterators.find(differences.iterator(),
+ and(fromSide(DifferenceSource.RIGHT), rightDiffDescription));
assertNotNull(leftDiff);
assertNotNull(rightDiff);
@@ -1303,16 +1303,16 @@ public class ConflictDetectionTest {
final Predicate<? super Diff> rightReferenceDiff3Description = removedFromReference(
"root.conflictHolder", "multiValuedReference", "root.origin2");
- final Diff leftReferenceDiff = Iterators.find(differences.iterator(), and(
- fromSide(DifferenceSource.LEFT), leftReferenceDiffDescription));
- final Diff rightDeleteDiff = Iterators.find(differences.iterator(), and(
- fromSide(DifferenceSource.RIGHT), rightDeleteDiffDescription));
- final Diff rightReferenceDiff1 = Iterators.find(differences.iterator(), and(
- fromSide(DifferenceSource.RIGHT), rightReferenceDiff1Description));
- final Diff rightReferenceDiff2 = Iterators.find(differences.iterator(), and(
- fromSide(DifferenceSource.RIGHT), rightReferenceDiff2Description));
- final Diff rightReferenceDiff3 = Iterators.find(differences.iterator(), and(
- fromSide(DifferenceSource.RIGHT), rightReferenceDiff3Description));
+ final Diff leftReferenceDiff = Iterators.find(differences.iterator(),
+ and(fromSide(DifferenceSource.LEFT), leftReferenceDiffDescription));
+ final Diff rightDeleteDiff = Iterators.find(differences.iterator(),
+ and(fromSide(DifferenceSource.RIGHT), rightDeleteDiffDescription));
+ final Diff rightReferenceDiff1 = Iterators.find(differences.iterator(),
+ and(fromSide(DifferenceSource.RIGHT), rightReferenceDiff1Description));
+ final Diff rightReferenceDiff2 = Iterators.find(differences.iterator(),
+ and(fromSide(DifferenceSource.RIGHT), rightReferenceDiff2Description));
+ final Diff rightReferenceDiff3 = Iterators.find(differences.iterator(),
+ and(fromSide(DifferenceSource.RIGHT), rightReferenceDiff3Description));
assertNotNull(leftReferenceDiff);
assertNotNull(rightDeleteDiff);
@@ -1352,10 +1352,10 @@ public class ConflictDetectionTest {
final Predicate<? super Diff> rightDiffDescription = movedInAttribute("root.conflictHolder",
"multiValuedAttribute", "origin1");
- final Diff leftDiff = Iterators.find(differences.iterator(), and(fromSide(DifferenceSource.LEFT),
- leftDiffDescription));
- final Diff rightDiff = Iterators.find(differences.iterator(), and(fromSide(DifferenceSource.RIGHT),
- rightDiffDescription));
+ final Diff leftDiff = Iterators.find(differences.iterator(),
+ and(fromSide(DifferenceSource.LEFT), leftDiffDescription));
+ final Diff rightDiff = Iterators.find(differences.iterator(),
+ and(fromSide(DifferenceSource.RIGHT), rightDiffDescription));
assertNotNull(leftDiff);
assertNotNull(rightDiff);
@@ -1391,10 +1391,10 @@ public class ConflictDetectionTest {
final Predicate<? super Diff> rightDiffDescription = movedInReference("root.conflictHolder",
"multiValuedReference", "root.origin1");
- final Diff leftDiff = Iterators.find(differences.iterator(), and(fromSide(DifferenceSource.LEFT),
- leftDiffDescription));
- final Diff rightDiff = Iterators.find(differences.iterator(), and(fromSide(DifferenceSource.RIGHT),
- rightDiffDescription));
+ final Diff leftDiff = Iterators.find(differences.iterator(),
+ and(fromSide(DifferenceSource.LEFT), leftDiffDescription));
+ final Diff rightDiff = Iterators.find(differences.iterator(),
+ and(fromSide(DifferenceSource.RIGHT), rightDiffDescription));
assertNotNull(leftDiff);
assertNotNull(rightDiff);
@@ -1430,10 +1430,10 @@ public class ConflictDetectionTest {
final Predicate<? super Diff> rightDiffDescription = removedFromAttribute("root.conflictHolder",
"multiValuedAttribute", "origin1");
- final Diff leftDiff = Iterators.find(differences.iterator(), and(fromSide(DifferenceSource.LEFT),
- leftDiffDescription));
- final Diff rightDiff = Iterators.find(differences.iterator(), and(fromSide(DifferenceSource.RIGHT),
- rightDiffDescription));
+ final Diff leftDiff = Iterators.find(differences.iterator(),
+ and(fromSide(DifferenceSource.LEFT), leftDiffDescription));
+ final Diff rightDiff = Iterators.find(differences.iterator(),
+ and(fromSide(DifferenceSource.RIGHT), rightDiffDescription));
assertNotNull(leftDiff);
assertNotNull(rightDiff);
@@ -1469,10 +1469,10 @@ public class ConflictDetectionTest {
final Predicate<? super Diff> rightDiffDescription = removedFromReference("root.conflictHolder",
"multiValuedReference", "root.origin1");
- final Diff leftDiff = Iterators.find(differences.iterator(), and(fromSide(DifferenceSource.LEFT),
- leftDiffDescription));
- final Diff rightDiff = Iterators.find(differences.iterator(), and(fromSide(DifferenceSource.RIGHT),
- rightDiffDescription));
+ final Diff leftDiff = Iterators.find(differences.iterator(),
+ and(fromSide(DifferenceSource.LEFT), leftDiffDescription));
+ final Diff rightDiff = Iterators.find(differences.iterator(),
+ and(fromSide(DifferenceSource.RIGHT), rightDiffDescription));
assertNotNull(leftDiff);
assertNotNull(rightDiff);
@@ -1508,10 +1508,10 @@ public class ConflictDetectionTest {
final Predicate<? super Diff> rightDiffDescription = movedInAttribute("root.conflictHolder",
"multiValuedAttribute", "origin1");
- final Diff leftDiff = Iterators.find(differences.iterator(), and(fromSide(DifferenceSource.LEFT),
- leftDiffDescription));
- final Diff rightDiff = Iterators.find(differences.iterator(), and(fromSide(DifferenceSource.RIGHT),
- rightDiffDescription));
+ final Diff leftDiff = Iterators.find(differences.iterator(),
+ and(fromSide(DifferenceSource.LEFT), leftDiffDescription));
+ final Diff rightDiff = Iterators.find(differences.iterator(),
+ and(fromSide(DifferenceSource.RIGHT), rightDiffDescription));
assertNotNull(leftDiff);
assertNotNull(rightDiff);
@@ -1547,10 +1547,10 @@ public class ConflictDetectionTest {
final Predicate<? super Diff> rightDiffDescription = movedInReference("root.conflictHolder",
"multiValuedReference", "root.origin1");
- final Diff leftDiff = Iterators.find(differences.iterator(), and(fromSide(DifferenceSource.LEFT),
- leftDiffDescription));
- final Diff rightDiff = Iterators.find(differences.iterator(), and(fromSide(DifferenceSource.RIGHT),
- rightDiffDescription));
+ final Diff leftDiff = Iterators.find(differences.iterator(),
+ and(fromSide(DifferenceSource.LEFT), leftDiffDescription));
+ final Diff rightDiff = Iterators.find(differences.iterator(),
+ and(fromSide(DifferenceSource.RIGHT), rightDiffDescription));
assertNotNull(leftDiff);
assertNotNull(rightDiff);
@@ -1591,19 +1591,19 @@ public class ConflictDetectionTest {
final Predicate<? super Diff> AttributeDiff3Description = removedFromAttribute("root.conflictHolder",
"multiValuedAttribute", "origin3");
- final Diff leftAttributeDiff1 = Iterators.find(differences.iterator(), and(
- fromSide(DifferenceSource.LEFT), AttributeDiff1Description));
- final Diff leftAttributeDiff2 = Iterators.find(differences.iterator(), and(
- fromSide(DifferenceSource.LEFT), AttributeDiff2Description));
- final Diff leftAttributeDiff3 = Iterators.find(differences.iterator(), and(
- fromSide(DifferenceSource.LEFT), AttributeDiff3Description));
+ final Diff leftAttributeDiff1 = Iterators.find(differences.iterator(),
+ and(fromSide(DifferenceSource.LEFT), AttributeDiff1Description));
+ final Diff leftAttributeDiff2 = Iterators.find(differences.iterator(),
+ and(fromSide(DifferenceSource.LEFT), AttributeDiff2Description));
+ final Diff leftAttributeDiff3 = Iterators.find(differences.iterator(),
+ and(fromSide(DifferenceSource.LEFT), AttributeDiff3Description));
- final Diff rightAttributeDiff1 = Iterators.find(differences.iterator(), and(
- fromSide(DifferenceSource.RIGHT), AttributeDiff1Description));
- final Diff rightAttributeDiff2 = Iterators.find(differences.iterator(), and(
- fromSide(DifferenceSource.RIGHT), AttributeDiff2Description));
- final Diff rightAttributeDiff3 = Iterators.find(differences.iterator(), and(
- fromSide(DifferenceSource.RIGHT), AttributeDiff3Description));
+ final Diff rightAttributeDiff1 = Iterators.find(differences.iterator(),
+ and(fromSide(DifferenceSource.RIGHT), AttributeDiff1Description));
+ final Diff rightAttributeDiff2 = Iterators.find(differences.iterator(),
+ and(fromSide(DifferenceSource.RIGHT), AttributeDiff2Description));
+ final Diff rightAttributeDiff3 = Iterators.find(differences.iterator(),
+ and(fromSide(DifferenceSource.RIGHT), AttributeDiff3Description));
assertNotNull(leftAttributeDiff1);
assertNotNull(leftAttributeDiff2);
@@ -1664,19 +1664,19 @@ public class ConflictDetectionTest {
final Predicate<? super Diff> referenceDiff3Description = removedFromReference("root.conflictHolder",
"multiValuedReference", "root.origin3");
- final Diff leftReferenceDiff1 = Iterators.find(differences.iterator(), and(
- fromSide(DifferenceSource.LEFT), referenceDiff1Description));
- final Diff leftReferenceDiff2 = Iterators.find(differences.iterator(), and(
- fromSide(DifferenceSource.LEFT), referenceDiff2Description));
- final Diff leftReferenceDiff3 = Iterators.find(differences.iterator(), and(
- fromSide(DifferenceSource.LEFT), referenceDiff3Description));
+ final Diff leftReferenceDiff1 = Iterators.find(differences.iterator(),
+ and(fromSide(DifferenceSource.LEFT), referenceDiff1Description));
+ final Diff leftReferenceDiff2 = Iterators.find(differences.iterator(),
+ and(fromSide(DifferenceSource.LEFT), referenceDiff2Description));
+ final Diff leftReferenceDiff3 = Iterators.find(differences.iterator(),
+ and(fromSide(DifferenceSource.LEFT), referenceDiff3Description));
- final Diff rightReferenceDiff1 = Iterators.find(differences.iterator(), and(
- fromSide(DifferenceSource.RIGHT), referenceDiff1Description));
- final Diff rightReferenceDiff2 = Iterators.find(differences.iterator(), and(
- fromSide(DifferenceSource.RIGHT), referenceDiff2Description));
- final Diff rightReferenceDiff3 = Iterators.find(differences.iterator(), and(
- fromSide(DifferenceSource.RIGHT), referenceDiff3Description));
+ final Diff rightReferenceDiff1 = Iterators.find(differences.iterator(),
+ and(fromSide(DifferenceSource.RIGHT), referenceDiff1Description));
+ final Diff rightReferenceDiff2 = Iterators.find(differences.iterator(),
+ and(fromSide(DifferenceSource.RIGHT), referenceDiff2Description));
+ final Diff rightReferenceDiff3 = Iterators.find(differences.iterator(),
+ and(fromSide(DifferenceSource.RIGHT), referenceDiff3Description));
assertNotNull(leftReferenceDiff1);
assertNotNull(leftReferenceDiff2);
@@ -1730,10 +1730,10 @@ public class ConflictDetectionTest {
final Predicate<? super Diff> diffDescription = removedFromAttribute("root.conflictHolder",
"multiValuedAttribute", "origin1");
- final Diff leftDiff = Iterators.find(differences.iterator(), and(fromSide(DifferenceSource.LEFT),
- diffDescription));
- final Diff rightDiff = Iterators.find(differences.iterator(), and(fromSide(DifferenceSource.RIGHT),
- diffDescription));
+ final Diff leftDiff = Iterators.find(differences.iterator(),
+ and(fromSide(DifferenceSource.LEFT), diffDescription));
+ final Diff rightDiff = Iterators.find(differences.iterator(),
+ and(fromSide(DifferenceSource.RIGHT), diffDescription));
assertNotNull(leftDiff);
assertNotNull(rightDiff);
@@ -1767,10 +1767,10 @@ public class ConflictDetectionTest {
final Predicate<? super Diff> diffDescription = removedFromReference("root.conflictHolder",
"multiValuedReference", "root.origin1");
- final Diff leftDiff = Iterators.find(differences.iterator(), and(fromSide(DifferenceSource.LEFT),
- diffDescription));
- final Diff rightDiff = Iterators.find(differences.iterator(), and(fromSide(DifferenceSource.RIGHT),
- diffDescription));
+ final Diff leftDiff = Iterators.find(differences.iterator(),
+ and(fromSide(DifferenceSource.LEFT), diffDescription));
+ final Diff rightDiff = Iterators.find(differences.iterator(),
+ and(fromSide(DifferenceSource.RIGHT), diffDescription));
assertNotNull(leftDiff);
assertNotNull(rightDiff);
@@ -1804,10 +1804,10 @@ public class ConflictDetectionTest {
final Predicate<? super Diff> diffDescription = movedInAttribute("root.conflictHolder",
"multiValuedAttribute", "origin1");
- final Diff leftDiff = Iterators.find(differences.iterator(), and(fromSide(DifferenceSource.LEFT),
- diffDescription));
- final Diff rightDiff = Iterators.find(differences.iterator(), and(fromSide(DifferenceSource.RIGHT),
- diffDescription));
+ final Diff leftDiff = Iterators.find(differences.iterator(),
+ and(fromSide(DifferenceSource.LEFT), diffDescription));
+ final Diff rightDiff = Iterators.find(differences.iterator(),
+ and(fromSide(DifferenceSource.RIGHT), diffDescription));
assertNotNull(leftDiff);
assertNotNull(rightDiff);
@@ -1841,10 +1841,10 @@ public class ConflictDetectionTest {
final Predicate<? super Diff> diffDescription = movedInReference("root.conflictHolder",
"multiValuedReference", "root.origin1");
- final Diff leftDiff = Iterators.find(differences.iterator(), and(fromSide(DifferenceSource.LEFT),
- diffDescription));
- final Diff rightDiff = Iterators.find(differences.iterator(), and(fromSide(DifferenceSource.RIGHT),
- diffDescription));
+ final Diff leftDiff = Iterators.find(differences.iterator(),
+ and(fromSide(DifferenceSource.LEFT), diffDescription));
+ final Diff rightDiff = Iterators.find(differences.iterator(),
+ and(fromSide(DifferenceSource.RIGHT), diffDescription));
assertNotNull(leftDiff);
assertNotNull(rightDiff);
@@ -1879,10 +1879,10 @@ public class ConflictDetectionTest {
"singleValuedReference", null, "root.origin");
final Predicate<? super Diff> rightDiffDescription = removed("root.origin");
- final Diff leftDiff = Iterators.find(differences.iterator(), and(fromSide(DifferenceSource.LEFT),
- leftDiffDescription));
- final Diff rightDiff = Iterators.find(differences.iterator(), and(fromSide(DifferenceSource.RIGHT),
- rightDiffDescription));
+ final Diff leftDiff = Iterators.find(differences.iterator(),
+ and(fromSide(DifferenceSource.LEFT), leftDiffDescription));
+ final Diff rightDiff = Iterators.find(differences.iterator(),
+ and(fromSide(DifferenceSource.RIGHT), rightDiffDescription));
assertNotNull(leftDiff);
assertNotNull(rightDiff);
@@ -1917,10 +1917,10 @@ public class ConflictDetectionTest {
"multiValuedReference", "root.origin");
final Predicate<? super Diff> rightDiffDescription = removed("root.origin");
- final Diff leftDiff = Iterators.find(differences.iterator(), and(fromSide(DifferenceSource.LEFT),
- leftDiffDescription));
- final Diff rightDiff = Iterators.find(differences.iterator(), and(fromSide(DifferenceSource.RIGHT),
- rightDiffDescription));
+ final Diff leftDiff = Iterators.find(differences.iterator(),
+ and(fromSide(DifferenceSource.LEFT), leftDiffDescription));
+ final Diff rightDiff = Iterators.find(differences.iterator(),
+ and(fromSide(DifferenceSource.RIGHT), rightDiffDescription));
assertNotNull(leftDiff);
assertNotNull(rightDiff);
@@ -1956,10 +1956,10 @@ public class ConflictDetectionTest {
final Predicate<? super Diff> rightDiffDescription = moved("root.conflictHolder.origin",
"containmentRef3");
- final Diff leftDiff = Iterators.find(differences.iterator(), and(fromSide(DifferenceSource.LEFT),
- leftDiffDescription));
- final Diff rightDiff = Iterators.find(differences.iterator(), and(fromSide(DifferenceSource.RIGHT),
- rightDiffDescription));
+ final Diff leftDiff = Iterators.find(differences.iterator(),
+ and(fromSide(DifferenceSource.LEFT), leftDiffDescription));
+ final Diff rightDiff = Iterators.find(differences.iterator(),
+ and(fromSide(DifferenceSource.RIGHT), rightDiffDescription));
assertNotNull(leftDiff);
assertNotNull(rightDiff);
@@ -1995,10 +1995,10 @@ public class ConflictDetectionTest {
final Predicate<? super Diff> rightDiffDescription = moved("root.rightContainer.conflictNode",
"containmentRef1");
- final Diff leftDiff = Iterators.find(differences.iterator(), and(fromSide(DifferenceSource.LEFT),
- leftDiffDescription));
- final Diff rightDiff = Iterators.find(differences.iterator(), and(fromSide(DifferenceSource.RIGHT),
- rightDiffDescription));
+ final Diff leftDiff = Iterators.find(differences.iterator(),
+ and(fromSide(DifferenceSource.LEFT), leftDiffDescription));
+ final Diff rightDiff = Iterators.find(differences.iterator(),
+ and(fromSide(DifferenceSource.RIGHT), rightDiffDescription));
assertNotNull(leftDiff);
assertNotNull(rightDiff);
@@ -2033,10 +2033,10 @@ public class ConflictDetectionTest {
"singleValueContainment");
final Predicate<? super Diff> rightDiffDescription = removed("root.left");
- final Diff leftDiff = Iterators.find(differences.iterator(), and(fromSide(DifferenceSource.LEFT),
- leftDiffDescription));
- final Diff rightDiff = Iterators.find(differences.iterator(), and(fromSide(DifferenceSource.RIGHT),
- rightDiffDescription));
+ final Diff leftDiff = Iterators.find(differences.iterator(),
+ and(fromSide(DifferenceSource.LEFT), leftDiffDescription));
+ final Diff rightDiff = Iterators.find(differences.iterator(),
+ and(fromSide(DifferenceSource.RIGHT), rightDiffDescription));
assertNotNull(leftDiff);
assertNotNull(rightDiff);
@@ -2071,10 +2071,10 @@ public class ConflictDetectionTest {
"containmentRef1");
final Predicate<? super Diff> rightDiffDescription = removed("root.leftContainer");
- final Diff leftDiff = Iterators.find(differences.iterator(), and(fromSide(DifferenceSource.LEFT),
- leftDiffDescription));
- final Diff rightDiff = Iterators.find(differences.iterator(), and(fromSide(DifferenceSource.RIGHT),
- rightDiffDescription));
+ final Diff leftDiff = Iterators.find(differences.iterator(),
+ and(fromSide(DifferenceSource.LEFT), leftDiffDescription));
+ final Diff rightDiff = Iterators.find(differences.iterator(),
+ and(fromSide(DifferenceSource.RIGHT), rightDiffDescription));
assertNotNull(leftDiff);
assertNotNull(rightDiff);
@@ -2261,31 +2261,31 @@ public class ConflictDetectionTest {
final Predicate<? super Diff> rightDiff11Description = moved("Root.Node1", "containmentRef1");
final Predicate<? super Diff> rightDiff12Description = removed("Root.Node5");
- final Diff leftDiff1 = Iterators.find(differences.iterator(), and(fromSide(DifferenceSource.LEFT),
- leftDiff1Description));
- final Diff leftDiff2 = Iterators.find(differences.iterator(), and(fromSide(DifferenceSource.LEFT),
- leftDiff2Description));
- final Diff leftDiff3 = Iterators.find(differences.iterator(), and(fromSide(DifferenceSource.LEFT),
- leftDiff3Description));
- final Diff leftDiff4 = Iterators.find(differences.iterator(), and(fromSide(DifferenceSource.LEFT),
- leftDiff4Description));
- final Diff leftDiff5 = Iterators.find(differences.iterator(), and(fromSide(DifferenceSource.LEFT),
- leftDiff5Description));
- final Diff leftDiff6 = Iterators.find(differences.iterator(), and(fromSide(DifferenceSource.LEFT),
- leftDiff6Description));
- final Diff leftDiff7 = Iterators.find(differences.iterator(), and(fromSide(DifferenceSource.LEFT),
- leftDiff7Description));
-
- final Diff rightDiff8 = Iterators.find(differences.iterator(), and(fromSide(DifferenceSource.RIGHT),
- rightDiff8Description));
- final Diff rightDiff9 = Iterators.find(differences.iterator(), and(fromSide(DifferenceSource.RIGHT),
- rightDiff9Description));
- final Diff rightDiff10 = Iterators.find(differences.iterator(), and(fromSide(DifferenceSource.RIGHT),
- rightDiff10Description));
- final Diff rightDiff11 = Iterators.find(differences.iterator(), and(fromSide(DifferenceSource.RIGHT),
- rightDiff11Description));
- final Diff rightDiff12 = Iterators.find(differences.iterator(), and(fromSide(DifferenceSource.RIGHT),
- rightDiff12Description));
+ final Diff leftDiff1 = Iterators.find(differences.iterator(),
+ and(fromSide(DifferenceSource.LEFT), leftDiff1Description));
+ final Diff leftDiff2 = Iterators.find(differences.iterator(),
+ and(fromSide(DifferenceSource.LEFT), leftDiff2Description));
+ final Diff leftDiff3 = Iterators.find(differences.iterator(),
+ and(fromSide(DifferenceSource.LEFT), leftDiff3Description));
+ final Diff leftDiff4 = Iterators.find(differences.iterator(),
+ and(fromSide(DifferenceSource.LEFT), leftDiff4Description));
+ final Diff leftDiff5 = Iterators.find(differences.iterator(),
+ and(fromSide(DifferenceSource.LEFT), leftDiff5Description));
+ final Diff leftDiff6 = Iterators.find(differences.iterator(),
+ and(fromSide(DifferenceSource.LEFT), leftDiff6Description));
+ final Diff leftDiff7 = Iterators.find(differences.iterator(),
+ and(fromSide(DifferenceSource.LEFT), leftDiff7Description));
+
+ final Diff rightDiff8 = Iterators.find(differences.iterator(),
+ and(fromSide(DifferenceSource.RIGHT), rightDiff8Description));
+ final Diff rightDiff9 = Iterators.find(differences.iterator(),
+ and(fromSide(DifferenceSource.RIGHT), rightDiff9Description));
+ final Diff rightDiff10 = Iterators.find(differences.iterator(),
+ and(fromSide(DifferenceSource.RIGHT), rightDiff10Description));
+ final Diff rightDiff11 = Iterators.find(differences.iterator(),
+ and(fromSide(DifferenceSource.RIGHT), rightDiff11Description));
+ final Diff rightDiff12 = Iterators.find(differences.iterator(),
+ and(fromSide(DifferenceSource.RIGHT), rightDiff12Description));
assertNotNull(leftDiff1);
assertNotNull(leftDiff2);
@@ -2351,6 +2351,7 @@ public class ConflictDetectionTest {
Diff nonConflictingDiff = nonConflictingDiffs.iterator().next();
assertTrue(nonConflictingDiff instanceof ResourceAttachmentChange);
assertEquals(DifferenceSource.RIGHT, nonConflictingDiff.getSource());
- assertTrue(((ResourceAttachmentChange)nonConflictingDiff).getResourceURI().endsWith("fragment.nodes"));
+ assertTrue(
+ ((ResourceAttachmentChange)nonConflictingDiff).getResourceURI().endsWith("fragment.nodes"));
}
}
diff --git a/plugins/org.eclipse.emf.compare.tests/src/org/eclipse/emf/compare/tests/diff/ComparisonUtilTest.java b/plugins/org.eclipse.emf.compare.tests/src/org/eclipse/emf/compare/tests/diff/ComparisonUtilTest.java
index b40718cdb..5929b72d3 100644
--- a/plugins/org.eclipse.emf.compare.tests/src/org/eclipse/emf/compare/tests/diff/ComparisonUtilTest.java
+++ b/plugins/org.eclipse.emf.compare.tests/src/org/eclipse/emf/compare/tests/diff/ComparisonUtilTest.java
@@ -52,8 +52,8 @@ public class ComparisonUtilTest {
// Right to left on a deleted element
final Predicate<? super Diff> leftPeriodical = and(fromSide(DifferenceSource.LEFT),
- ofKind(DifferenceKind.DELETE), referenceValueMatch("eClassifiers", "extlibrary.Periodical",
- true));
+ ofKind(DifferenceKind.DELETE),
+ referenceValueMatch("eClassifiers", "extlibrary.Periodical", true));
final Diff leftPeriodicalDiff = Iterators.find(differences.iterator(), leftPeriodical);
boolean leftToRight = false;
Iterable<Diff> subDiffs = ComparisonUtil.getSubDiffs(leftToRight).apply(leftPeriodicalDiff);
@@ -88,8 +88,8 @@ public class ComparisonUtilTest {
// Right to left on a deleted element
final Predicate<? super Diff> leftPeriodical3Way = and(fromSide(DifferenceSource.LEFT),
- ofKind(DifferenceKind.DELETE), referenceValueMatch("eClassifiers", "extlibrary.Periodical",
- true));
+ ofKind(DifferenceKind.DELETE),
+ referenceValueMatch("eClassifiers", "extlibrary.Periodical", true));
final Diff leftPeriodicalDiff3Way = Iterators.find(differences.iterator(), leftPeriodical3Way);
leftToRight = false;
subDiffs = ComparisonUtil.getSubDiffs(leftToRight).apply(leftPeriodicalDiff3Way);
diff --git a/plugins/org.eclipse.emf.compare.tests/src/org/eclipse/emf/compare/tests/diff/DiffUtilTest.java b/plugins/org.eclipse.emf.compare.tests/src/org/eclipse/emf/compare/tests/diff/DiffUtilTest.java
index 43ee1d717..537f7b544 100644
--- a/plugins/org.eclipse.emf.compare.tests/src/org/eclipse/emf/compare/tests/diff/DiffUtilTest.java
+++ b/plugins/org.eclipse.emf.compare.tests/src/org/eclipse/emf/compare/tests/diff/DiffUtilTest.java
@@ -471,20 +471,21 @@ public class DiffUtilTest {
*/
@Test
public void diceCoefficient() {
- final String[] data = new String[] {"ceString", "ceString", "classe", "Classe", "Classe",
- "UneClasse", "package", "packagedeux", "", "MaClasse", "package", "packageASupprimer",
- "attribut", "reference", "aa", "aaaa", "aaa", "aaaa", "v1", "v2", "v", "v1", "a", "a", "a",
- "b", "a", "A", "GGG", "GGGGGG", "night", "nacht", };
+ final String[] data = new String[] {"ceString", "ceString", "classe", "Classe", "Classe", "UneClasse",
+ "package", "packagedeux", "", "MaClasse", "package", "packageASupprimer", "attribut",
+ "reference", "aa", "aaaa", "aaa", "aaaa", "v1", "v2", "v", "v1", "a", "a", "a", "b", "a", "A",
+ "GGG", "GGGGGG", "night", "nacht", };
final double[] similarities = new double[] {1d, 0.8d, 10d / 13d, 12d / 16d, 0d, 12d / 22d, 0d,
2d / 4d, 4d / 5d, 1d / 2d, 1d / 3d, 1d, 0d, 0d, 4d / 7d, 2d / 8d };
for (int i = 0; i < data.length; i += 2) {
- assertEquals("Unexpected result of the dice coefficient for str1 = " + data[i] + " and str2 = "
- + data[i + 1], similarities[i / 2], DiffUtil.diceCoefficient(data[i], data[i + 1]),
- Double.MIN_VALUE);
+ assertEquals(
+ "Unexpected result of the dice coefficient for str1 = " + data[i] + " and str2 = "
+ + data[i + 1],
+ similarities[i / 2], DiffUtil.diceCoefficient(data[i], data[i + 1]), Double.MIN_VALUE);
// Make sure that the result is symmetric
- assertEquals("Dice coefficient was not symmetric for str1 = " + data[i] + " and str2 = "
- + data[i + 1], similarities[i / 2], DiffUtil.diceCoefficient(data[i + 1], data[i]),
- Double.MIN_VALUE);
+ assertEquals(
+ "Dice coefficient was not symmetric for str1 = " + data[i] + " and str2 = " + data[i + 1],
+ similarities[i / 2], DiffUtil.diceCoefficient(data[i + 1], data[i]), Double.MIN_VALUE);
}
}
@@ -525,22 +526,23 @@ public class DiffUtilTest {
@Test
public void diceCoefficientFullWidth() {
- final String[] data = new String[] {"ceString", "ceString", "classe", "Classe", "Classe",
- "UneClasse", "package", "packagedeux", "", "MaClasse", "package", "packageASupprimer",
- "attribut", "reference", "aa", "aaaa", "aaa", "aaaa", "v1", "v2", "v", "v1", "a", "a", "a",
- "b", "a", "A", "GGG", "GGGGGG", "night", "nacht", "fullwidth string", "fullwidth string",
+ final String[] data = new String[] {"ceString", "ceString", "classe", "Classe", "Classe", "UneClasse",
+ "package", "packagedeux", "", "MaClasse", "package", "packageASupprimer", "attribut",
+ "reference", "aa", "aaaa", "aaa", "aaaa", "v1", "v2", "v", "v1", "a", "a", "a", "b", "a", "A",
+ "GGG", "GGGGGG", "night", "nacht", "fullwidth string", "fullwidth string",
"fullwidth string", "fullwidth CharSequence" };
final double[] similarities = new double[] {1d, 0.8d, 10d / 13d, 12d / 16d, 0d, 12d / 22d, 0d,
2d / 4d, 4d / 5d, 1d / 2d, 1d / 3d, 1d, 0d, 0d, 4d / 7d, 2d / 8d, 1d, 18d / 38d, };
for (int i = 0; i < data.length; i += 2) {
- assertEquals("Unexpected result of the dice coefficient for str1 = " + data[i] + " and str2 = "
- + data[i + 1], similarities[i / 2], DiffUtil.diceCoefficient(data[i], data[i + 1]),
- Double.MIN_VALUE);
+ assertEquals(
+ "Unexpected result of the dice coefficient for str1 = " + data[i] + " and str2 = "
+ + data[i + 1],
+ similarities[i / 2], DiffUtil.diceCoefficient(data[i], data[i + 1]), Double.MIN_VALUE);
// Make sure that the result is symmetric
- assertEquals("Dice coefficient was not symmetric for str1 = " + data[i] + " and str2 = "
- + data[i + 1], similarities[i / 2], DiffUtil.diceCoefficient(data[i + 1], data[i]),
- Double.MIN_VALUE);
+ assertEquals(
+ "Dice coefficient was not symmetric for str1 = " + data[i] + " and str2 = " + data[i + 1],
+ similarities[i / 2], DiffUtil.diceCoefficient(data[i + 1], data[i]), Double.MIN_VALUE);
}
}
diff --git a/plugins/org.eclipse.emf.compare.tests/src/org/eclipse/emf/compare/tests/diff/ThreeWayTextDiffTest.java b/plugins/org.eclipse.emf.compare.tests/src/org/eclipse/emf/compare/tests/diff/ThreeWayTextDiffTest.java
index 9d0434cee..fa8a9a859 100644
--- a/plugins/org.eclipse.emf.compare.tests/src/org/eclipse/emf/compare/tests/diff/ThreeWayTextDiffTest.java
+++ b/plugins/org.eclipse.emf.compare.tests/src/org/eclipse/emf/compare/tests/diff/ThreeWayTextDiffTest.java
@@ -461,10 +461,8 @@ public class ThreeWayTextDiffTest {
final String origin = "They don't call it a Quarter Pounder with Cheese?" + NL //
+ "They call it a Royale with Cheese.";
- final String left = "Whose chopper is this?"
- + NL // added same as right
- + "It's Zed's!"
- + NL // added same as right
+ final String left = "Whose chopper is this?" + NL // added same as right
+ + "It's Zed's!" + NL // added same as right
+ "They don't call it a Quarter Pounder with Cheese?" + NL
+ "They call it a Royale with Cheese.";
diff --git a/plugins/org.eclipse.emf.compare.tests/src/org/eclipse/emf/compare/tests/diff/URIDistanceTest.java b/plugins/org.eclipse.emf.compare.tests/src/org/eclipse/emf/compare/tests/diff/URIDistanceTest.java
index a0548fb94..ba3421964 100644
--- a/plugins/org.eclipse.emf.compare.tests/src/org/eclipse/emf/compare/tests/diff/URIDistanceTest.java
+++ b/plugins/org.eclipse.emf.compare.tests/src/org/eclipse/emf/compare/tests/diff/URIDistanceTest.java
@@ -81,8 +81,10 @@ public class URIDistanceTest {
@Test
public void limitCases() throws Exception {
assertEquals(0, proximity("", ""));
- assertEquals(10, proximity("/", "/a/very/long/path/just/to/check/we/wont/ends/up/with/a/weird/thing"));
- assertEquals(10, proximity("/a/very/long/path/just/to/check/we/wont/ends/up/with/a/weird/thing", "/"));
+ assertEquals(10,
+ proximity("/", "/a/very/long/path/just/to/check/we/wont/ends/up/with/a/weird/thing"));
+ assertEquals(10,
+ proximity("/a/very/long/path/just/to/check/we/wont/ends/up/with/a/weird/thing", "/"));
}
@Test
diff --git a/plugins/org.eclipse.emf.compare.tests/src/org/eclipse/emf/compare/tests/edit/AbstractTestCompareItemProviderAdapter.java b/plugins/org.eclipse.emf.compare.tests/src/org/eclipse/emf/compare/tests/edit/AbstractTestCompareItemProviderAdapter.java
index 446467334..443c5c187 100644
--- a/plugins/org.eclipse.emf.compare.tests/src/org/eclipse/emf/compare/tests/edit/AbstractTestCompareItemProviderAdapter.java
+++ b/plugins/org.eclipse.emf.compare.tests/src/org/eclipse/emf/compare/tests/edit/AbstractTestCompareItemProviderAdapter.java
@@ -53,8 +53,8 @@ public class AbstractTestCompareItemProviderAdapter {
* @throws IOException
*/
protected static Comparison getComparison(ResourceScopeProvider scopeProvider) throws IOException {
- final IComparisonScope scope = new DefaultComparisonScope(scopeProvider.getLeft(), scopeProvider
- .getRight(), scopeProvider.getOrigin());
+ final IComparisonScope scope = new DefaultComparisonScope(scopeProvider.getLeft(),
+ scopeProvider.getRight(), scopeProvider.getOrigin());
return EMFCompare.builder().build().compare(scope);
}
diff --git a/plugins/org.eclipse.emf.compare.tests/src/org/eclipse/emf/compare/tests/edit/TestAttributeChangeItemProviderSpec.java b/plugins/org.eclipse.emf.compare.tests/src/org/eclipse/emf/compare/tests/edit/TestAttributeChangeItemProviderSpec.java
index a24b97270..aca35ac36 100644
--- a/plugins/org.eclipse.emf.compare.tests/src/org/eclipse/emf/compare/tests/edit/TestAttributeChangeItemProviderSpec.java
+++ b/plugins/org.eclipse.emf.compare.tests/src/org/eclipse/emf/compare/tests/edit/TestAttributeChangeItemProviderSpec.java
@@ -33,10 +33,10 @@ public class TestAttributeChangeItemProviderSpec extends AbstractTestCompareItem
public void testGetChildren_EcoreA1() throws IOException {
Comparison comparison = getComparison(new EcoreA1InputData());
- List<AttributeChange> eAllContent_AttributeChange = newArrayList(filter(comparison.eAllContents(),
- AttributeChange.class));
- List<AttributeChange> eAllChildren_AttributeChange = newArrayList(filter(eAllChildren(comparison),
- AttributeChange.class));
+ List<AttributeChange> eAllContent_AttributeChange = newArrayList(
+ filter(comparison.eAllContents(), AttributeChange.class));
+ List<AttributeChange> eAllChildren_AttributeChange = newArrayList(
+ filter(eAllChildren(comparison), AttributeChange.class));
assertEquals(eAllContent_AttributeChange.size(), eAllChildren_AttributeChange.size());
assertTrue(eAllChildren_AttributeChange.containsAll(eAllContent_AttributeChange));
diff --git a/plugins/org.eclipse.emf.compare.tests/src/org/eclipse/emf/compare/tests/edit/TestReferenceChangeItemProviderSpec.java b/plugins/org.eclipse.emf.compare.tests/src/org/eclipse/emf/compare/tests/edit/TestReferenceChangeItemProviderSpec.java
index 603ee6dce..61aafd7b0 100644
--- a/plugins/org.eclipse.emf.compare.tests/src/org/eclipse/emf/compare/tests/edit/TestReferenceChangeItemProviderSpec.java
+++ b/plugins/org.eclipse.emf.compare.tests/src/org/eclipse/emf/compare/tests/edit/TestReferenceChangeItemProviderSpec.java
@@ -31,8 +31,8 @@ public class TestReferenceChangeItemProviderSpec extends AbstractTestCompareItem
public void testGetChildren_AudioVisualItem() throws IOException {
Match ePackageMatch = TestMatchItemProviderSpec.getEcoreA1_EPackageMatch();
- Collection<?> ePackage_MatchChildren = adaptAsITreeItemContentProvider(ePackageMatch).getChildren(
- ePackageMatch);
+ Collection<?> ePackage_MatchChildren = adaptAsITreeItemContentProvider(ePackageMatch)
+ .getChildren(ePackageMatch);
Match audioVisualItem_Match = getMatchWithFeatureValue(ePackage_MatchChildren, "name", //$NON-NLS-1$
"AudioVisualItem"); //$NON-NLS-1$
Collection<?> audioVisualItem_MatchChildren = adaptAsITreeItemContentProvider(audioVisualItem_Match)
@@ -51,8 +51,8 @@ public class TestReferenceChangeItemProviderSpec extends AbstractTestCompareItem
public void testGetChildren_Book() throws IOException {
Match ePackageMatch = TestMatchItemProviderSpec.getEcoreA1_EPackageMatch();
- Collection<?> ePackage_MatchChildren = adaptAsITreeItemContentProvider(ePackageMatch).getChildren(
- ePackageMatch);
+ Collection<?> ePackage_MatchChildren = adaptAsITreeItemContentProvider(ePackageMatch)
+ .getChildren(ePackageMatch);
Match book_Match = getMatchWithFeatureValue(ePackage_MatchChildren, "name", "Book"); //$NON-NLS-1$ //$NON-NLS-2$
Collection<?> book_MatchChildren = adaptAsITreeItemContentProvider(book_Match)
.getChildren(book_Match);
@@ -70,8 +70,8 @@ public class TestReferenceChangeItemProviderSpec extends AbstractTestCompareItem
public void testGetChildren_Borrowable() throws IOException {
Match ePackageMatch = TestMatchItemProviderSpec.getEcoreA1_EPackageMatch();
- Collection<?> ePackage_MatchChildren = adaptAsITreeItemContentProvider(ePackageMatch).getChildren(
- ePackageMatch);
+ Collection<?> ePackage_MatchChildren = adaptAsITreeItemContentProvider(ePackageMatch)
+ .getChildren(ePackageMatch);
Match borrowableCategory_Match = getMatchWithFeatureValue(ePackage_MatchChildren, "name", //$NON-NLS-1$
"Borrowable"); //$NON-NLS-1$
Collection<?> borrowable_MatchChildren = adaptAsITreeItemContentProvider(borrowableCategory_Match)
@@ -84,8 +84,8 @@ public class TestReferenceChangeItemProviderSpec extends AbstractTestCompareItem
public void testGetChildren_BookCategory() throws IOException {
Match ePackageMatch = TestMatchItemProviderSpec.getEcoreA1_EPackageMatch();
- Collection<?> ePackage_MatchChildren = adaptAsITreeItemContentProvider(ePackageMatch).getChildren(
- ePackageMatch);
+ Collection<?> ePackage_MatchChildren = adaptAsITreeItemContentProvider(ePackageMatch)
+ .getChildren(ePackageMatch);
Match bookCategory_Match = getMatchWithFeatureValue(ePackage_MatchChildren, "name", "BookCategory"); //$NON-NLS-1$ //$NON-NLS-2$
Collection<?> bookCategory_MatchChildren = adaptAsITreeItemContentProvider(bookCategory_Match)
.getChildren(bookCategory_Match);
@@ -96,13 +96,13 @@ public class TestReferenceChangeItemProviderSpec extends AbstractTestCompareItem
bookCategory_MatchChildren, "name", "Encyclopedia"); //$NON-NLS-1$ //$NON-NLS-2$
ReferenceChange mangaReferenceChange = getReferenceChangeWithFeatureValue(bookCategory_MatchChildren,
"name", "Manga"); //$NON-NLS-1$ //$NON-NLS-2$
- ReferenceChange manhwaReferenceChange = getReferenceChangeWithFeatureValue(
- bookCategory_MatchChildren, "name", "Manhwa"); //$NON-NLS-1$ //$NON-NLS-2$
+ ReferenceChange manhwaReferenceChange = getReferenceChangeWithFeatureValue(bookCategory_MatchChildren,
+ "name", "Manhwa"); //$NON-NLS-1$ //$NON-NLS-2$
- assertTrue(adaptAsITreeItemContentProvider(dictionaryReferenceChange).getChildren(
- dictionaryReferenceChange).isEmpty());
- assertTrue(adaptAsITreeItemContentProvider(encyclopediaReferenceChange).getChildren(
- encyclopediaReferenceChange).isEmpty());
+ assertTrue(adaptAsITreeItemContentProvider(dictionaryReferenceChange)
+ .getChildren(dictionaryReferenceChange).isEmpty());
+ assertTrue(adaptAsITreeItemContentProvider(encyclopediaReferenceChange)
+ .getChildren(encyclopediaReferenceChange).isEmpty());
assertTrue(adaptAsITreeItemContentProvider(mangaReferenceChange).getChildren(mangaReferenceChange)
.isEmpty());
assertTrue(adaptAsITreeItemContentProvider(manhwaReferenceChange).getChildren(manhwaReferenceChange)
@@ -113,16 +113,16 @@ public class TestReferenceChangeItemProviderSpec extends AbstractTestCompareItem
public void testGetChildren_Magazine1() throws IOException {
Match ePackageMatch = TestMatchItemProviderSpec.getEcoreA1_EPackageMatch();
- Collection<?> ePackage_MatchChildren = adaptAsITreeItemContentProvider(ePackageMatch).getChildren(
- ePackageMatch);
+ Collection<?> ePackage_MatchChildren = adaptAsITreeItemContentProvider(ePackageMatch)
+ .getChildren(ePackageMatch);
Collection<?> magazineChildren = null;
for (ReferenceChange referenceChange : filter(ePackage_MatchChildren, ReferenceChange.class)) {
EClass eClass = (EClass)referenceChange.getValue();
if ("Magazine".equals(eClass.getName()) //$NON-NLS-1$
&& "CirculatingItem".equals(eClass.getESuperTypes().get(0).getName())) { //$NON-NLS-1$
- magazineChildren = adaptAsITreeItemContentProvider(referenceChange).getChildren(
- referenceChange);
+ magazineChildren = adaptAsITreeItemContentProvider(referenceChange)
+ .getChildren(referenceChange);
assertEquals(0, magazineChildren.size());
break;
}
@@ -133,16 +133,16 @@ public class TestReferenceChangeItemProviderSpec extends AbstractTestCompareItem
public void testGetChildren_Magazine2() throws IOException {
Match ePackageMatch = TestMatchItemProviderSpec.getEcoreA1_EPackageMatch();
- Collection<?> ePackage_MatchChildren = adaptAsITreeItemContentProvider(ePackageMatch).getChildren(
- ePackageMatch);
+ Collection<?> ePackage_MatchChildren = adaptAsITreeItemContentProvider(ePackageMatch)
+ .getChildren(ePackageMatch);
Collection<?> magazineChildren = null;
for (ReferenceChange referenceChange : filter(ePackage_MatchChildren, ReferenceChange.class)) {
EClass eClass = (EClass)referenceChange.getValue();
if ("Magazine".equals(eClass.getName()) //$NON-NLS-1$
&& "Periodical".equals(eClass.getESuperTypes().get(0).getName())) { //$NON-NLS-1$
- magazineChildren = adaptAsITreeItemContentProvider(referenceChange).getChildren(
- referenceChange);
+ magazineChildren = adaptAsITreeItemContentProvider(referenceChange)
+ .getChildren(referenceChange);
assertEquals(0, magazineChildren.size());
break;
}
@@ -153,8 +153,8 @@ public class TestReferenceChangeItemProviderSpec extends AbstractTestCompareItem
public void testGetChildren_Periodical() throws IOException {
Match ePackageMatch = TestMatchItemProviderSpec.getEcoreA1_EPackageMatch();
- Collection<?> ePackage_MatchChildren = adaptAsITreeItemContentProvider(ePackageMatch).getChildren(
- ePackageMatch);
+ Collection<?> ePackage_MatchChildren = adaptAsITreeItemContentProvider(ePackageMatch)
+ .getChildren(ePackageMatch);
ReferenceChange periodical_ReferenceChange = getReferenceChangeWithFeatureValue(
ePackage_MatchChildren, "name", "Periodical"); //$NON-NLS-1$ //$NON-NLS-2$
Collection<?> periodical_ReferenceChangeChildren = adaptAsITreeItemContentProvider(
@@ -167,18 +167,18 @@ public class TestReferenceChangeItemProviderSpec extends AbstractTestCompareItem
public void testGetChildren_Person() throws IOException {
Match ePackageMatch = TestMatchItemProviderSpec.getEcoreA1_EPackageMatch();
- Collection<?> ePackage_MatchChildren = adaptAsITreeItemContentProvider(ePackageMatch).getChildren(
- ePackageMatch);
+ Collection<?> ePackage_MatchChildren = adaptAsITreeItemContentProvider(ePackageMatch)
+ .getChildren(ePackageMatch);
Match person_Match = getMatchWithFeatureValue(ePackage_MatchChildren, "name", "Person"); //$NON-NLS-1$ //$NON-NLS-2$
- Collection<?> person_MatchChildren = adaptAsITreeItemContentProvider(person_Match).getChildren(
- person_Match);
+ Collection<?> person_MatchChildren = adaptAsITreeItemContentProvider(person_Match)
+ .getChildren(person_Match);
assertEquals(6, person_MatchChildren.size());
- ReferenceChange issuesPerYearChange = getReferenceChangeWithFeatureValue(person_MatchChildren,
- "name", "firstName"); //$NON-NLS-1$ //$NON-NLS-2$
- Collection<?> firstNameChildren = adaptAsITreeItemContentProvider(issuesPerYearChange).getChildren(
- issuesPerYearChange);
+ ReferenceChange issuesPerYearChange = getReferenceChangeWithFeatureValue(person_MatchChildren, "name", //$NON-NLS-1$
+ "firstName"); //$NON-NLS-1$
+ Collection<?> firstNameChildren = adaptAsITreeItemContentProvider(issuesPerYearChange)
+ .getChildren(issuesPerYearChange);
assertEquals(0, firstNameChildren.size());
}
@@ -186,8 +186,8 @@ public class TestReferenceChangeItemProviderSpec extends AbstractTestCompareItem
public void testGetChildren_TitledItem() throws IOException {
Match ePackageMatch = TestMatchItemProviderSpec.getEcoreA1_EPackageMatch();
- Collection<?> ePackage_MatchChildren = adaptAsITreeItemContentProvider(ePackageMatch).getChildren(
- ePackageMatch);
+ Collection<?> ePackage_MatchChildren = adaptAsITreeItemContentProvider(ePackageMatch)
+ .getChildren(ePackageMatch);
ReferenceChange titledItem_ReferenceChange = getReferenceChangeWithFeatureValue(
ePackage_MatchChildren, "name", "TitledItem"); //$NON-NLS-1$ //$NON-NLS-2$
diff --git a/plugins/org.eclipse.emf.compare.tests/src/org/eclipse/emf/compare/tests/equi/EquiComputingTest.java b/plugins/org.eclipse.emf.compare.tests/src/org/eclipse/emf/compare/tests/equi/EquiComputingTest.java
index b3ee2b8c5..b434ccf5d 100644
--- a/plugins/org.eclipse.emf.compare.tests/src/org/eclipse/emf/compare/tests/equi/EquiComputingTest.java
+++ b/plugins/org.eclipse.emf.compare.tests/src/org/eclipse/emf/compare/tests/equi/EquiComputingTest.java
@@ -65,18 +65,22 @@ public class EquiComputingTest {
if (kind.equals(TestKind.LEFT)) {
changeRefA2BDiffDescription = changedReference("Requirements.A", "destination", null,
"Requirements.B");
- changeRefB2ADiffDescription = changedReference("Requirements.B", "source", null, "Requirements.A");
+ changeRefB2ADiffDescription = changedReference("Requirements.B", "source", null,
+ "Requirements.A");
changeRefC2DDiffDescription = addedToReference("Requirements.C", "destination", "Requirements.D");
- changeRefD2CDiffDescription = changedReference("Requirements.D", "source", null, "Requirements.C");
+ changeRefD2CDiffDescription = changedReference("Requirements.D", "source", null,
+ "Requirements.C");
changeRefE2FDiffDescription = addedToReference("Requirements.E", "destination", "Requirements.F");
changeRefF2EDiffDescription = addedToReference("Requirements.F", "source", "Requirements.E");
} else {
changeRefA2BDiffDescription = changedReference("Requirements.A", "destination", "Requirements.B",
null);
- changeRefB2ADiffDescription = changedReference("Requirements.B", "source", "Requirements.A", null);
+ changeRefB2ADiffDescription = changedReference("Requirements.B", "source", "Requirements.A",
+ null);
changeRefC2DDiffDescription = removedFromReference("Requirements.C", "destination",
"Requirements.D");
- changeRefD2CDiffDescription = changedReference("Requirements.D", "source", "Requirements.C", null);
+ changeRefD2CDiffDescription = changedReference("Requirements.D", "source", "Requirements.C",
+ null);
changeRefE2FDiffDescription = removedFromReference("Requirements.E", "destination",
"Requirements.F");
changeRefF2EDiffDescription = removedFromReference("Requirements.F", "source", "Requirements.E");
@@ -169,8 +173,10 @@ public class EquiComputingTest {
"Requirements.F1");
changeRefE2F2DiffDescription = removedFromReference("Requirements.E", "destination",
"Requirements.F2");
- changeRefF12EDiffDescription = removedFromReference("Requirements.F1", "source", "Requirements.E");
- changeRefF22EDiffDescription = removedFromReference("Requirements.F2", "source", "Requirements.E");
+ changeRefF12EDiffDescription = removedFromReference("Requirements.F1", "source",
+ "Requirements.E");
+ changeRefF22EDiffDescription = removedFromReference("Requirements.F2", "source",
+ "Requirements.E");
}
final Diff changeRefC2D1Diff = Iterators.find(differences.iterator(), changeRefC2D1DiffDescription);
@@ -392,9 +398,11 @@ public class EquiComputingTest {
if (kind.equals(TestKind.LEFT)) {
changeRefA2BDiffDescription = changedReference("Requirements.A", "destination", null,
"Requirements.B");
- changeRefB2ADiffDescription = changedReference("Requirements.B", "source", null, "Requirements.A");
+ changeRefB2ADiffDescription = changedReference("Requirements.B", "source", null,
+ "Requirements.A");
changeRefC2DDiffDescription = addedToReference("Requirements.C", "destination", "Requirements.D");
- changeRefD2CDiffDescription = changedReference("Requirements.D", "source", null, "Requirements.C");
+ changeRefD2CDiffDescription = changedReference("Requirements.D", "source", null,
+ "Requirements.C");
changeRefE2FDiffDescription = addedToReference("Requirements.E", "destination", "Requirements.F");
changeRefF2EDiffDescription = addedToReference("Requirements.F", "source", "Requirements.E");
@@ -407,10 +415,12 @@ public class EquiComputingTest {
} else {
changeRefA2BDiffDescription = changedReference("Requirements.A", "destination", "Requirements.B",
null);
- changeRefB2ADiffDescription = changedReference("Requirements.B", "source", "Requirements.A", null);
+ changeRefB2ADiffDescription = changedReference("Requirements.B", "source", "Requirements.A",
+ null);
changeRefC2DDiffDescription = removedFromReference("Requirements.C", "destination",
"Requirements.D");
- changeRefD2CDiffDescription = changedReference("Requirements.D", "source", "Requirements.C", null);
+ changeRefD2CDiffDescription = changedReference("Requirements.D", "source", "Requirements.C",
+ null);
changeRefE2FDiffDescription = removedFromReference("Requirements.E", "destination",
"Requirements.F");
changeRefF2EDiffDescription = removedFromReference("Requirements.F", "source", "Requirements.E");
@@ -542,13 +552,17 @@ public class EquiComputingTest {
if (kind.equals(TestKind.LEFT)) {
changeRefA2BDiffDescription = changedReference("Requirements.A", "destination", "Requirements.B",
"Requirements.C");
- changeRefB2ADiffDescription = changedReference("Requirements.B", "source", "Requirements.A", null);
- changeRefC2ADiffDescription = changedReference("Requirements.C", "source", null, "Requirements.A");
+ changeRefB2ADiffDescription = changedReference("Requirements.B", "source", "Requirements.A",
+ null);
+ changeRefC2ADiffDescription = changedReference("Requirements.C", "source", null,
+ "Requirements.A");
} else {
changeRefA2BDiffDescription = changedReference("Requirements.A", "destination", "Requirements.C",
"Requirements.B");
- changeRefB2ADiffDescription = changedReference("Requirements.B", "source", null, "Requirements.A");
- changeRefC2ADiffDescription = changedReference("Requirements.C", "source", "Requirements.A", null);
+ changeRefB2ADiffDescription = changedReference("Requirements.B", "source", null,
+ "Requirements.A");
+ changeRefC2ADiffDescription = changedReference("Requirements.C", "source", "Requirements.A",
+ null);
}
final Diff changeRefA2BDiff = Iterators.find(differences.iterator(), changeRefA2BDiffDescription);
@@ -593,14 +607,18 @@ public class EquiComputingTest {
if (kind.equals(TestKind.LEFT)) {
changeRefA2BDiffDescription = changedReference("Requirements.A", "destination", "Requirements.B",
"Requirements.C");
- changeRefB2ADiffDescription = changedReference("Requirements.B", "source", "Requirements.A", null);
- changeRefC2ADiffDescription = changedReference("Requirements.C", "source", null, "Requirements.A");
+ changeRefB2ADiffDescription = changedReference("Requirements.B", "source", "Requirements.A",
+ null);
+ changeRefC2ADiffDescription = changedReference("Requirements.C", "source", null,
+ "Requirements.A");
addCDiffDescription = addedToReference("Requirements", "containmentRef1", "Requirements.C");
} else {
changeRefA2BDiffDescription = changedReference("Requirements.A", "destination", "Requirements.C",
"Requirements.B");
- changeRefB2ADiffDescription = changedReference("Requirements.B", "source", null, "Requirements.A");
- changeRefC2ADiffDescription = changedReference("Requirements.C", "source", "Requirements.A", null);
+ changeRefB2ADiffDescription = changedReference("Requirements.B", "source", null,
+ "Requirements.A");
+ changeRefC2ADiffDescription = changedReference("Requirements.C", "source", "Requirements.A",
+ null);
addCDiffDescription = removedFromReference("Requirements", "containmentRef1", "Requirements.C");
}
@@ -648,15 +666,20 @@ public class EquiComputingTest {
if (kind.equals(TestKind.LEFT)) {
changeRefA2CDiffDescription = changedReference("Requirements.A", "destination", "Requirements.B",
"Requirements.C");
- changeRefC2ADiffDescription = changedReference("Requirements.C", "source", null, "Requirements.A");
- deleteBDiffDescription = removedFromReference("Requirements", "containmentRef1", "Requirements.B");
- changeRefB2ADiffDescription = changedReference("Requirements.B", "source", "Requirements.A", null);
+ changeRefC2ADiffDescription = changedReference("Requirements.C", "source", null,
+ "Requirements.A");
+ deleteBDiffDescription = removedFromReference("Requirements", "containmentRef1",
+ "Requirements.B");
+ changeRefB2ADiffDescription = changedReference("Requirements.B", "source", "Requirements.A",
+ null);
} else {
changeRefA2CDiffDescription = changedReference("Requirements.A", "destination", "Requirements.C",
"Requirements.B");
- changeRefC2ADiffDescription = changedReference("Requirements.C", "source", "Requirements.A", null);
+ changeRefC2ADiffDescription = changedReference("Requirements.C", "source", "Requirements.A",
+ null);
deleteBDiffDescription = addedToReference("Requirements", "containmentRef1", "Requirements.B");
- changeRefB2ADiffDescription = changedReference("Requirements.B", "source", null, "Requirements.A");
+ changeRefB2ADiffDescription = changedReference("Requirements.B", "source", null,
+ "Requirements.A");
}
final Diff changeRefA2CDiff = Iterators.find(differences.iterator(), changeRefA2CDiffDescription);
@@ -704,16 +727,21 @@ public class EquiComputingTest {
if (kind.equals(TestKind.LEFT)) {
changeRefA2CDiffDescription = changedReference("Requirements.A", "destination", "Requirements.B",
"Requirements.C");
- changeRefC2ADiffDescription = changedReference("Requirements.C", "source", null, "Requirements.A");
- deleteBDiffDescription = removedFromReference("Requirements", "containmentRef1", "Requirements.B");
- changeRefB2ADiffDescription = changedReference("Requirements.B", "source", "Requirements.A", null);
+ changeRefC2ADiffDescription = changedReference("Requirements.C", "source", null,
+ "Requirements.A");
+ deleteBDiffDescription = removedFromReference("Requirements", "containmentRef1",
+ "Requirements.B");
+ changeRefB2ADiffDescription = changedReference("Requirements.B", "source", "Requirements.A",
+ null);
addCDiffDescription = addedToReference("Requirements", "containmentRef1", "Requirements.C");
} else {
changeRefA2CDiffDescription = changedReference("Requirements.A", "destination", "Requirements.C",
"Requirements.B");
- changeRefC2ADiffDescription = changedReference("Requirements.C", "source", "Requirements.A", null);
+ changeRefC2ADiffDescription = changedReference("Requirements.C", "source", "Requirements.A",
+ null);
deleteBDiffDescription = addedToReference("Requirements", "containmentRef1", "Requirements.B");
- changeRefB2ADiffDescription = changedReference("Requirements.B", "source", null, "Requirements.A");
+ changeRefB2ADiffDescription = changedReference("Requirements.B", "source", null,
+ "Requirements.A");
addCDiffDescription = removedFromReference("Requirements", "containmentRef1", "Requirements.C");
}
diff --git a/plugins/org.eclipse.emf.compare.tests/src/org/eclipse/emf/compare/tests/fragmentation/FragmentationTest.java b/plugins/org.eclipse.emf.compare.tests/src/org/eclipse/emf/compare/tests/fragmentation/FragmentationTest.java
index e852f4f04..70749f326 100644
--- a/plugins/org.eclipse.emf.compare.tests/src/org/eclipse/emf/compare/tests/fragmentation/FragmentationTest.java
+++ b/plugins/org.eclipse.emf.compare.tests/src/org/eclipse/emf/compare/tests/fragmentation/FragmentationTest.java
@@ -132,8 +132,8 @@ public class FragmentationTest {
assertTrue(rightFragmentedNode.eContainer().eResource() == rightFragmentedNode.eResource());
// there should be no diff between left and right
- final Comparison lrCompare = EMFCompare.builder().build().compare(
- new DefaultComparisonScope(leftSet, rightSet, null));
+ final Comparison lrCompare = EMFCompare.builder().build()
+ .compare(new DefaultComparisonScope(leftSet, rightSet, null));
assertEquals(0, lrCompare.getDifferences().size());
// but there should be two diffs (a pseudo conflict resource change) when compared with origin
@@ -180,8 +180,8 @@ public class FragmentationTest {
assertTrue(rightFragmentedNode.eContainer().eResource() != rightFragmentedNode.eResource());
// there should be no diff between left and right
- final Comparison lrCompare = EMFCompare.builder().build().compare(
- new DefaultComparisonScope(leftSet, rightSet, null));
+ final Comparison lrCompare = EMFCompare.builder().build()
+ .compare(new DefaultComparisonScope(leftSet, rightSet, null));
assertTrue(lrCompare.getDifferences().isEmpty());
// And since we've undone the resource change, there are no diffs with origin either
@@ -268,8 +268,8 @@ public class FragmentationTest {
assertTrue(rightRootContent.get(0) == rightFragmentedNode);
// there should be no diff between left and right
- final Comparison lrCompare = EMFCompare.builder().build().compare(
- new DefaultComparisonScope(left, right, null));
+ final Comparison lrCompare = EMFCompare.builder().build()
+ .compare(new DefaultComparisonScope(left, right, null));
assertEquals(0, lrCompare.getDifferences().size());
// but there should be four diffs (conflicting 2-by-2) when compared with origin :
@@ -320,8 +320,8 @@ public class FragmentationTest {
assertTrue(rightRootContent.get(0).eIsProxy());
// there should be no diff between left and right
- final Comparison lrCompare = EMFCompare.builder().build().compare(
- new DefaultComparisonScope(left, right, null));
+ final Comparison lrCompare = EMFCompare.builder().build()
+ .compare(new DefaultComparisonScope(left, right, null));
assertEquals(0, lrCompare.getDifferences().size());
// And since we've undone the changes, there are no diffs with origin either
@@ -403,8 +403,8 @@ public class FragmentationTest {
assertTrue(rightFragmentedNode.eContainer().eResource() != rightFragmentedNode.eResource());
// there should be no diff between left and right
- final Comparison lrCompare = EMFCompare.builder().build().compare(
- new DefaultComparisonScope(leftSet, rightSet, null));
+ final Comparison lrCompare = EMFCompare.builder().build()
+ .compare(new DefaultComparisonScope(leftSet, rightSet, null));
assertEquals(0, lrCompare.getDifferences().size());
// but there should be two diffs (a pseudo conflict resource change) when compared with origin
@@ -456,8 +456,8 @@ public class FragmentationTest {
assertTrue(rightFragmentedNode.eContainer().eResource() == rightFragmentedNode.eResource());
// there should be no diff between left and right
- final Comparison lrCompare = EMFCompare.builder().build().compare(
- new DefaultComparisonScope(leftSet, rightSet, null));
+ final Comparison lrCompare = EMFCompare.builder().build()
+ .compare(new DefaultComparisonScope(leftSet, rightSet, null));
assertTrue(lrCompare.getDifferences().isEmpty());
// And since we've undone the resource change, there are no diffs with origin either
@@ -544,8 +544,8 @@ public class FragmentationTest {
assertTrue(rightRootContent.get(0).eIsProxy());
// there should be no diff between left and right
- final Comparison lrCompare = EMFCompare.builder().build().compare(
- new DefaultComparisonScope(left, right, null));
+ final Comparison lrCompare = EMFCompare.builder().build()
+ .compare(new DefaultComparisonScope(left, right, null));
assertEquals(0, lrCompare.getDifferences().size());
// but there should be four diffs (conflicting 2-by-2) when compared with origin :
@@ -596,8 +596,8 @@ public class FragmentationTest {
assertTrue(rightRootContent.get(0) == rightFragmentedNode);
// there should be no diff between left and right
- final Comparison lrCompare = EMFCompare.builder().build().compare(
- new DefaultComparisonScope(left, right, null));
+ final Comparison lrCompare = EMFCompare.builder().build()
+ .compare(new DefaultComparisonScope(left, right, null));
assertEquals(0, lrCompare.getDifferences().size());
// And since we've undone the changes, there are no diffs with origin either
@@ -677,8 +677,8 @@ public class FragmentationTest {
assertTrue(rightFragmentedNode.eContainer().eResource() != rightFragmentedNode.eResource());
// there should be no diff between left and right
- final Comparison lrCompare = EMFCompare.builder().build().compare(
- new DefaultComparisonScope(leftSet, rightSet, null));
+ final Comparison lrCompare = EMFCompare.builder().build()
+ .compare(new DefaultComparisonScope(leftSet, rightSet, null));
assertEquals(0, lrCompare.getDifferences().size());
// but there should be two diffs (a pseudo conflict resource change) when compared with origin
@@ -730,8 +730,8 @@ public class FragmentationTest {
assertTrue(rightFragmentedNode.eContainer().eResource() == rightFragmentedNode.eResource());
// there should be no diff between left and right
- final Comparison lrCompare = EMFCompare.builder().build().compare(
- new DefaultComparisonScope(leftSet, rightSet, null));
+ final Comparison lrCompare = EMFCompare.builder().build()
+ .compare(new DefaultComparisonScope(leftSet, rightSet, null));
assertTrue(lrCompare.getDifferences().isEmpty());
// And since we've undone the resource change, there are no diffs with origin either
@@ -818,8 +818,8 @@ public class FragmentationTest {
assertTrue(rightRootContent.get(0).eIsProxy());
// there should be no diff between left and right
- final Comparison lrCompare = EMFCompare.builder().build().compare(
- new DefaultComparisonScope(left, right, null));
+ final Comparison lrCompare = EMFCompare.builder().build()
+ .compare(new DefaultComparisonScope(left, right, null));
assertEquals(0, lrCompare.getDifferences().size());
// but there should be four diffs (conflicting 2-by-2) when compared with origin :
@@ -870,8 +870,8 @@ public class FragmentationTest {
assertTrue(rightRootContent.get(0) == rightFragmentedNode);
// there should be no diff between left and right
- final Comparison lrCompare = EMFCompare.builder().build().compare(
- new DefaultComparisonScope(left, right, null));
+ final Comparison lrCompare = EMFCompare.builder().build()
+ .compare(new DefaultComparisonScope(left, right, null));
assertEquals(0, lrCompare.getDifferences().size());
// And since we've undone the changes, there are no diffs with origin either
@@ -943,8 +943,8 @@ public class FragmentationTest {
assertEquals(1, right.getContents().size());
// there should be no diff between left and right
- final Comparison lrCompare = EMFCompare.builder().build().compare(
- new DefaultComparisonScope(leftSet, rightSet, null));
+ final Comparison lrCompare = EMFCompare.builder().build()
+ .compare(new DefaultComparisonScope(leftSet, rightSet, null));
assertEquals(0, lrCompare.getDifferences().size());
// but there should be two diffs (a pseudo conflict deletion) when compared with origin
@@ -1024,8 +1024,8 @@ public class FragmentationTest {
assertEquals(1, right.getContents().size());
// there should be no diff between left and right
- final Comparison lrCompare = EMFCompare.builder().build().compare(
- new DefaultComparisonScope(left, right, null));
+ final Comparison lrCompare = EMFCompare.builder().build()
+ .compare(new DefaultComparisonScope(left, right, null));
assertEquals(0, lrCompare.getDifferences().size());
// but there should be two diffs (a pseudo conflict deletion) when compared with origin
@@ -1125,8 +1125,8 @@ public class FragmentationTest {
assertEquals(2, right.getContents().size());
// there should be no diff between left and right
- final Comparison lrCompare = EMFCompare.builder().build().compare(
- new DefaultComparisonScope(leftSet, rightSet, null));
+ final Comparison lrCompare = EMFCompare.builder().build()
+ .compare(new DefaultComparisonScope(leftSet, rightSet, null));
assertEquals(0, lrCompare.getDifferences().size());
// but there should be two diffs (a pseudo conflict addition) when compared with origin
@@ -1210,8 +1210,8 @@ public class FragmentationTest {
assertEquals(2, right.getContents().size());
// there should be no diff between left and right
- final Comparison lrCompare = EMFCompare.builder().build().compare(
- new DefaultComparisonScope(left, right, null));
+ final Comparison lrCompare = EMFCompare.builder().build()
+ .compare(new DefaultComparisonScope(left, right, null));
assertEquals(0, lrCompare.getDifferences().size());
// but there should be two diffs (a pseudo conflict addition) when compared with origin
diff --git a/plugins/org.eclipse.emf.compare.tests/src/org/eclipse/emf/compare/tests/fragmentation/ResourceAttachmentChangeBug492261.java b/plugins/org.eclipse.emf.compare.tests/src/org/eclipse/emf/compare/tests/fragmentation/ResourceAttachmentChangeBug492261.java
index b3ee01c19..9ae4578a7 100644
--- a/plugins/org.eclipse.emf.compare.tests/src/org/eclipse/emf/compare/tests/fragmentation/ResourceAttachmentChangeBug492261.java
+++ b/plugins/org.eclipse.emf.compare.tests/src/org/eclipse/emf/compare/tests/fragmentation/ResourceAttachmentChangeBug492261.java
@@ -149,10 +149,10 @@ public class ResourceAttachmentChangeBug492261 {
final List<Diff> differences = comparison.getDifferences();
- Collection<Diff> racFilter = Collections2.filter(differences, Predicates
- .instanceOf(ResourceAttachmentChange.class));
- Collection<Diff> rcFilter = Collections2.filter(differences, Predicates
- .instanceOf(ReferenceChange.class));
+ Collection<Diff> racFilter = Collections2.filter(differences,
+ Predicates.instanceOf(ResourceAttachmentChange.class));
+ Collection<Diff> rcFilter = Collections2.filter(differences,
+ Predicates.instanceOf(ReferenceChange.class));
assertEquals(1, racFilter.size());
assertEquals(2, rcFilter.size());
Diff rac = racFilter.iterator().next();
@@ -200,10 +200,10 @@ public class ResourceAttachmentChangeBug492261 {
final List<Diff> differences = comparison.getDifferences();
- Collection<Diff> racFilter = Collections2.filter(differences, Predicates
- .instanceOf(ResourceAttachmentChange.class));
- Collection<Diff> rcFilter = Collections2.filter(differences, Predicates
- .instanceOf(ReferenceChange.class));
+ Collection<Diff> racFilter = Collections2.filter(differences,
+ Predicates.instanceOf(ResourceAttachmentChange.class));
+ Collection<Diff> rcFilter = Collections2.filter(differences,
+ Predicates.instanceOf(ReferenceChange.class));
assertEquals(1, racFilter.size());
assertEquals(2, rcFilter.size());
Diff rac = racFilter.iterator().next();
diff --git a/plugins/org.eclipse.emf.compare.tests/src/org/eclipse/emf/compare/tests/framework/EMFCompareAssert.java b/plugins/org.eclipse.emf.compare.tests/src/org/eclipse/emf/compare/tests/framework/EMFCompareAssert.java
index 0cb53c22e..f647af74b 100644
--- a/plugins/org.eclipse.emf.compare.tests/src/org/eclipse/emf/compare/tests/framework/EMFCompareAssert.java
+++ b/plugins/org.eclipse.emf.compare.tests/src/org/eclipse/emf/compare/tests/framework/EMFCompareAssert.java
@@ -57,7 +57,8 @@ public class EMFCompareAssert {
* @param scope
* The scope that has been used to create the given <code>comparison</code>.
*/
- public static void assertAllMatched(List<EObject> eObjects, Comparison comparison, IComparisonScope scope) {
+ public static void assertAllMatched(List<EObject> eObjects, Comparison comparison,
+ IComparisonScope scope) {
final Predicate<? super EObject> scopeFilter;
if (scope instanceof FilterComparisonScope) {
scopeFilter = getResourceChildrenFilteringPredicate((FilterComparisonScope)scope);
@@ -101,8 +102,8 @@ public class EMFCompareAssert {
*/
public static void assertChangedReference(List<Diff> differences, String qualifiedName,
String referenceName, String fromQualifiedName, String toQualifiedName, DifferenceSource side) {
- final Predicate<? super Diff> changedReferenceOnSide = and(fromSide(side), changedReference(
- qualifiedName, referenceName, fromQualifiedName, toQualifiedName));
+ final Predicate<? super Diff> changedReferenceOnSide = and(fromSide(side),
+ changedReference(qualifiedName, referenceName, fromQualifiedName, toQualifiedName));
final Diff matchingDiff = removeFirst(differences.iterator(), changedReferenceOnSide);
assertNotNull(matchingDiff);
}
@@ -132,8 +133,8 @@ public class EMFCompareAssert {
*/
public static void assertRemovedFromReference(List<Diff> differences, String qualifiedName,
String referenceName, String removedValueQualifiedName, DifferenceSource side) {
- final Predicate<? super Diff> removedFromReferenceOnSide = and(fromSide(side), removedFromReference(
- qualifiedName, referenceName, removedValueQualifiedName));
+ final Predicate<? super Diff> removedFromReferenceOnSide = and(fromSide(side),
+ removedFromReference(qualifiedName, referenceName, removedValueQualifiedName));
final Diff matchingDiff = removeFirst(differences.iterator(), removedFromReferenceOnSide);
assertNotNull(matchingDiff);
}
@@ -162,8 +163,8 @@ public class EMFCompareAssert {
*/
public static void assertAddedToReference(List<Diff> differences, String qualifiedName,
String referenceName, String addedValueQualifiedName, DifferenceSource side) {
- final Predicate<? super Diff> addedToReferenceOnSide = and(fromSide(side), addedToReference(
- qualifiedName, referenceName, addedValueQualifiedName));
+ final Predicate<? super Diff> addedToReferenceOnSide = and(fromSide(side),
+ addedToReference(qualifiedName, referenceName, addedValueQualifiedName));
final Diff matchingDiff = removeFirst(differences.iterator(), addedToReferenceOnSide);
assertNotNull(matchingDiff);
}
@@ -195,8 +196,8 @@ public class EMFCompareAssert {
*/
public static void assertChangedAttribute(List<Diff> differences, String qualifiedName,
String attributeName, Object fromValue, Object toValue, DifferenceSource side) {
- final Predicate<? super Diff> changedAttributeOnSide = and(fromSide(side), changedAttribute(
- qualifiedName, attributeName, fromValue, toValue));
+ final Predicate<? super Diff> changedAttributeOnSide = and(fromSide(side),
+ changedAttribute(qualifiedName, attributeName, fromValue, toValue));
final Diff matchingDiff = removeFirst(differences.iterator(), changedAttributeOnSide);
assertNotNull(matchingDiff);
}
diff --git a/plugins/org.eclipse.emf.compare.tests/src/org/eclipse/emf/compare/tests/framework/junit/internal/ConflictStatement.java b/plugins/org.eclipse.emf.compare.tests/src/org/eclipse/emf/compare/tests/framework/junit/internal/ConflictStatement.java
index 7188adcb0..b6544d11a 100644
--- a/plugins/org.eclipse.emf.compare.tests/src/org/eclipse/emf/compare/tests/framework/junit/internal/ConflictStatement.java
+++ b/plugins/org.eclipse.emf.compare.tests/src/org/eclipse/emf/compare/tests/framework/junit/internal/ConflictStatement.java
@@ -118,11 +118,11 @@ public class ConflictStatement extends Statement {
// Swallow : we'll create a default engine instead.
}
if (engine == null) {
- final IEObjectMatcher contentMatcher = new ProximityEObjectMatcher(EditionDistance.builder()
- .weightProvider(new EcoreWeightProvider()).build());
+ final IEObjectMatcher contentMatcher = new ProximityEObjectMatcher(
+ EditionDistance.builder().weightProvider(new EcoreWeightProvider()).build());
final IEObjectMatcher matcher = new IdentifierEObjectMatcher(contentMatcher);
- engine = new DefaultMatchEngine(matcher, new DefaultComparisonFactory(
- new DefaultEqualityHelperFactory()));
+ engine = new DefaultMatchEngine(matcher,
+ new DefaultComparisonFactory(new DefaultEqualityHelperFactory()));
}
return engine;
}
@@ -170,8 +170,8 @@ public class ConflictStatement extends Statement {
IComparisonScope scope = null;
try {
- final Constructor<? extends IComparisonScope> constructor = scopeClass.getConstructor(
- Notifier.class, Notifier.class, Notifier.class);
+ final Constructor<? extends IComparisonScope> constructor = scopeClass
+ .getConstructor(Notifier.class, Notifier.class, Notifier.class);
scope = constructor.newInstance(tuple.getLeft(), tuple.getRight(), tuple.getOrigin());
// CHECKSTYLE:OFF invoking a constructor requires 7 catches. Since
// we're swallowing all exceptions, we simply catch everything.
diff --git a/plugins/org.eclipse.emf.compare.tests/src/org/eclipse/emf/compare/tests/framework/junit/internal/DiffStatement.java b/plugins/org.eclipse.emf.compare.tests/src/org/eclipse/emf/compare/tests/framework/junit/internal/DiffStatement.java
index 7fb9238a2..2d1cd568d 100644
--- a/plugins/org.eclipse.emf.compare.tests/src/org/eclipse/emf/compare/tests/framework/junit/internal/DiffStatement.java
+++ b/plugins/org.eclipse.emf.compare.tests/src/org/eclipse/emf/compare/tests/framework/junit/internal/DiffStatement.java
@@ -111,11 +111,11 @@ public class DiffStatement extends Statement {
// Swallow : we'll create a default engine instead.
}
if (engine == null) {
- final IEObjectMatcher contentMatcher = new ProximityEObjectMatcher(EditionDistance.builder()
- .weightProvider(new EcoreWeightProvider()).build());
+ final IEObjectMatcher contentMatcher = new ProximityEObjectMatcher(
+ EditionDistance.builder().weightProvider(new EcoreWeightProvider()).build());
final IEObjectMatcher matcher = new IdentifierEObjectMatcher(contentMatcher);
- engine = new DefaultMatchEngine(matcher, new DefaultComparisonFactory(
- new DefaultEqualityHelperFactory()));
+ engine = new DefaultMatchEngine(matcher,
+ new DefaultComparisonFactory(new DefaultEqualityHelperFactory()));
}
return engine;
}
@@ -163,8 +163,8 @@ public class DiffStatement extends Statement {
IComparisonScope scope = null;
try {
- final Constructor<? extends IComparisonScope> constructor = scopeClass.getConstructor(
- Notifier.class, Notifier.class, Notifier.class);
+ final Constructor<? extends IComparisonScope> constructor = scopeClass
+ .getConstructor(Notifier.class, Notifier.class, Notifier.class);
scope = constructor.newInstance(tuple.getLeft(), tuple.getRight(), tuple.getOrigin());
// CHECKSTYLE:OFF invoking a constructor requires 7 catches. Since
// we're swallowing all exceptions, we simply catch everything.
diff --git a/plugins/org.eclipse.emf.compare.tests/src/org/eclipse/emf/compare/tests/framework/junit/internal/MatchStatement.java b/plugins/org.eclipse.emf.compare.tests/src/org/eclipse/emf/compare/tests/framework/junit/internal/MatchStatement.java
index 67c881c7c..d5d2c5fa8 100644
--- a/plugins/org.eclipse.emf.compare.tests/src/org/eclipse/emf/compare/tests/framework/junit/internal/MatchStatement.java
+++ b/plugins/org.eclipse.emf.compare.tests/src/org/eclipse/emf/compare/tests/framework/junit/internal/MatchStatement.java
@@ -116,11 +116,11 @@ public class MatchStatement extends Statement {
// Swallow : we'll create a default engine instead.
}
if (engine == null) {
- final IEObjectMatcher contentMatcher = new ProximityEObjectMatcher(EditionDistance.builder()
- .weightProvider(new EcoreWeightProvider()).build());
+ final IEObjectMatcher contentMatcher = new ProximityEObjectMatcher(
+ EditionDistance.builder().weightProvider(new EcoreWeightProvider()).build());
final IEObjectMatcher matcher = new IdentifierEObjectMatcher(contentMatcher);
- engine = new DefaultMatchEngine(matcher, new DefaultComparisonFactory(
- new DefaultEqualityHelperFactory()));
+ engine = new DefaultMatchEngine(matcher,
+ new DefaultComparisonFactory(new DefaultEqualityHelperFactory()));
}
return engine;
}
@@ -142,8 +142,8 @@ public class MatchStatement extends Statement {
IComparisonScope scope = null;
try {
- final Constructor<? extends IComparisonScope> constructor = scopeClass.getConstructor(
- Notifier.class, Notifier.class, Notifier.class);
+ final Constructor<? extends IComparisonScope> constructor = scopeClass
+ .getConstructor(Notifier.class, Notifier.class, Notifier.class);
scope = constructor.newInstance(tuple.getLeft(), tuple.getRight(), tuple.getOrigin());
// CHECKSTYLE:OFF invoking a constructor requires 7 catches. Since
// we're swallowing all exceptions, we simply catch everything.
diff --git a/plugins/org.eclipse.emf.compare.tests/src/org/eclipse/emf/compare/tests/framework/junit/internal/UseCaseRunner.java b/plugins/org.eclipse.emf.compare.tests/src/org/eclipse/emf/compare/tests/framework/junit/internal/UseCaseRunner.java
index df62d3972..de435d834 100644
--- a/plugins/org.eclipse.emf.compare.tests/src/org/eclipse/emf/compare/tests/framework/junit/internal/UseCaseRunner.java
+++ b/plugins/org.eclipse.emf.compare.tests/src/org/eclipse/emf/compare/tests/framework/junit/internal/UseCaseRunner.java
@@ -86,8 +86,8 @@ public class UseCaseRunner extends BlockJUnit4ClassRunner {
*/
@Override
protected List<FrameworkMethod> computeTestMethods() {
- final List<FrameworkMethod> allMethods = Lists.newArrayList(getTestClass().getAnnotatedMethods(
- MatchTest.class));
+ final List<FrameworkMethod> allMethods = Lists
+ .newArrayList(getTestClass().getAnnotatedMethods(MatchTest.class));
allMethods.addAll(getTestClass().getAnnotatedMethods(DiffTest.class));
allMethods.addAll(getTestClass().getAnnotatedMethods(ConflictTest.class));
diff --git a/plugins/org.eclipse.emf.compare.tests/src/org/eclipse/emf/compare/tests/fullcomparison/DistanceAxiomsTests.java b/plugins/org.eclipse.emf.compare.tests/src/org/eclipse/emf/compare/tests/fullcomparison/DistanceAxiomsTests.java
index 03885529d..e9f3dbc19 100644
--- a/plugins/org.eclipse.emf.compare.tests/src/org/eclipse/emf/compare/tests/fullcomparison/DistanceAxiomsTests.java
+++ b/plugins/org.eclipse.emf.compare.tests/src/org/eclipse/emf/compare/tests/fullcomparison/DistanceAxiomsTests.java
@@ -80,9 +80,10 @@ public class DistanceAxiomsTests {
double xToz = meter.distance(comparison, x, z);
double xToy = meter.distance(comparison, x, y);
double yToz = meter.distance(comparison, y, z);
- assertTrue("Triangular inequality (x-z <= x-y + y-z ) failed (" + xToz + "<=" + xToy + " + " + yToz
- + ")for \nx:" + x.toString() + "\n|y:" + y.toString() + "\n|z:" + z.toString(), xToz <= xToy
- + yToz);
+ assertTrue(
+ "Triangular inequality (x-z <= x-y + y-z ) failed (" + xToz + "<=" + xToy + " + " + yToz
+ + ")for \nx:" + x.toString() + "\n|y:" + y.toString() + "\n|z:" + z.toString(),
+ xToz <= xToy + yToz);
}
}
diff --git a/plugins/org.eclipse.emf.compare.tests/src/org/eclipse/emf/compare/tests/fullcomparison/DynamicInstanceComparisonTest.java b/plugins/org.eclipse.emf.compare.tests/src/org/eclipse/emf/compare/tests/fullcomparison/DynamicInstanceComparisonTest.java
index c6d6fca2c..57ee54ffd 100644
--- a/plugins/org.eclipse.emf.compare.tests/src/org/eclipse/emf/compare/tests/fullcomparison/DynamicInstanceComparisonTest.java
+++ b/plugins/org.eclipse.emf.compare.tests/src/org/eclipse/emf/compare/tests/fullcomparison/DynamicInstanceComparisonTest.java
@@ -58,44 +58,44 @@ public class DynamicInstanceComparisonTest {
public void compare2Ways() throws IOException {
final IComparisonScope scope = new DefaultComparisonScope(left, right, null);
Comparison result = EMFCompare.builder().build().compare(scope);
- assertEquals("We are supposed to have one difference (ADD/REMOVE of an instance)", 1, result
- .getDifferences().size());
+ assertEquals("We are supposed to have one difference (ADD/REMOVE of an instance)", 1,
+ result.getDifferences().size());
}
@Test
public void compare3Ways() throws IOException {
final IComparisonScope scope = new DefaultComparisonScope(left, right, origin);
Comparison result = EMFCompare.builder().build().compare(scope);
- assertEquals("We are supposed to have one difference (ADD/REMOVE of an instance)", 1, result
- .getDifferences().size());
+ assertEquals("We are supposed to have one difference (ADD/REMOVE of an instance)", 1,
+ result.getDifferences().size());
}
@Test
public void copyLeftToRight() throws IOException {
final IComparisonScope scope = new DefaultComparisonScope(left, right, null);
Comparison result = EMFCompare.builder().build().compare(scope);
- assertEquals("We are supposed to have one difference (ADD/REMOVE of an instance)", 1, result
- .getDifferences().size());
+ assertEquals("We are supposed to have one difference (ADD/REMOVE of an instance)", 1,
+ result.getDifferences().size());
final IBatchMerger merger = new BatchMerger(mergerRegistry);
merger.copyAllLeftToRight(result.getDifferences(), new BasicMonitor());
- assertEquals("We are supposed to have no difference as we merged everything", 0, EMFCompare.builder()
- .build().compare(scope).getDifferences().size());
+ assertEquals("We are supposed to have no difference as we merged everything", 0,
+ EMFCompare.builder().build().compare(scope).getDifferences().size());
}
@Test
public void copyRightToLeft() throws IOException {
final IComparisonScope scope = new DefaultComparisonScope(left, right, null);
Comparison result = EMFCompare.builder().build().compare(scope);
- assertEquals("We are supposed to have one difference (ADD/REMOVE of an instance)", 1, result
- .getDifferences().size());
+ assertEquals("We are supposed to have one difference (ADD/REMOVE of an instance)", 1,
+ result.getDifferences().size());
final IBatchMerger merger = new BatchMerger(mergerRegistry);
merger.copyAllRightToLeft(result.getDifferences(), new BasicMonitor());
- assertEquals("We are supposed to have no difference as we merged everything", 0, EMFCompare.builder()
- .build().compare(scope).getDifferences().size());
+ assertEquals("We are supposed to have no difference as we merged everything", 0,
+ EMFCompare.builder().build().compare(scope).getDifferences().size());
}
}
diff --git a/plugins/org.eclipse.emf.compare.tests/src/org/eclipse/emf/compare/tests/fullcomparison/ExtLibraryTest.java b/plugins/org.eclipse.emf.compare.tests/src/org/eclipse/emf/compare/tests/fullcomparison/ExtLibraryTest.java
index 1f1004b35..fdbbdfbfa 100644
--- a/plugins/org.eclipse.emf.compare.tests/src/org/eclipse/emf/compare/tests/fullcomparison/ExtLibraryTest.java
+++ b/plugins/org.eclipse.emf.compare.tests/src/org/eclipse/emf/compare/tests/fullcomparison/ExtLibraryTest.java
@@ -104,8 +104,8 @@ public class ExtLibraryTest {
final Predicate<? super Diff> leftRemovedLastname = and(fromSide(DifferenceSource.LEFT),
removed("extlibrary.Person.lastName"));
- final Diff rightRenamedFamilyNameDiff = Iterators
- .find(differences.iterator(), rightRenamedFamilyname);
+ final Diff rightRenamedFamilyNameDiff = Iterators.find(differences.iterator(),
+ rightRenamedFamilyname);
final Diff leftRemovedLastNameDiff = Iterators.find(differences.iterator(), leftRemovedLastname);
final Conflict familyNameConflict = leftRemovedLastNameDiff.getConflict();
diff --git a/plugins/org.eclipse.emf.compare.tests/src/org/eclipse/emf/compare/tests/fullcomparison/IdentifierComparisonTest.java b/plugins/org.eclipse.emf.compare.tests/src/org/eclipse/emf/compare/tests/fullcomparison/IdentifierComparisonTest.java
index 0ec3769b9..a8a2c1377 100644
--- a/plugins/org.eclipse.emf.compare.tests/src/org/eclipse/emf/compare/tests/fullcomparison/IdentifierComparisonTest.java
+++ b/plugins/org.eclipse.emf.compare.tests/src/org/eclipse/emf/compare/tests/fullcomparison/IdentifierComparisonTest.java
@@ -172,15 +172,16 @@ public class IdentifierComparisonTest extends EMFCompareTestBase {
"extlibrary.TitledItem", side);
assertAddedToReference(differences, "extlibrary.AudioVisualItem", "eSuperTypes",
"extlibrary.TitledItem", side);
- assertAddedToReference(differences, "extlibrary.Magazine", "eSuperTypes",
- "extlibrary.Periodical", side);
+ assertAddedToReference(differences, "extlibrary.Magazine", "eSuperTypes", "extlibrary.Periodical",
+ side);
assertChangedReference(differences, "extlibrary.Book.subtitle", "eType", null, "ecore.EString",
side);
- assertChangedReference(differences, "extlibrary.TitledItem.title", "eType", null,
- "ecore.EString", side);
+ assertChangedReference(differences, "extlibrary.TitledItem.title", "eType", null, "ecore.EString",
+ side);
- assertChangedReference(differences, "extlibrary.Book.title", "eType", "ecore.EString", null, side);
+ assertChangedReference(differences, "extlibrary.Book.title", "eType", "ecore.EString", null,
+ side);
assertChangedReference(differences, "extlibrary.AudioVisualItem.title", "eType", "ecore.EString",
null, side);
@@ -199,10 +200,10 @@ public class IdentifierComparisonTest extends EMFCompareTestBase {
null, DifferenceSource.LEFT);
assertChangedReference(differences, "extlibrary.BookOnTape.reader", "eType", "extlibrary.Person",
null, DifferenceSource.RIGHT);
- assertChangedReference(differences, "extlibrary.Periodical.title", "eType", "ecore.EString",
- null, DifferenceSource.LEFT);
- assertChangedReference(differences, "extlibrary.Periodical.title", "eType", "ecore.EString",
- null, DifferenceSource.RIGHT);
+ assertChangedReference(differences, "extlibrary.Periodical.title", "eType", "ecore.EString", null,
+ DifferenceSource.LEFT);
+ assertChangedReference(differences, "extlibrary.Periodical.title", "eType", "ecore.EString", null,
+ DifferenceSource.RIGHT);
/*
* These changes can only be detected with an origin : lastName has been removed in the left model
* and thus only the removal can be detected in two-way. Likewise, "minutesLength" has been
@@ -228,8 +229,8 @@ public class IdentifierComparisonTest extends EMFCompareTestBase {
assertAdded(differences, "extlibrary.Book.title", side);
assertAdded(differences, "extlibrary.AudioVisualItem.title", side);
- assertRemovedFromReference(differences, "extlibrary.Book", "eSuperTypes",
- "extlibrary.TitledItem", side);
+ assertRemovedFromReference(differences, "extlibrary.Book", "eSuperTypes", "extlibrary.TitledItem",
+ side);
assertRemovedFromReference(differences, "extlibrary.Periodical", "eSuperTypes",
"extlibrary.TitledItem", side);
assertRemovedFromReference(differences, "extlibrary.AudioVisualItem", "eSuperTypes",
@@ -239,10 +240,11 @@ public class IdentifierComparisonTest extends EMFCompareTestBase {
assertChangedReference(differences, "extlibrary.Book.subtitle", "eType", "ecore.EString", null,
side);
- assertChangedReference(differences, "extlibrary.TitledItem.title", "eType", "ecore.EString",
- null, side);
+ assertChangedReference(differences, "extlibrary.TitledItem.title", "eType", "ecore.EString", null,
+ side);
- assertChangedReference(differences, "extlibrary.Book.title", "eType", null, "ecore.EString", side);
+ assertChangedReference(differences, "extlibrary.Book.title", "eType", null, "ecore.EString",
+ side);
assertChangedReference(differences, "extlibrary.AudioVisualItem.title", "eType", null,
"ecore.EString", side);
@@ -317,8 +319,8 @@ public class IdentifierComparisonTest extends EMFCompareTestBase {
assertRemoved(periodicalDiffs, "extlibrary.Periodical", DifferenceSource.LEFT);
assertAddedToReference(periodicalDiffs, "extlibrary.Periodical", "eSuperTypes",
"extlibrary.TitledItem", DifferenceSource.RIGHT);
- assertAddedToReference(periodicalDiffs, "extlibrary.Magazine", "eSuperTypes",
- "extlibrary.Periodical", DifferenceSource.RIGHT);
+ assertAddedToReference(periodicalDiffs, "extlibrary.Magazine", "eSuperTypes", "extlibrary.Periodical",
+ DifferenceSource.RIGHT);
assertTrue(periodicalDiffs.isEmpty());
final List<Diff> nameDiffs = Lists.newArrayList(lastNameConflict.getDifferences());
diff --git a/plugins/org.eclipse.emf.compare.tests/src/org/eclipse/emf/compare/tests/fullcomparison/MatchPerformanceComparisonTest.java b/plugins/org.eclipse.emf.compare.tests/src/org/eclipse/emf/compare/tests/fullcomparison/MatchPerformanceComparisonTest.java
index d4a031b64..376d09c6b 100644
--- a/plugins/org.eclipse.emf.compare.tests/src/org/eclipse/emf/compare/tests/fullcomparison/MatchPerformanceComparisonTest.java
+++ b/plugins/org.eclipse.emf.compare.tests/src/org/eclipse/emf/compare/tests/fullcomparison/MatchPerformanceComparisonTest.java
@@ -65,8 +65,8 @@ public class MatchPerformanceComparisonTest {
public void warmup() throws IOException {
final IEObjectMatcher contentMatcher = new ProximityEObjectMatcher(EditionDistance.builder().build());
final IEObjectMatcher matcher = new IdentifierEObjectMatcher(contentMatcher);
- IMatchEngine matchEngine = new DefaultMatchEngine(matcher, new DefaultComparisonFactory(
- new DefaultEqualityHelperFactory()));
+ IMatchEngine matchEngine = new DefaultMatchEngine(matcher,
+ new DefaultComparisonFactory(new DefaultEqualityHelperFactory()));
final IComparisonScope scope = new DefaultComparisonScope(left, right, origin);
matchEngine.match(scope, new BasicMonitor());
}
@@ -74,8 +74,8 @@ public class MatchPerformanceComparisonTest {
@Test
public void matchPerIdAlmostIdenticalModels() throws IOException {
final IEObjectMatcher matcher = new IdentifierEObjectMatcher();
- IMatchEngine matchEngine = new DefaultMatchEngine(matcher, new DefaultComparisonFactory(
- new DefaultEqualityHelperFactory()));
+ IMatchEngine matchEngine = new DefaultMatchEngine(matcher,
+ new DefaultComparisonFactory(new DefaultEqualityHelperFactory()));
final IComparisonScope scope = new DefaultComparisonScope(left, right, origin);
for (int i = 0; i < nbIterations; i++) {
matchEngine.match(scope, new BasicMonitor());
@@ -85,8 +85,8 @@ public class MatchPerformanceComparisonTest {
@Test
public void matchPerContentAlmostIdenticalModels() throws IOException {
final IEObjectMatcher contentMatcher = new ProximityEObjectMatcher(EditionDistance.builder().build());
- IMatchEngine matchEngine = new DefaultMatchEngine(contentMatcher, new DefaultComparisonFactory(
- new DefaultEqualityHelperFactory()));
+ IMatchEngine matchEngine = new DefaultMatchEngine(contentMatcher,
+ new DefaultComparisonFactory(new DefaultEqualityHelperFactory()));
final IComparisonScope scope = new DefaultComparisonScope(left, right, origin);
for (int i = 0; i < nbIterations; i++) {
matchEngine.match(scope, new BasicMonitor());
diff --git a/plugins/org.eclipse.emf.compare.tests/src/org/eclipse/emf/compare/tests/fullcomparison/ProximityComparisonTest.java b/plugins/org.eclipse.emf.compare.tests/src/org/eclipse/emf/compare/tests/fullcomparison/ProximityComparisonTest.java
index dd2776fcc..13fdee691 100644
--- a/plugins/org.eclipse.emf.compare.tests/src/org/eclipse/emf/compare/tests/fullcomparison/ProximityComparisonTest.java
+++ b/plugins/org.eclipse.emf.compare.tests/src/org/eclipse/emf/compare/tests/fullcomparison/ProximityComparisonTest.java
@@ -136,9 +136,8 @@ public class ProximityComparisonTest extends EMFCompareTestBase {
@Test
public void packageAddRemoveNoRename() throws Exception {
- final IComparisonScope scope = new DefaultComparisonScope(
- inputData.getPackageAddRemoveNoRenameLeft(), inputData.getPackageAddRemoveNoRenameRight(),
- null);
+ final IComparisonScope scope = new DefaultComparisonScope(inputData.getPackageAddRemoveNoRenameLeft(),
+ inputData.getPackageAddRemoveNoRenameRight(), null);
IMatchEngine.Factory.Registry matchEngineFactoryRegistry = new MatchEngineFactoryRegistryImpl();
matchEngineFactoryRegistry.add(new MatchEngineFactoryImpl(UseIdentifiers.NEVER));
Comparison result = EMFCompare.builder().setMatchEngineFactoryRegistry(matchEngineFactoryRegistry)
@@ -149,8 +148,8 @@ public class ProximityComparisonTest extends EMFCompareTestBase {
@Test
public void alwaysTakeTheClosestNoMatterTheIterationOrder() throws Exception {
- final IComparisonScope scope = new DefaultComparisonScope(inputData.getVerySmallLeft(), inputData
- .getVerySmallRight(), null);
+ final IComparisonScope scope = new DefaultComparisonScope(inputData.getVerySmallLeft(),
+ inputData.getVerySmallRight(), null);
IMatchEngine.Factory.Registry matchEngineFactoryRegistry = new MatchEngineFactoryRegistryImpl();
matchEngineFactoryRegistry.add(new MatchEngineFactoryImpl(UseIdentifiers.NEVER));
Comparison result = EMFCompare.builder().setMatchEngineFactoryRegistry(matchEngineFactoryRegistry)
@@ -163,16 +162,16 @@ public class ProximityComparisonTest extends EMFCompareTestBase {
@Test
public void addRemoveAndNotRename() throws Exception {
- final IComparisonScope scope = new DefaultComparisonScope(inputData.get391657Left(), inputData
- .get391657Right(), null);
+ final IComparisonScope scope = new DefaultComparisonScope(inputData.get391657Left(),
+ inputData.get391657Right(), null);
IMatchEngine.Factory.Registry matchEngineFactoryRegistry = new MatchEngineFactoryRegistryImpl();
WeightProvider.Descriptor.Registry weightProviderRegistry = new WeightProviderDescriptorRegistryImpl();
EcoreWeightProvider weightProvider = new EcoreWeightProvider();
WeightProviderDescriptorImpl descriptor = new WeightProviderDescriptorImpl(weightProvider, 100,
Pattern.compile(".*"));
weightProviderRegistry.put(weightProvider.getClass().getName(), descriptor);
- matchEngineFactoryRegistry.add(new MatchEngineFactoryImpl(UseIdentifiers.NEVER,
- weightProviderRegistry));
+ matchEngineFactoryRegistry
+ .add(new MatchEngineFactoryImpl(UseIdentifiers.NEVER, weightProviderRegistry));
Comparison result = EMFCompare.builder().setMatchEngineFactoryRegistry(matchEngineFactoryRegistry)
.build().compare(scope);
Iterator<AttributeChange> attrChanges = Iterators.filter(result.getDifferences().iterator(),
@@ -184,8 +183,8 @@ public class ProximityComparisonTest extends EMFCompareTestBase {
@Test
public void resourceRootChange() throws Exception {
- final IComparisonScope scope = new DefaultComparisonScope(inputData.get390666Left(), inputData
- .get390666Right(), inputData.get390666Ancestor());
+ final IComparisonScope scope = new DefaultComparisonScope(inputData.get390666Left(),
+ inputData.get390666Right(), inputData.get390666Ancestor());
IMatchEngine.Factory.Registry matchEngineFactoryRegistry = new MatchEngineFactoryRegistryImpl();
matchEngineFactoryRegistry.add(new MatchEngineFactoryImpl(UseIdentifiers.NEVER));
Comparison result = EMFCompare.builder().setMatchEngineFactoryRegistry(matchEngineFactoryRegistry)
@@ -201,8 +200,8 @@ public class ProximityComparisonTest extends EMFCompareTestBase {
* See bug #391798 : moving elements a lot in a reference (like in changing index) should not affect
* the matching very much.
*/
- final IComparisonScope scope = new DefaultComparisonScope(inputData.get391798Left(), inputData
- .get391798Right(), null);
+ final IComparisonScope scope = new DefaultComparisonScope(inputData.get391798Left(),
+ inputData.get391798Right(), null);
IMatchEngine.Factory.Registry matchEngineFactoryRegistry = new MatchEngineFactoryRegistryImpl();
matchEngineFactoryRegistry.add(new MatchEngineFactoryImpl(UseIdentifiers.NEVER));
Comparison result = EMFCompare.builder().setMatchEngineFactoryRegistry(matchEngineFactoryRegistry)
diff --git a/plugins/org.eclipse.emf.compare.tests/src/org/eclipse/emf/compare/tests/match/IdentifierEObjectMatcherTest.java b/plugins/org.eclipse.emf.compare.tests/src/org/eclipse/emf/compare/tests/match/IdentifierEObjectMatcherTest.java
index 46a736811..e62a86e34 100644
--- a/plugins/org.eclipse.emf.compare.tests/src/org/eclipse/emf/compare/tests/match/IdentifierEObjectMatcherTest.java
+++ b/plugins/org.eclipse.emf.compare.tests/src/org/eclipse/emf/compare/tests/match/IdentifierEObjectMatcherTest.java
@@ -71,8 +71,8 @@ public class IdentifierEObjectMatcherTest {
List<EObject> rightEObjectsNoID = Lists.newArrayList();
List<EObject> originEObjectsNoID = Lists.newArrayList();
- Set<Match> matches = matcher.matchPerId(leftEObjects, rightEObjects, originEObjects,
- leftEObjectsNoID, rightEObjectsNoID, originEObjectsNoID);
+ Set<Match> matches = matcher.matchPerId(leftEObjects, rightEObjects, originEObjects, leftEObjectsNoID,
+ rightEObjectsNoID, originEObjectsNoID);
assertEquals(1, matches.size());
Match rootMatch = matches.iterator().next();
diff --git a/plugins/org.eclipse.emf.compare.tests/src/org/eclipse/emf/compare/tests/match/ProximityIndexTest.java b/plugins/org.eclipse.emf.compare.tests/src/org/eclipse/emf/compare/tests/match/ProximityIndexTest.java
index 1628d676e..0f5388965 100644
--- a/plugins/org.eclipse.emf.compare.tests/src/org/eclipse/emf/compare/tests/match/ProximityIndexTest.java
+++ b/plugins/org.eclipse.emf.compare.tests/src/org/eclipse/emf/compare/tests/match/ProximityIndexTest.java
@@ -57,8 +57,7 @@ public class ProximityIndexTest {
Comparison comp = CompareFactory.eINSTANCE.createComparison();
for (EObject leftElement : index.getValuesStillThere(Side.LEFT)) {
- assertNull(
- "With a distance which always return Double.MAX_VALUE we should never find a closest.",
+ assertNull("With a distance which always return Double.MAX_VALUE we should never find a closest.",
index.findClosests(comp, leftElement, Side.LEFT));
}
diff --git a/plugins/org.eclipse.emf.compare.tests/src/org/eclipse/emf/compare/tests/match/RootIDMatchingTest.java b/plugins/org.eclipse.emf.compare.tests/src/org/eclipse/emf/compare/tests/match/RootIDMatchingTest.java
index 277ca91cf..df71bd0cd 100644
--- a/plugins/org.eclipse.emf.compare.tests/src/org/eclipse/emf/compare/tests/match/RootIDMatchingTest.java
+++ b/plugins/org.eclipse.emf.compare.tests/src/org/eclipse/emf/compare/tests/match/RootIDMatchingTest.java
@@ -328,8 +328,7 @@ public class RootIDMatchingTest {
String origin) {
boolean foundMatching = false;
for (MatchResource matchResource : matchResources) {
- if (nameEquals(matchResource.getLeftURI(), left)
- && nameEquals(matchResource.getRightURI(), right)
+ if (nameEquals(matchResource.getLeftURI(), left) && nameEquals(matchResource.getRightURI(), right)
&& nameEquals(matchResource.getOriginURI(), origin)) {
foundMatching = true;
break;
diff --git a/plugins/org.eclipse.emf.compare.tests/src/org/eclipse/emf/compare/tests/merge/Bug485266_MoveDeleteConflict_Test.java b/plugins/org.eclipse.emf.compare.tests/src/org/eclipse/emf/compare/tests/merge/Bug485266_MoveDeleteConflict_Test.java
index 692fc8d6c..9d3252c55 100644
--- a/plugins/org.eclipse.emf.compare.tests/src/org/eclipse/emf/compare/tests/merge/Bug485266_MoveDeleteConflict_Test.java
+++ b/plugins/org.eclipse.emf.compare.tests/src/org/eclipse/emf/compare/tests/merge/Bug485266_MoveDeleteConflict_Test.java
@@ -198,8 +198,8 @@ public class Bug485266_MoveDeleteConflict_Test extends AbstractMergerTest {
test3RightToLeft, test3LeftToRight, test5RightToLeft, test5LeftToRight);
}
- public Bug485266_MoveDeleteConflict_Test(final Resource origin, final Resource left,
- final Resource right, final boolean rightToLeft, final Resource expected) {
+ public Bug485266_MoveDeleteConflict_Test(final Resource origin, final Resource left, final Resource right,
+ final boolean rightToLeft, final Resource expected) {
super(origin, left, right, rightToLeft, expected, IMerger.RegistryImpl.createStandaloneInstance());
}
diff --git a/plugins/org.eclipse.emf.compare.tests/src/org/eclipse/emf/compare/tests/merge/ComplexMergeTest.java b/plugins/org.eclipse.emf.compare.tests/src/org/eclipse/emf/compare/tests/merge/ComplexMergeTest.java
index c7b600962..0b66e2724 100644
--- a/plugins/org.eclipse.emf.compare.tests/src/org/eclipse/emf/compare/tests/merge/ComplexMergeTest.java
+++ b/plugins/org.eclipse.emf.compare.tests/src/org/eclipse/emf/compare/tests/merge/ComplexMergeTest.java
@@ -104,17 +104,18 @@ public class ComplexMergeTest {
@SuppressWarnings("unchecked")
@Parameters
public static Iterable<Object[]> data() {
- Collection<List<Predicate<? super Diff>>> rightConflictPermutations = permutations(Arrays
- .<Predicate<? super Diff>> asList(added("Root.Node0"), //$NON-NLS-1$
- moved("Root.Node1", "containmentRef1"), moved("Root.Node6", //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$
- "containmentRef1"), added("Root.Node9"))); //$NON-NLS-1$ //$NON-NLS-2$
- Collection<List<Predicate<? super Diff>>> leftConflictPermutations = permutations(Arrays
- .<Predicate<? super Diff>> asList(added("Root.Node0"), //$NON-NLS-1$
+ Collection<List<Predicate<? super Diff>>> rightConflictPermutations = permutations(
+ Arrays.<Predicate<? super Diff>> asList(added("Root.Node0"), //$NON-NLS-1$
+ moved("Root.Node1", "containmentRef1"), moved("Root.Node6", //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$
+ "containmentRef1"), //$NON-NLS-1$
+ added("Root.Node9"))); //$NON-NLS-1$
+ Collection<List<Predicate<? super Diff>>> leftConflictPermutations = permutations(
+ Arrays.<Predicate<? super Diff>> asList(added("Root.Node0"), //$NON-NLS-1$
moved("Root.Node1", "containmentRef1"), removed("Root.Node5"), removed("Root.Node6"), //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
added("Root.Node9"))); //$NON-NLS-1$
- Collection<List<Predicate<? super Diff>>> otherPermutations = permutations(Arrays
- .<Predicate<? super Diff>> asList(
- and(fromSide(LEFT), removed("Root.Node5")), and(fromSide(LEFT), removed("Root.Node7")), and( //$NON-NLS-1$ //$NON-NLS-2$
+ Collection<List<Predicate<? super Diff>>> otherPermutations = permutations(
+ Arrays.<Predicate<? super Diff>> asList(and(fromSide(LEFT), removed("Root.Node5")), //$NON-NLS-1$
+ and(fromSide(LEFT), removed("Root.Node7")), and( //$NON-NLS-1$
fromSide(LEFT), added("Root.Node8")))); //$NON-NLS-1$
List<Object[]> data = new ArrayList<Object[]>();
diff --git a/plugins/org.eclipse.emf.compare.tests/src/org/eclipse/emf/compare/tests/merge/ConflictImplicationsTest_Bug484579.java b/plugins/org.eclipse.emf.compare.tests/src/org/eclipse/emf/compare/tests/merge/ConflictImplicationsTest_Bug484579.java
index 2dbbf7e5a..c7bc8b645 100644
--- a/plugins/org.eclipse.emf.compare.tests/src/org/eclipse/emf/compare/tests/merge/ConflictImplicationsTest_Bug484579.java
+++ b/plugins/org.eclipse.emf.compare.tests/src/org/eclipse/emf/compare/tests/merge/ConflictImplicationsTest_Bug484579.java
@@ -150,10 +150,10 @@ public class ConflictImplicationsTest_Bug484579 {
assertEquals(9, comparison.getDifferences().size());
assertEquals(3, conflicts.size());
- Collection<Conflict> pseudoConflicts = Collections2.filter(conflicts, EMFComparePredicates
- .containsConflictOfTypes(PSEUDO));
- Collection<Conflict> realConflicts = Collections2.filter(conflicts, EMFComparePredicates
- .containsConflictOfTypes(REAL));
+ Collection<Conflict> pseudoConflicts = Collections2.filter(conflicts,
+ EMFComparePredicates.containsConflictOfTypes(PSEUDO));
+ Collection<Conflict> realConflicts = Collections2.filter(conflicts,
+ EMFComparePredicates.containsConflictOfTypes(REAL));
assertEquals(1, pseudoConflicts.size());
assertEquals(2, realConflicts.size());
@@ -256,10 +256,10 @@ public class ConflictImplicationsTest_Bug484579 {
assertEquals(17, comparison.getDifferences().size());
assertEquals(3, conflicts.size());
- Collection<Conflict> pseudoConflicts = Collections2.filter(conflicts, EMFComparePredicates
- .containsConflictOfTypes(PSEUDO));
- Collection<Conflict> realConflicts = Collections2.filter(conflicts, EMFComparePredicates
- .containsConflictOfTypes(REAL));
+ Collection<Conflict> pseudoConflicts = Collections2.filter(conflicts,
+ EMFComparePredicates.containsConflictOfTypes(PSEUDO));
+ Collection<Conflict> realConflicts = Collections2.filter(conflicts,
+ EMFComparePredicates.containsConflictOfTypes(REAL));
assertEquals(2, pseudoConflicts.size());
assertEquals(1, realConflicts.size());
diff --git a/plugins/org.eclipse.emf.compare.tests/src/org/eclipse/emf/compare/tests/merge/ConflictMergeTest.java b/plugins/org.eclipse.emf.compare.tests/src/org/eclipse/emf/compare/tests/merge/ConflictMergeTest.java
index 9c06e5476..9d275deae 100644
--- a/plugins/org.eclipse.emf.compare.tests/src/org/eclipse/emf/compare/tests/merge/ConflictMergeTest.java
+++ b/plugins/org.eclipse.emf.compare.tests/src/org/eclipse/emf/compare/tests/merge/ConflictMergeTest.java
@@ -79,24 +79,21 @@ public class ConflictMergeTest {
final String featureName = "containmentRef1";
- final Diff diffNodeCLeft = Iterators.find(differences.iterator(), and(
- fromSide(DifferenceSource.LEFT), ofKind(DifferenceKind.ADD), referenceValueMatch(featureName,
- "root.A.C", true)));
- final Diff diffNodeCRight = Iterators.find(differences.iterator(), and(
- fromSide(DifferenceSource.RIGHT), ofKind(DifferenceKind.ADD), referenceValueMatch(
- featureName, "root.B.C", true)));
- final Diff diffNodeDLeft = Iterators.find(differences.iterator(), and(
- fromSide(DifferenceSource.LEFT), ofKind(DifferenceKind.ADD), referenceValueMatch(featureName,
- "root.A.C.D", true)));
- final Diff diffNodeDRight = Iterators.find(differences.iterator(), and(
- fromSide(DifferenceSource.RIGHT), ofKind(DifferenceKind.ADD), referenceValueMatch(
- featureName, "root.B.C.D", true)));
- final Diff diffNodeELeft = Iterators.find(differences.iterator(), and(
- fromSide(DifferenceSource.LEFT), ofKind(DifferenceKind.ADD), referenceValueMatch(featureName,
- "root.A.C.E", true)));
- final Diff diffNodeFRight = Iterators.find(differences.iterator(), and(
- fromSide(DifferenceSource.RIGHT), ofKind(DifferenceKind.ADD), referenceValueMatch(
- featureName, "root.B.C.F", true)));
+ final Diff diffNodeCLeft = Iterators.find(differences.iterator(), and(fromSide(DifferenceSource.LEFT),
+ ofKind(DifferenceKind.ADD), referenceValueMatch(featureName, "root.A.C", true)));
+ final Diff diffNodeCRight = Iterators.find(differences.iterator(),
+ and(fromSide(DifferenceSource.RIGHT), ofKind(DifferenceKind.ADD),
+ referenceValueMatch(featureName, "root.B.C", true)));
+ final Diff diffNodeDLeft = Iterators.find(differences.iterator(), and(fromSide(DifferenceSource.LEFT),
+ ofKind(DifferenceKind.ADD), referenceValueMatch(featureName, "root.A.C.D", true)));
+ final Diff diffNodeDRight = Iterators.find(differences.iterator(),
+ and(fromSide(DifferenceSource.RIGHT), ofKind(DifferenceKind.ADD),
+ referenceValueMatch(featureName, "root.B.C.D", true)));
+ final Diff diffNodeELeft = Iterators.find(differences.iterator(), and(fromSide(DifferenceSource.LEFT),
+ ofKind(DifferenceKind.ADD), referenceValueMatch(featureName, "root.A.C.E", true)));
+ final Diff diffNodeFRight = Iterators.find(differences.iterator(),
+ and(fromSide(DifferenceSource.RIGHT), ofKind(DifferenceKind.ADD),
+ referenceValueMatch(featureName, "root.B.C.F", true)));
// Merge C[containmentRef1 add] from left side from left to right : C[containmentRef1 add] from right
// side will be merge from left to right too.
@@ -145,24 +142,21 @@ public class ConflictMergeTest {
final String featureName = "containmentRef1";
- final Diff diffNodeCLeft = Iterators.find(differences.iterator(), and(
- fromSide(DifferenceSource.LEFT), ofKind(DifferenceKind.ADD), referenceValueMatch(featureName,
- "root.A.C", true)));
- final Diff diffNodeCRight = Iterators.find(differences.iterator(), and(
- fromSide(DifferenceSource.RIGHT), ofKind(DifferenceKind.ADD), referenceValueMatch(
- featureName, "root.B.C", true)));
- final Diff diffNodeDLeft = Iterators.find(differences.iterator(), and(
- fromSide(DifferenceSource.LEFT), ofKind(DifferenceKind.ADD), referenceValueMatch(featureName,
- "root.A.C.D", true)));
- final Diff diffNodeDRight = Iterators.find(differences.iterator(), and(
- fromSide(DifferenceSource.RIGHT), ofKind(DifferenceKind.ADD), referenceValueMatch(
- featureName, "root.B.C.D", true)));
- final Diff diffNodeELeft = Iterators.find(differences.iterator(), and(
- fromSide(DifferenceSource.LEFT), ofKind(DifferenceKind.ADD), referenceValueMatch(featureName,
- "root.A.C.E", true)));
- final Diff diffNodeFRight = Iterators.find(differences.iterator(), and(
- fromSide(DifferenceSource.RIGHT), ofKind(DifferenceKind.ADD), referenceValueMatch(
- featureName, "root.B.C.F", true)));
+ final Diff diffNodeCLeft = Iterators.find(differences.iterator(), and(fromSide(DifferenceSource.LEFT),
+ ofKind(DifferenceKind.ADD), referenceValueMatch(featureName, "root.A.C", true)));
+ final Diff diffNodeCRight = Iterators.find(differences.iterator(),
+ and(fromSide(DifferenceSource.RIGHT), ofKind(DifferenceKind.ADD),
+ referenceValueMatch(featureName, "root.B.C", true)));
+ final Diff diffNodeDLeft = Iterators.find(differences.iterator(), and(fromSide(DifferenceSource.LEFT),
+ ofKind(DifferenceKind.ADD), referenceValueMatch(featureName, "root.A.C.D", true)));
+ final Diff diffNodeDRight = Iterators.find(differences.iterator(),
+ and(fromSide(DifferenceSource.RIGHT), ofKind(DifferenceKind.ADD),
+ referenceValueMatch(featureName, "root.B.C.D", true)));
+ final Diff diffNodeELeft = Iterators.find(differences.iterator(), and(fromSide(DifferenceSource.LEFT),
+ ofKind(DifferenceKind.ADD), referenceValueMatch(featureName, "root.A.C.E", true)));
+ final Diff diffNodeFRight = Iterators.find(differences.iterator(),
+ and(fromSide(DifferenceSource.RIGHT), ofKind(DifferenceKind.ADD),
+ referenceValueMatch(featureName, "root.B.C.F", true)));
// Merge C[containmentRef1 add] from right side from left to right : C[containmentRef1 add] from left
// side will not be merge
@@ -211,24 +205,21 @@ public class ConflictMergeTest {
final String featureName = "containmentRef1";
- final Diff diffNodeCLeft = Iterators.find(differences.iterator(), and(
- fromSide(DifferenceSource.LEFT), ofKind(DifferenceKind.ADD), referenceValueMatch(featureName,
- "root.A.C", true)));
- final Diff diffNodeCRight = Iterators.find(differences.iterator(), and(
- fromSide(DifferenceSource.RIGHT), ofKind(DifferenceKind.ADD), referenceValueMatch(
- featureName, "root.B.C", true)));
- final Diff diffNodeDLeft = Iterators.find(differences.iterator(), and(
- fromSide(DifferenceSource.LEFT), ofKind(DifferenceKind.ADD), referenceValueMatch(featureName,
- "root.A.C.D", true)));
- final Diff diffNodeDRight = Iterators.find(differences.iterator(), and(
- fromSide(DifferenceSource.RIGHT), ofKind(DifferenceKind.ADD), referenceValueMatch(
- featureName, "root.B.C.D", true)));
- final Diff diffNodeELeft = Iterators.find(differences.iterator(), and(
- fromSide(DifferenceSource.LEFT), ofKind(DifferenceKind.ADD), referenceValueMatch(featureName,
- "root.A.C.E", true)));
- final Diff diffNodeFRight = Iterators.find(differences.iterator(), and(
- fromSide(DifferenceSource.RIGHT), ofKind(DifferenceKind.ADD), referenceValueMatch(
- featureName, "root.B.C.F", true)));
+ final Diff diffNodeCLeft = Iterators.find(differences.iterator(), and(fromSide(DifferenceSource.LEFT),
+ ofKind(DifferenceKind.ADD), referenceValueMatch(featureName, "root.A.C", true)));
+ final Diff diffNodeCRight = Iterators.find(differences.iterator(),
+ and(fromSide(DifferenceSource.RIGHT), ofKind(DifferenceKind.ADD),
+ referenceValueMatch(featureName, "root.B.C", true)));
+ final Diff diffNodeDLeft = Iterators.find(differences.iterator(), and(fromSide(DifferenceSource.LEFT),
+ ofKind(DifferenceKind.ADD), referenceValueMatch(featureName, "root.A.C.D", true)));
+ final Diff diffNodeDRight = Iterators.find(differences.iterator(),
+ and(fromSide(DifferenceSource.RIGHT), ofKind(DifferenceKind.ADD),
+ referenceValueMatch(featureName, "root.B.C.D", true)));
+ final Diff diffNodeELeft = Iterators.find(differences.iterator(), and(fromSide(DifferenceSource.LEFT),
+ ofKind(DifferenceKind.ADD), referenceValueMatch(featureName, "root.A.C.E", true)));
+ final Diff diffNodeFRight = Iterators.find(differences.iterator(),
+ and(fromSide(DifferenceSource.RIGHT), ofKind(DifferenceKind.ADD),
+ referenceValueMatch(featureName, "root.B.C.F", true)));
// Merge C[containmentRef1 add] from left side from right to left : C[containmentRef1 add] from right
// side will not be merge.
@@ -277,24 +268,21 @@ public class ConflictMergeTest {
final String featureName = "containmentRef1";
- final Diff diffNodeCLeft = Iterators.find(differences.iterator(), and(
- fromSide(DifferenceSource.LEFT), ofKind(DifferenceKind.ADD), referenceValueMatch(featureName,
- "root.A.C", true)));
- final Diff diffNodeCRight = Iterators.find(differences.iterator(), and(
- fromSide(DifferenceSource.RIGHT), ofKind(DifferenceKind.ADD), referenceValueMatch(
- featureName, "root.B.C", true)));
- final Diff diffNodeDLeft = Iterators.find(differences.iterator(), and(
- fromSide(DifferenceSource.LEFT), ofKind(DifferenceKind.ADD), referenceValueMatch(featureName,
- "root.A.C.D", true)));
- final Diff diffNodeDRight = Iterators.find(differences.iterator(), and(
- fromSide(DifferenceSource.RIGHT), ofKind(DifferenceKind.ADD), referenceValueMatch(
- featureName, "root.B.C.D", true)));
- final Diff diffNodeELeft = Iterators.find(differences.iterator(), and(
- fromSide(DifferenceSource.LEFT), ofKind(DifferenceKind.ADD), referenceValueMatch(featureName,
- "root.A.C.E", true)));
- final Diff diffNodeFRight = Iterators.find(differences.iterator(), and(
- fromSide(DifferenceSource.RIGHT), ofKind(DifferenceKind.ADD), referenceValueMatch(
- featureName, "root.B.C.F", true)));
+ final Diff diffNodeCLeft = Iterators.find(differences.iterator(), and(fromSide(DifferenceSource.LEFT),
+ ofKind(DifferenceKind.ADD), referenceValueMatch(featureName, "root.A.C", true)));
+ final Diff diffNodeCRight = Iterators.find(differences.iterator(),
+ and(fromSide(DifferenceSource.RIGHT), ofKind(DifferenceKind.ADD),
+ referenceValueMatch(featureName, "root.B.C", true)));
+ final Diff diffNodeDLeft = Iterators.find(differences.iterator(), and(fromSide(DifferenceSource.LEFT),
+ ofKind(DifferenceKind.ADD), referenceValueMatch(featureName, "root.A.C.D", true)));
+ final Diff diffNodeDRight = Iterators.find(differences.iterator(),
+ and(fromSide(DifferenceSource.RIGHT), ofKind(DifferenceKind.ADD),
+ referenceValueMatch(featureName, "root.B.C.D", true)));
+ final Diff diffNodeELeft = Iterators.find(differences.iterator(), and(fromSide(DifferenceSource.LEFT),
+ ofKind(DifferenceKind.ADD), referenceValueMatch(featureName, "root.A.C.E", true)));
+ final Diff diffNodeFRight = Iterators.find(differences.iterator(),
+ and(fromSide(DifferenceSource.RIGHT), ofKind(DifferenceKind.ADD),
+ referenceValueMatch(featureName, "root.B.C.F", true)));
// Merge C[containmentRef1 add] from right side from right to left : C[containmentRef1 add] from left
// side will be merge from right to left too.
diff --git a/plugins/org.eclipse.emf.compare.tests/src/org/eclipse/emf/compare/tests/merge/FeatureMaps2wayMergeTest.java b/plugins/org.eclipse.emf.compare.tests/src/org/eclipse/emf/compare/tests/merge/FeatureMaps2wayMergeTest.java
index 2120149f9..cfaa3e205 100644
--- a/plugins/org.eclipse.emf.compare.tests/src/org/eclipse/emf/compare/tests/merge/FeatureMaps2wayMergeTest.java
+++ b/plugins/org.eclipse.emf.compare.tests/src/org/eclipse/emf/compare/tests/merge/FeatureMaps2wayMergeTest.java
@@ -73,8 +73,8 @@ public class FeatureMaps2wayMergeTest {
List<Diff> differences = comparison.getDifferences();
assertEquals(4, differences.size());
- final Diff diff = Iterators.find(differences.iterator(), and(ofKind(DifferenceKind.ADD),
- instanceOf(ReferenceChange.class)));
+ final Diff diff = Iterators.find(differences.iterator(),
+ and(ofKind(DifferenceKind.ADD), instanceOf(ReferenceChange.class)));
// Merge the ReferenceChange Node node1[firstKey add] from left to right : the FeatureMapChange
// <firstKey> Node node1 [map add] will be merge from left to right too.
@@ -118,8 +118,8 @@ public class FeatureMaps2wayMergeTest {
List<Diff> differences = comparison.getDifferences();
assertEquals(4, differences.size());
- final Diff diff = Iterators.find(differences.iterator(), and(ofKind(DifferenceKind.ADD),
- instanceOf(FeatureMapChange.class)));
+ final Diff diff = Iterators.find(differences.iterator(),
+ and(ofKind(DifferenceKind.ADD), instanceOf(FeatureMapChange.class)));
// Merge the FeatureMapChange <firstKey> Node node1 [map add] from left to right : the ReferenceChange
// Node node1[firstKey add] will be merge from left to right too.
@@ -163,8 +163,8 @@ public class FeatureMaps2wayMergeTest {
List<Diff> differences = comparison.getDifferences();
assertEquals(4, differences.size());
- final Diff diff = Iterators.find(differences.iterator(), and(ofKind(DifferenceKind.ADD),
- instanceOf(ReferenceChange.class)));
+ final Diff diff = Iterators.find(differences.iterator(),
+ and(ofKind(DifferenceKind.ADD), instanceOf(ReferenceChange.class)));
// Merge the ReferenceChange Node node1[firstKey add] from right to left : the FeatureMapChange
// <firstKey> Node node1 [map add] will be merge from right to left too.
@@ -208,8 +208,8 @@ public class FeatureMaps2wayMergeTest {
List<Diff> differences = comparison.getDifferences();
assertEquals(4, differences.size());
- final Diff diff = Iterators.find(differences.iterator(), and(ofKind(DifferenceKind.ADD),
- instanceOf(FeatureMapChange.class)));
+ final Diff diff = Iterators.find(differences.iterator(),
+ and(ofKind(DifferenceKind.ADD), instanceOf(FeatureMapChange.class)));
// Merge the FeatureMapChange <firstKey> Node node1 [map add] from right to left : the
// ReferenceChange Node node1[firstKey add] will be merge from right to left too.
@@ -253,8 +253,8 @@ public class FeatureMaps2wayMergeTest {
List<Diff> differences = comparison.getDifferences();
assertEquals(4, differences.size());
- final Diff diff = Iterators.find(differences.iterator(), and(ofKind(DifferenceKind.DELETE),
- instanceOf(ReferenceChange.class)));
+ final Diff diff = Iterators.find(differences.iterator(),
+ and(ofKind(DifferenceKind.DELETE), instanceOf(ReferenceChange.class)));
// Merge the ReferenceChange Node node2[firstKey delete] from left to right : the FeatureMapChange
// <firstKey> Node node2 [map delete] will be merge from left to right too.
@@ -298,8 +298,8 @@ public class FeatureMaps2wayMergeTest {
List<Diff> differences = comparison.getDifferences();
assertEquals(4, differences.size());
- final Diff diff = Iterators.find(differences.iterator(), and(ofKind(DifferenceKind.DELETE),
- instanceOf(FeatureMapChange.class)));
+ final Diff diff = Iterators.find(differences.iterator(),
+ and(ofKind(DifferenceKind.DELETE), instanceOf(FeatureMapChange.class)));
// Merge the FeatureMapChange <firstKey> Node node2 [map delete] from left to right : the
// ReferenceChange Node node2[firstKey delete] will be merge from left to right too.
@@ -343,8 +343,8 @@ public class FeatureMaps2wayMergeTest {
List<Diff> differences = comparison.getDifferences();
assertEquals(4, differences.size());
- final Diff diff = Iterators.find(differences.iterator(), and(ofKind(DifferenceKind.DELETE),
- instanceOf(ReferenceChange.class)));
+ final Diff diff = Iterators.find(differences.iterator(),
+ and(ofKind(DifferenceKind.DELETE), instanceOf(ReferenceChange.class)));
// Merge the ReferenceChange Node node2[firstKey delete] from right to left: the FeatureMapChange
// <firstKey> Node node2 [map delete] will be merge from right to left too.
@@ -388,8 +388,8 @@ public class FeatureMaps2wayMergeTest {
List<Diff> differences = comparison.getDifferences();
assertEquals(4, differences.size());
- final Diff diff = Iterators.find(differences.iterator(), and(ofKind(DifferenceKind.DELETE),
- instanceOf(FeatureMapChange.class)));
+ final Diff diff = Iterators.find(differences.iterator(),
+ and(ofKind(DifferenceKind.DELETE), instanceOf(FeatureMapChange.class)));
// Merge the ReferenceChange Node node2[firstKey delete] from right to left: the FeatureMapChange
// <firstKey> Node node2 [map delete] will be merge from right to left too.
@@ -434,8 +434,8 @@ public class FeatureMaps2wayMergeTest {
List<Diff> differences = comparison.getDifferences();
assertEquals(4, differences.size());
- final Diff diff = Iterators.find(differences.iterator(), and(ofKind(DifferenceKind.MOVE),
- instanceOf(ReferenceChange.class)));
+ final Diff diff = Iterators.find(differences.iterator(),
+ and(ofKind(DifferenceKind.MOVE), instanceOf(ReferenceChange.class)));
// Merge the ReferenceChange Node node1[firstKey move] from left to right : the FeatureMapChange
// <firstKey> Node node1 [map entry key change] will be merge from left to right too.
@@ -480,8 +480,8 @@ public class FeatureMaps2wayMergeTest {
List<Diff> differences = comparison.getDifferences();
assertEquals(4, differences.size());
- final Diff diff = Iterators.find(differences.iterator(), and(ofKind(DifferenceKind.CHANGE),
- instanceOf(FeatureMapChange.class)));
+ final Diff diff = Iterators.find(differences.iterator(),
+ and(ofKind(DifferenceKind.CHANGE), instanceOf(FeatureMapChange.class)));
// Merge the FeatureMapChange <firstKey> Node node1 [map entry key change] from left to right : the
// ReferenceChange Node node1[firstKey move] will be merge from left to right too.
@@ -526,8 +526,8 @@ public class FeatureMaps2wayMergeTest {
List<Diff> differences = comparison.getDifferences();
assertEquals(4, differences.size());
- final Diff diff = Iterators.find(differences.iterator(), and(ofKind(DifferenceKind.MOVE),
- instanceOf(ReferenceChange.class)));
+ final Diff diff = Iterators.find(differences.iterator(),
+ and(ofKind(DifferenceKind.MOVE), instanceOf(ReferenceChange.class)));
// Merge the ReferenceChange Node node1[firstKey move] from right to left : the FeatureMapChange
// <firstKey> Node node1 [map entry key change] will be merge from right to left too.
@@ -572,8 +572,8 @@ public class FeatureMaps2wayMergeTest {
List<Diff> differences = comparison.getDifferences();
assertEquals(4, differences.size());
- final Diff diff = Iterators.find(differences.iterator(), and(ofKind(DifferenceKind.CHANGE),
- instanceOf(FeatureMapChange.class)));
+ final Diff diff = Iterators.find(differences.iterator(),
+ and(ofKind(DifferenceKind.CHANGE), instanceOf(FeatureMapChange.class)));
// Merge the FeatureMapChange <firstKey> Node node1 [map entry key change] from left to right : the
// ReferenceChange Node node1[firstKey move] will be merge from left to right too.
@@ -618,8 +618,8 @@ public class FeatureMaps2wayMergeTest {
List<Diff> differences = comparison.getDifferences();
assertEquals(4, differences.size());
- final Diff diff = Iterators.find(differences.iterator(), and(ofKind(DifferenceKind.MOVE),
- instanceOf(ReferenceChange.class)));
+ final Diff diff = Iterators.find(differences.iterator(),
+ and(ofKind(DifferenceKind.MOVE), instanceOf(ReferenceChange.class)));
// Merge the ReferenceChange Node node1[firstKey move] from left to right : the FeatureMapChange
// <firstKey> Node node1 [map move] will be merge from left to right too.
@@ -664,8 +664,8 @@ public class FeatureMaps2wayMergeTest {
List<Diff> differences = comparison.getDifferences();
assertEquals(4, differences.size());
- final Diff diff = Iterators.find(differences.iterator(), and(ofKind(DifferenceKind.MOVE),
- instanceOf(FeatureMapChange.class)));
+ final Diff diff = Iterators.find(differences.iterator(),
+ and(ofKind(DifferenceKind.MOVE), instanceOf(FeatureMapChange.class)));
// Merge the FeatureMapChange <firstKey> Node node1 [map move] from left to right : the
// ReferenceChange Node node1[firstKey move] will be merge from left to right too.
@@ -710,8 +710,8 @@ public class FeatureMaps2wayMergeTest {
List<Diff> differences = comparison.getDifferences();
assertEquals(4, differences.size());
- final Diff diff = Iterators.find(differences.iterator(), and(ofKind(DifferenceKind.MOVE),
- instanceOf(ReferenceChange.class)));
+ final Diff diff = Iterators.find(differences.iterator(),
+ and(ofKind(DifferenceKind.MOVE), instanceOf(ReferenceChange.class)));
// Merge the ReferenceChange Node node1[firstKey move] from right to left : the FeatureMapChange
// <firstKey> Node node1 [map move] will be merge from right to left too.
@@ -756,8 +756,8 @@ public class FeatureMaps2wayMergeTest {
List<Diff> differences = comparison.getDifferences();
assertEquals(4, differences.size());
- final Diff diff = Iterators.find(differences.iterator(), and(ofKind(DifferenceKind.MOVE),
- instanceOf(FeatureMapChange.class)));
+ final Diff diff = Iterators.find(differences.iterator(),
+ and(ofKind(DifferenceKind.MOVE), instanceOf(FeatureMapChange.class)));
// Merge the FeatureMapChange <firstKey> Node node1 [map move] from right to left : the
// ReferenceChange Node node1[firstKey move] will be merge from right to left too.
@@ -802,8 +802,8 @@ public class FeatureMaps2wayMergeTest {
List<Diff> differences = comparison.getDifferences();
assertEquals(4, differences.size());
- final Diff diff = Iterators.find(differences.iterator(), and(ofKind(DifferenceKind.MOVE),
- instanceOf(ReferenceChange.class)));
+ final Diff diff = Iterators.find(differences.iterator(),
+ and(ofKind(DifferenceKind.MOVE), instanceOf(ReferenceChange.class)));
// Merge the ReferenceChange Node node1[firstKey move] from left to right : the FeatureMapChange
// <firstKey> Node node1 [map move] will be merge from left to right too.
@@ -850,8 +850,8 @@ public class FeatureMaps2wayMergeTest {
List<Diff> differences = comparison.getDifferences();
assertEquals(4, differences.size());
- final Diff diff = Iterators.find(differences.iterator(), and(ofKind(DifferenceKind.MOVE),
- instanceOf(FeatureMapChange.class)));
+ final Diff diff = Iterators.find(differences.iterator(),
+ and(ofKind(DifferenceKind.MOVE), instanceOf(FeatureMapChange.class)));
// Merge the FeatureMapChange <firstKey> Node node1 [map move] from left to right : the
// ReferenceChange Node node1[firstKey move] will be merge from left to right too.
@@ -898,8 +898,8 @@ public class FeatureMaps2wayMergeTest {
List<Diff> differences = comparison.getDifferences();
assertEquals(4, differences.size());
- final Diff diff = Iterators.find(differences.iterator(), and(ofKind(DifferenceKind.MOVE),
- instanceOf(ReferenceChange.class)));
+ final Diff diff = Iterators.find(differences.iterator(),
+ and(ofKind(DifferenceKind.MOVE), instanceOf(ReferenceChange.class)));
// Merge the ReferenceChange Node node1[firstKey move] from right to left : the FeatureMapChange
// <firstKey> Node node1 [map move] will be merge from right to left too.
@@ -946,8 +946,8 @@ public class FeatureMaps2wayMergeTest {
List<Diff> differences = comparison.getDifferences();
assertEquals(4, differences.size());
- final Diff diff = Iterators.find(differences.iterator(), and(ofKind(DifferenceKind.MOVE),
- instanceOf(FeatureMapChange.class)));
+ final Diff diff = Iterators.find(differences.iterator(),
+ and(ofKind(DifferenceKind.MOVE), instanceOf(FeatureMapChange.class)));
// Merge the FeatureMapChange <firstKey> Node node1 [map move] from right to left : the
// ReferenceChange Node node1[firstKey move] will be merge from right to left too.
@@ -994,8 +994,8 @@ public class FeatureMaps2wayMergeTest {
List<Diff> differences = comparison.getDifferences();
assertEquals(4, differences.size());
- final Diff diff = Iterators.find(differences.iterator(), and(ofKind(DifferenceKind.MOVE),
- instanceOf(ReferenceChange.class)));
+ final Diff diff = Iterators.find(differences.iterator(),
+ and(ofKind(DifferenceKind.MOVE), instanceOf(ReferenceChange.class)));
// Merge the ReferenceChange Node node1[firstKey move] from left to right : the FeatureMapChange
// <firstKey> Node node1 [map move] will be merge from left to right too.
@@ -1040,8 +1040,8 @@ public class FeatureMaps2wayMergeTest {
List<Diff> differences = comparison.getDifferences();
assertEquals(4, differences.size());
- final Diff diff = Iterators.find(differences.iterator(), and(ofKind(DifferenceKind.MOVE),
- instanceOf(FeatureMapChange.class)));
+ final Diff diff = Iterators.find(differences.iterator(),
+ and(ofKind(DifferenceKind.MOVE), instanceOf(FeatureMapChange.class)));
// Merge the FeatureMapChange <firstKey> Node node1 [map move] from left to right : the
// ReferenceChange Node node1[firstKey move] will be merge from left to right too.
@@ -1086,8 +1086,8 @@ public class FeatureMaps2wayMergeTest {
List<Diff> differences = comparison.getDifferences();
assertEquals(4, differences.size());
- final Diff diff = Iterators.find(differences.iterator(), and(ofKind(DifferenceKind.MOVE),
- instanceOf(ReferenceChange.class)));
+ final Diff diff = Iterators.find(differences.iterator(),
+ and(ofKind(DifferenceKind.MOVE), instanceOf(ReferenceChange.class)));
// Merge the ReferenceChange Node node1[firstKey move] from left to right : the FeatureMapChange
// <firstKey> Node node1 [map move] will be merge from left to right too.
@@ -1132,8 +1132,8 @@ public class FeatureMaps2wayMergeTest {
List<Diff> differences = comparison.getDifferences();
assertEquals(4, differences.size());
- final Diff diff = Iterators.find(differences.iterator(), and(ofKind(DifferenceKind.MOVE),
- instanceOf(FeatureMapChange.class)));
+ final Diff diff = Iterators.find(differences.iterator(),
+ and(ofKind(DifferenceKind.MOVE), instanceOf(FeatureMapChange.class)));
// Merge the FeatureMapChange <firstKey> Node node1 [map move] from left to right : the
// ReferenceChange Node node1[firstKey move] will be merge from left to right too.
@@ -1226,12 +1226,12 @@ public class FeatureMaps2wayMergeTest {
assertEquals(4, differences.size());
// check if each featuremapchange / referencechange pair is equivalent
- final Diff featureMapChangeDiff = Iterators.find(differences.iterator(), and(
- instanceOf(FeatureMapChange.class), ofKind(DifferenceKind.MOVE)));
+ final Diff featureMapChangeDiff = Iterators.find(differences.iterator(),
+ and(instanceOf(FeatureMapChange.class), ofKind(DifferenceKind.MOVE)));
- final Diff referenceChangeDiff = Iterators.find(differences.iterator(), and(
- instanceOf(ReferenceChange.class), ofKind(DifferenceKind.MOVE),
- not(isEquivalentTo(featureMapChangeDiff))));
+ final Diff referenceChangeDiff = Iterators.find(differences.iterator(),
+ and(instanceOf(ReferenceChange.class), ofKind(DifferenceKind.MOVE),
+ not(isEquivalentTo(featureMapChangeDiff))));
assertEquals(2, featureMapChangeDiff.getEquivalence().getDifferences().size());
assertEquals(2, referenceChangeDiff.getEquivalence().getDifferences().size());
@@ -1261,12 +1261,12 @@ public class FeatureMaps2wayMergeTest {
assertEquals(4, differences.size());
// check if each featuremapchange / referencechange pair is equivalent
- final Diff featureMapChangeDiff = Iterators.find(differences.iterator(), and(
- instanceOf(FeatureMapChange.class), ofKind(DifferenceKind.MOVE)));
+ final Diff featureMapChangeDiff = Iterators.find(differences.iterator(),
+ and(instanceOf(FeatureMapChange.class), ofKind(DifferenceKind.MOVE)));
- final Diff referenceChangeDiff = Iterators.find(differences.iterator(), and(
- instanceOf(ReferenceChange.class), ofKind(DifferenceKind.MOVE),
- not(isEquivalentTo(featureMapChangeDiff))));
+ final Diff referenceChangeDiff = Iterators.find(differences.iterator(),
+ and(instanceOf(ReferenceChange.class), ofKind(DifferenceKind.MOVE),
+ not(isEquivalentTo(featureMapChangeDiff))));
assertEquals(2, featureMapChangeDiff.getEquivalence().getDifferences().size());
assertEquals(2, referenceChangeDiff.getEquivalence().getDifferences().size());
@@ -1296,8 +1296,8 @@ public class FeatureMaps2wayMergeTest {
List<Diff> differences = comparison.getDifferences();
assertEquals(4, differences.size());
- final Diff diff = Iterators.find(differences.iterator(), and(ofKind(DifferenceKind.ADD),
- instanceOf(ReferenceChange.class)));
+ final Diff diff = Iterators.find(differences.iterator(),
+ and(ofKind(DifferenceKind.ADD), instanceOf(ReferenceChange.class)));
// Merge the ReferenceChange Node node1[firstKey add] from left to right : the FeatureMapChange
// <firstKey> Node node1 [map add] will be merge from left to right too.
@@ -1354,8 +1354,8 @@ public class FeatureMaps2wayMergeTest {
List<Diff> differences = comparison.getDifferences();
assertEquals(4, differences.size());
- final Diff diff = Iterators.find(differences.iterator(), and(ofKind(DifferenceKind.ADD),
- instanceOf(FeatureMapChange.class)));
+ final Diff diff = Iterators.find(differences.iterator(),
+ and(ofKind(DifferenceKind.ADD), instanceOf(FeatureMapChange.class)));
// Merge the FeatureMapChange <firstKey> Node node1 [map add] from left to right : the ReferenceChange
// Node node1[firstKey add] will be merge from left to right too.
@@ -1412,8 +1412,8 @@ public class FeatureMaps2wayMergeTest {
List<Diff> differences = comparison.getDifferences();
assertEquals(4, differences.size());
- final Diff diff = Iterators.find(differences.iterator(), and(ofKind(DifferenceKind.ADD),
- instanceOf(ReferenceChange.class)));
+ final Diff diff = Iterators.find(differences.iterator(),
+ and(ofKind(DifferenceKind.ADD), instanceOf(ReferenceChange.class)));
// Merge the ReferenceChange Node node1[firstKey add] from right to left : the FeatureMapChange
// <firstKey> Node node1 [map add] will be merge from right to left too.
@@ -1466,8 +1466,8 @@ public class FeatureMaps2wayMergeTest {
List<Diff> differences = comparison.getDifferences();
assertEquals(4, differences.size());
- final Diff diff = Iterators.find(differences.iterator(), and(ofKind(DifferenceKind.ADD),
- instanceOf(FeatureMapChange.class)));
+ final Diff diff = Iterators.find(differences.iterator(),
+ and(ofKind(DifferenceKind.ADD), instanceOf(FeatureMapChange.class)));
// Merge the FeatureMapChange <firstKey> Node node1 [map add] from right to left : the ReferenceChange
// Node node1[firstKey add] will be merge from right to left too.
@@ -1520,8 +1520,8 @@ public class FeatureMaps2wayMergeTest {
List<Diff> differences = comparison.getDifferences();
assertEquals(4, differences.size());
- final Diff diff = Iterators.find(differences.iterator(), and(ofKind(DifferenceKind.DELETE),
- instanceOf(ReferenceChange.class)));
+ final Diff diff = Iterators.find(differences.iterator(),
+ and(ofKind(DifferenceKind.DELETE), instanceOf(ReferenceChange.class)));
// Merge the ReferenceChange Node node2[firstKey delete] from left to right : the FeatureMapChange
// <firstKey> Node node2 [map delete] will be merge from left to right too.
@@ -1574,8 +1574,8 @@ public class FeatureMaps2wayMergeTest {
List<Diff> differences = comparison.getDifferences();
assertEquals(4, differences.size());
- final Diff diff = Iterators.find(differences.iterator(), and(ofKind(DifferenceKind.DELETE),
- instanceOf(FeatureMapChange.class)));
+ final Diff diff = Iterators.find(differences.iterator(),
+ and(ofKind(DifferenceKind.DELETE), instanceOf(FeatureMapChange.class)));
// Merge the FeatureMapChange <firstKey> Node node2 [map delete] from left to right : the
// ReferenceChange Node node2[firstKey delete] will be merge from left to right too.
@@ -1628,8 +1628,8 @@ public class FeatureMaps2wayMergeTest {
List<Diff> differences = comparison.getDifferences();
assertEquals(4, differences.size());
- final Diff diff = Iterators.find(differences.iterator(), and(ofKind(DifferenceKind.DELETE),
- instanceOf(ReferenceChange.class)));
+ final Diff diff = Iterators.find(differences.iterator(),
+ and(ofKind(DifferenceKind.DELETE), instanceOf(ReferenceChange.class)));
// Merge the ReferenceChange Node node2[firstKey delete] from right to left : the FeatureMapChange
// <firstKey> Node node2 [map delete] will be merge from right to left too.
@@ -1686,8 +1686,8 @@ public class FeatureMaps2wayMergeTest {
List<Diff> differences = comparison.getDifferences();
assertEquals(4, differences.size());
- final Diff diff = Iterators.find(differences.iterator(), and(ofKind(DifferenceKind.DELETE),
- instanceOf(FeatureMapChange.class)));
+ final Diff diff = Iterators.find(differences.iterator(),
+ and(ofKind(DifferenceKind.DELETE), instanceOf(FeatureMapChange.class)));
// Merge the FeatureMapChange <firstKey> Node node2 [map delete] from right to left : the
// ReferenceChange Node node2[firstKey delete] will be merge from right to left too.
@@ -1745,8 +1745,8 @@ public class FeatureMaps2wayMergeTest {
List<Diff> differences = comparison.getDifferences();
assertEquals(4, differences.size());
- final Diff diff = Iterators.find(differences.iterator(), and(ofKind(DifferenceKind.MOVE),
- instanceOf(ReferenceChange.class)));
+ final Diff diff = Iterators.find(differences.iterator(),
+ and(ofKind(DifferenceKind.MOVE), instanceOf(ReferenceChange.class)));
// Merge the ReferenceChange Node node1[firstKey move] from left to right : the FeatureMapChange
// <firstKey> Node node1 [map move] will be merge from left to right too.
@@ -1804,8 +1804,8 @@ public class FeatureMaps2wayMergeTest {
List<Diff> differences = comparison.getDifferences();
assertEquals(4, differences.size());
- final Diff diff = Iterators.find(differences.iterator(), and(ofKind(DifferenceKind.MOVE),
- instanceOf(FeatureMapChange.class)));
+ final Diff diff = Iterators.find(differences.iterator(),
+ and(ofKind(DifferenceKind.MOVE), instanceOf(FeatureMapChange.class)));
// Merge the FeatureMapChange <firstKey> Node node1 [map move] from left to right : the
// ReferenceChange Node node1[firstKey move] will be merge from left to right too.
@@ -1863,8 +1863,8 @@ public class FeatureMaps2wayMergeTest {
List<Diff> differences = comparison.getDifferences();
assertEquals(4, differences.size());
- final Diff diff = Iterators.find(differences.iterator(), and(ofKind(DifferenceKind.MOVE),
- instanceOf(ReferenceChange.class)));
+ final Diff diff = Iterators.find(differences.iterator(),
+ and(ofKind(DifferenceKind.MOVE), instanceOf(ReferenceChange.class)));
// Merge the ReferenceChange Node node1[firstKey move] from right to left : the FeatureMapChange
// <firstKey> Node node1 [map move] will be merge from right to left too.
@@ -1922,8 +1922,8 @@ public class FeatureMaps2wayMergeTest {
List<Diff> differences = comparison.getDifferences();
assertEquals(4, differences.size());
- final Diff diff = Iterators.find(differences.iterator(), and(ofKind(DifferenceKind.MOVE),
- instanceOf(FeatureMapChange.class)));
+ final Diff diff = Iterators.find(differences.iterator(),
+ and(ofKind(DifferenceKind.MOVE), instanceOf(FeatureMapChange.class)));
// Merge the FeatureMapChange <firstKey> Node node1 [map move] from right to left : the
// ReferenceChange Node node1[firstKey move] will be merge from right to left too.
diff --git a/plugins/org.eclipse.emf.compare.tests/src/org/eclipse/emf/compare/tests/merge/FeatureMaps3wayMergeTest.java b/plugins/org.eclipse.emf.compare.tests/src/org/eclipse/emf/compare/tests/merge/FeatureMaps3wayMergeTest.java
index 4a96f7cf8..9494f585f 100644
--- a/plugins/org.eclipse.emf.compare.tests/src/org/eclipse/emf/compare/tests/merge/FeatureMaps3wayMergeTest.java
+++ b/plugins/org.eclipse.emf.compare.tests/src/org/eclipse/emf/compare/tests/merge/FeatureMaps3wayMergeTest.java
@@ -1160,12 +1160,12 @@ public class FeatureMaps3wayMergeTest {
assertEquals(6, differences.size());
// merge one feature-map-change and one reference-change
- final Diff featureMapChangeDiff = Iterators.find(differences.iterator(), and(
- instanceOf(FeatureMapChange.class), fromSide(DifferenceSource.LEFT)));
+ final Diff featureMapChangeDiff = Iterators.find(differences.iterator(),
+ and(instanceOf(FeatureMapChange.class), fromSide(DifferenceSource.LEFT)));
- final Diff referenceChangeDiff = Iterators.find(differences.iterator(), and(
- instanceOf(ReferenceChange.class), fromSide(DifferenceSource.LEFT),
- not(isEquivalentTo(featureMapChangeDiff))));
+ final Diff referenceChangeDiff = Iterators.find(differences.iterator(),
+ and(instanceOf(ReferenceChange.class), fromSide(DifferenceSource.LEFT),
+ not(isEquivalentTo(featureMapChangeDiff))));
// accepting -> element a will be moved into a featuremap
mergerRegistry.getHighestRankingMerger(featureMapChangeDiff).copyLeftToRight(featureMapChangeDiff,
@@ -1195,12 +1195,12 @@ public class FeatureMaps3wayMergeTest {
assertEquals(6, differences.size());
// merge one feature-map-change and one reference-change
- final Diff featureMapChangeDiff = Iterators.find(differences.iterator(), and(
- instanceOf(FeatureMapChange.class), fromSide(DifferenceSource.LEFT)));
+ final Diff featureMapChangeDiff = Iterators.find(differences.iterator(),
+ and(instanceOf(FeatureMapChange.class), fromSide(DifferenceSource.LEFT)));
- final Diff referenceChangeDiff = Iterators.find(differences.iterator(), and(
- instanceOf(ReferenceChange.class), fromSide(DifferenceSource.LEFT),
- not(isEquivalentTo(featureMapChangeDiff))));
+ final Diff referenceChangeDiff = Iterators.find(differences.iterator(),
+ and(instanceOf(ReferenceChange.class), fromSide(DifferenceSource.LEFT),
+ not(isEquivalentTo(featureMapChangeDiff))));
// rejecting means that instead of moving inside the element will be moved outside of the featuremap
mergerRegistry.getHighestRankingMerger(featureMapChangeDiff).copyRightToLeft(featureMapChangeDiff,
@@ -1230,26 +1230,26 @@ public class FeatureMaps3wayMergeTest {
assertEquals(6, differences.size());
// check if each featuremapchange / referencechange pair is equivalent
- final Diff leftFeatureMapChangeDiff = Iterators.find(differences.iterator(), and(
- instanceOf(FeatureMapChange.class), ofKind(DifferenceKind.MOVE),
- fromSide(DifferenceSource.RIGHT)));
+ final Diff leftFeatureMapChangeDiff = Iterators.find(differences.iterator(),
+ and(instanceOf(FeatureMapChange.class), ofKind(DifferenceKind.MOVE),
+ fromSide(DifferenceSource.RIGHT)));
- final Diff leftReferenceChangeDiff = Iterators.find(differences.iterator(), and(
- instanceOf(ReferenceChange.class), ofKind(DifferenceKind.MOVE),
- fromSide(DifferenceSource.RIGHT), not(isEquivalentTo(leftFeatureMapChangeDiff))));
+ final Diff leftReferenceChangeDiff = Iterators.find(differences.iterator(),
+ and(instanceOf(ReferenceChange.class), ofKind(DifferenceKind.MOVE),
+ fromSide(DifferenceSource.RIGHT), not(isEquivalentTo(leftFeatureMapChangeDiff))));
- final Diff rightReferenceChangeDiff = Iterators.find(differences.iterator(), and(
- instanceOf(ReferenceChange.class), fromSide(DifferenceSource.LEFT)));
+ final Diff rightReferenceChangeDiff = Iterators.find(differences.iterator(),
+ and(instanceOf(ReferenceChange.class), fromSide(DifferenceSource.LEFT)));
assertEquals(2, leftFeatureMapChangeDiff.getEquivalence().getDifferences().size());
assertEquals(2, leftReferenceChangeDiff.getEquivalence().getDifferences().size());
assertEquals(2, rightReferenceChangeDiff.getEquivalence().getDifferences().size());
// accept both
- mergerRegistry.getHighestRankingMerger(leftFeatureMapChangeDiff).copyLeftToRight(
- leftFeatureMapChangeDiff, new BasicMonitor());
- mergerRegistry.getHighestRankingMerger(leftReferenceChangeDiff).copyLeftToRight(
- leftReferenceChangeDiff, new BasicMonitor());
+ mergerRegistry.getHighestRankingMerger(leftFeatureMapChangeDiff)
+ .copyLeftToRight(leftFeatureMapChangeDiff, new BasicMonitor());
+ mergerRegistry.getHighestRankingMerger(leftReferenceChangeDiff)
+ .copyLeftToRight(leftReferenceChangeDiff, new BasicMonitor());
// no differences should be left
scope = new DefaultComparisonScope(left, right, null);
@@ -1272,26 +1272,26 @@ public class FeatureMaps3wayMergeTest {
assertEquals(6, differences.size());
// check if each featuremapchange / referencechange pair is equivalent
- final Diff leftFeatureMapChangeDiff = Iterators.find(differences.iterator(), and(
- instanceOf(FeatureMapChange.class), ofKind(DifferenceKind.MOVE),
- fromSide(DifferenceSource.RIGHT)));
+ final Diff leftFeatureMapChangeDiff = Iterators.find(differences.iterator(),
+ and(instanceOf(FeatureMapChange.class), ofKind(DifferenceKind.MOVE),
+ fromSide(DifferenceSource.RIGHT)));
- final Diff leftReferenceChangeDiff = Iterators.find(differences.iterator(), and(
- instanceOf(ReferenceChange.class), ofKind(DifferenceKind.MOVE),
- fromSide(DifferenceSource.RIGHT), not(isEquivalentTo(leftFeatureMapChangeDiff))));
+ final Diff leftReferenceChangeDiff = Iterators.find(differences.iterator(),
+ and(instanceOf(ReferenceChange.class), ofKind(DifferenceKind.MOVE),
+ fromSide(DifferenceSource.RIGHT), not(isEquivalentTo(leftFeatureMapChangeDiff))));
- final Diff rightReferenceChangeDiff = Iterators.find(differences.iterator(), and(
- instanceOf(ReferenceChange.class), fromSide(DifferenceSource.LEFT)));
+ final Diff rightReferenceChangeDiff = Iterators.find(differences.iterator(),
+ and(instanceOf(ReferenceChange.class), fromSide(DifferenceSource.LEFT)));
assertEquals(2, leftFeatureMapChangeDiff.getEquivalence().getDifferences().size());
assertEquals(2, leftReferenceChangeDiff.getEquivalence().getDifferences().size());
assertEquals(2, rightReferenceChangeDiff.getEquivalence().getDifferences().size());
// reject both
- mergerRegistry.getHighestRankingMerger(leftFeatureMapChangeDiff).copyRightToLeft(
- leftFeatureMapChangeDiff, new BasicMonitor());
- mergerRegistry.getHighestRankingMerger(leftReferenceChangeDiff).copyRightToLeft(
- leftReferenceChangeDiff, new BasicMonitor());
+ mergerRegistry.getHighestRankingMerger(leftFeatureMapChangeDiff)
+ .copyRightToLeft(leftFeatureMapChangeDiff, new BasicMonitor());
+ mergerRegistry.getHighestRankingMerger(leftReferenceChangeDiff)
+ .copyRightToLeft(leftReferenceChangeDiff, new BasicMonitor());
// no differences should be left
scope = new DefaultComparisonScope(left, right, null);
diff --git a/plugins/org.eclipse.emf.compare.tests/src/org/eclipse/emf/compare/tests/merge/IndividualMergeOutOfScopeValuesTest.java b/plugins/org.eclipse.emf.compare.tests/src/org/eclipse/emf/compare/tests/merge/IndividualMergeOutOfScopeValuesTest.java
index 1e6dc28ca..ed834b0d5 100644
--- a/plugins/org.eclipse.emf.compare.tests/src/org/eclipse/emf/compare/tests/merge/IndividualMergeOutOfScopeValuesTest.java
+++ b/plugins/org.eclipse.emf.compare.tests/src/org/eclipse/emf/compare/tests/merge/IndividualMergeOutOfScopeValuesTest.java
@@ -175,8 +175,8 @@ public class IndividualMergeOutOfScopeValuesTest {
// We need left and right to point to the same proxy uri after the merge
assertEquals(((InternalEObject)leftValue).eProxyURI(), ((InternalEObject)rightValue).eProxyURI());
// Though the origin did not change and still points to the "old" proxy
- assertFalse(((InternalEObject)leftValue).eProxyURI().equals(
- ((InternalEObject)originValue).eProxyURI()));
+ assertFalse(
+ ((InternalEObject)leftValue).eProxyURI().equals(((InternalEObject)originValue).eProxyURI()));
// We should have no difference between left and right ... though they might be different from origin
scope = new DefaultComparisonScope(left, right, null);
@@ -333,8 +333,8 @@ public class IndividualMergeOutOfScopeValuesTest {
// We need left and right to point to the same proxy uri after the merge
assertEquals(((InternalEObject)leftValue).eProxyURI(), ((InternalEObject)rightValue).eProxyURI());
// Though the origin did not change and still points to the "old" proxy
- assertFalse(((InternalEObject)leftValue).eProxyURI().equals(
- ((InternalEObject)originValue).eProxyURI()));
+ assertFalse(
+ ((InternalEObject)leftValue).eProxyURI().equals(((InternalEObject)originValue).eProxyURI()));
// We should have no difference between left and right ... though they might be different from origin
scope = new DefaultComparisonScope(left, right, null);
diff --git a/plugins/org.eclipse.emf.compare.tests/src/org/eclipse/emf/compare/tests/merge/IndividualMergeTest.java b/plugins/org.eclipse.emf.compare.tests/src/org/eclipse/emf/compare/tests/merge/IndividualMergeTest.java
index 9c81ee547..e0905df27 100644
--- a/plugins/org.eclipse.emf.compare.tests/src/org/eclipse/emf/compare/tests/merge/IndividualMergeTest.java
+++ b/plugins/org.eclipse.emf.compare.tests/src/org/eclipse/emf/compare/tests/merge/IndividualMergeTest.java
@@ -763,12 +763,12 @@ public class IndividualMergeTest {
assertEquals(3, differences.size());
final String featureName = "multiValueEEnumAttribute";
- final Diff diff = Iterators.find(differences.iterator(), and(fromSide(DifferenceSource.LEFT),
- addedToAttribute("root", featureName, NodeEnum.A)));
- final Diff diff2 = Iterators.find(differences.iterator(), and(fromSide(DifferenceSource.LEFT),
- addedToAttribute("root", featureName, NodeEnum.B)));
- final Diff diff3 = Iterators.find(differences.iterator(), and(fromSide(DifferenceSource.LEFT),
- addedToAttribute("root", featureName, NodeEnum.C)));
+ final Diff diff = Iterators.find(differences.iterator(),
+ and(fromSide(DifferenceSource.LEFT), addedToAttribute("root", featureName, NodeEnum.A)));
+ final Diff diff2 = Iterators.find(differences.iterator(),
+ and(fromSide(DifferenceSource.LEFT), addedToAttribute("root", featureName, NodeEnum.B)));
+ final Diff diff3 = Iterators.find(differences.iterator(),
+ and(fromSide(DifferenceSource.LEFT), addedToAttribute("root", featureName, NodeEnum.C)));
mergerRegistry.getHighestRankingMerger(diff).copyLeftToRight(diff, new BasicMonitor());
mergerRegistry.getHighestRankingMerger(diff2).copyLeftToRight(diff2, new BasicMonitor());
@@ -799,12 +799,12 @@ public class IndividualMergeTest {
assertEquals(3, differences.size());
final String featureName = "multiValueEEnumAttribute";
- final Diff diff = Iterators.find(differences.iterator(), and(fromSide(DifferenceSource.LEFT),
- addedToAttribute("root", featureName, NodeEnum.A)));
- final Diff diff2 = Iterators.find(differences.iterator(), and(fromSide(DifferenceSource.LEFT),
- addedToAttribute("root", featureName, NodeEnum.B)));
- final Diff diff3 = Iterators.find(differences.iterator(), and(fromSide(DifferenceSource.LEFT),
- addedToAttribute("root", featureName, NodeEnum.C)));
+ final Diff diff = Iterators.find(differences.iterator(),
+ and(fromSide(DifferenceSource.LEFT), addedToAttribute("root", featureName, NodeEnum.A)));
+ final Diff diff2 = Iterators.find(differences.iterator(),
+ and(fromSide(DifferenceSource.LEFT), addedToAttribute("root", featureName, NodeEnum.B)));
+ final Diff diff3 = Iterators.find(differences.iterator(),
+ and(fromSide(DifferenceSource.LEFT), addedToAttribute("root", featureName, NodeEnum.C)));
mergerRegistry.getHighestRankingMerger(diff).copyRightToLeft(diff, new BasicMonitor());
mergerRegistry.getHighestRankingMerger(diff2).copyRightToLeft(diff2, new BasicMonitor());
@@ -836,12 +836,12 @@ public class IndividualMergeTest {
assertEquals(3, differences.size());
final String featureName = "multiValueEEnumAttribute";
- final Diff diff = Iterators.find(differences.iterator(), and(fromSide(DifferenceSource.LEFT),
- addedToAttribute("root", featureName, NodeEnum.A)));
- final Diff diff2 = Iterators.find(differences.iterator(), and(fromSide(DifferenceSource.LEFT),
- addedToAttribute("root", featureName, NodeEnum.B)));
- final Diff diff3 = Iterators.find(differences.iterator(), and(fromSide(DifferenceSource.LEFT),
- addedToAttribute("root", featureName, NodeEnum.C)));
+ final Diff diff = Iterators.find(differences.iterator(),
+ and(fromSide(DifferenceSource.LEFT), addedToAttribute("root", featureName, NodeEnum.A)));
+ final Diff diff2 = Iterators.find(differences.iterator(),
+ and(fromSide(DifferenceSource.LEFT), addedToAttribute("root", featureName, NodeEnum.B)));
+ final Diff diff3 = Iterators.find(differences.iterator(),
+ and(fromSide(DifferenceSource.LEFT), addedToAttribute("root", featureName, NodeEnum.C)));
mergerRegistry.getHighestRankingMerger(diff).copyLeftToRight(diff, new BasicMonitor());
mergerRegistry.getHighestRankingMerger(diff2).copyLeftToRight(diff2, new BasicMonitor());
@@ -853,8 +853,8 @@ public class IndividualMergeTest {
final Object featureValue = originNode.eGet(feature);
assertTrue(featureValue instanceof Collection<?>);
- assertTrue(((Collection<?>)featureValue).containsAll(Lists.newArrayList(NodeEnum.A, NodeEnum.B,
- NodeEnum.C)));
+ assertTrue(((Collection<?>)featureValue)
+ .containsAll(Lists.newArrayList(NodeEnum.A, NodeEnum.B, NodeEnum.C)));
// We should have no difference between left and right ... though they might be different from origin
scope = new DefaultComparisonScope(left, right, null);
@@ -875,12 +875,12 @@ public class IndividualMergeTest {
assertEquals(3, differences.size());
final String featureName = "multiValueEEnumAttribute";
- final Diff diff = Iterators.find(differences.iterator(), and(fromSide(DifferenceSource.LEFT),
- addedToAttribute("root", featureName, NodeEnum.A)));
- final Diff diff2 = Iterators.find(differences.iterator(), and(fromSide(DifferenceSource.LEFT),
- addedToAttribute("root", featureName, NodeEnum.B)));
- final Diff diff3 = Iterators.find(differences.iterator(), and(fromSide(DifferenceSource.LEFT),
- addedToAttribute("root", featureName, NodeEnum.C)));
+ final Diff diff = Iterators.find(differences.iterator(),
+ and(fromSide(DifferenceSource.LEFT), addedToAttribute("root", featureName, NodeEnum.A)));
+ final Diff diff2 = Iterators.find(differences.iterator(),
+ and(fromSide(DifferenceSource.LEFT), addedToAttribute("root", featureName, NodeEnum.B)));
+ final Diff diff3 = Iterators.find(differences.iterator(),
+ and(fromSide(DifferenceSource.LEFT), addedToAttribute("root", featureName, NodeEnum.C)));
mergerRegistry.getHighestRankingMerger(diff).copyRightToLeft(diff, new BasicMonitor());
mergerRegistry.getHighestRankingMerger(diff2).copyRightToLeft(diff2, new BasicMonitor());
@@ -913,12 +913,12 @@ public class IndividualMergeTest {
assertEquals(3, differences.size());
final String featureName = "multiValueEEnumAttribute";
- final Diff diff = Iterators.find(differences.iterator(), and(fromSide(DifferenceSource.RIGHT),
- addedToAttribute("root", featureName, NodeEnum.A)));
- final Diff diff2 = Iterators.find(differences.iterator(), and(fromSide(DifferenceSource.RIGHT),
- addedToAttribute("root", featureName, NodeEnum.B)));
- final Diff diff3 = Iterators.find(differences.iterator(), and(fromSide(DifferenceSource.RIGHT),
- addedToAttribute("root", featureName, NodeEnum.C)));
+ final Diff diff = Iterators.find(differences.iterator(),
+ and(fromSide(DifferenceSource.RIGHT), addedToAttribute("root", featureName, NodeEnum.A)));
+ final Diff diff2 = Iterators.find(differences.iterator(),
+ and(fromSide(DifferenceSource.RIGHT), addedToAttribute("root", featureName, NodeEnum.B)));
+ final Diff diff3 = Iterators.find(differences.iterator(),
+ and(fromSide(DifferenceSource.RIGHT), addedToAttribute("root", featureName, NodeEnum.C)));
mergerRegistry.getHighestRankingMerger(diff).copyLeftToRight(diff, new BasicMonitor());
mergerRegistry.getHighestRankingMerger(diff2).copyLeftToRight(diff2, new BasicMonitor());
@@ -983,8 +983,8 @@ public class IndividualMergeTest {
assertEquals(1, differences.size());
final String featureName = "multiValuedAttribute";
- final Diff diff = Iterators.find(differences.iterator(), and(fromSide(DifferenceSource.LEFT),
- addedToAttribute("root.origin", featureName, "value1")));
+ final Diff diff = Iterators.find(differences.iterator(),
+ and(fromSide(DifferenceSource.LEFT), addedToAttribute("root.origin", featureName, "value1")));
mergerRegistry.getHighestRankingMerger(diff).copyLeftToRight(diff, new BasicMonitor());
final EObject originNode = getNodeNamed(right, "origin");
@@ -1012,8 +1012,8 @@ public class IndividualMergeTest {
assertEquals(1, differences.size());
final String featureName = "multiValuedAttribute";
- final Diff diff = Iterators.find(differences.iterator(), and(fromSide(DifferenceSource.LEFT),
- addedToAttribute("root.origin", featureName, "value1")));
+ final Diff diff = Iterators.find(differences.iterator(),
+ and(fromSide(DifferenceSource.LEFT), addedToAttribute("root.origin", featureName, "value1")));
mergerRegistry.getHighestRankingMerger(diff).copyRightToLeft(diff, new BasicMonitor());
final EObject originNode = getNodeNamed(left, "origin");
@@ -1042,8 +1042,8 @@ public class IndividualMergeTest {
assertEquals(1, differences.size());
final String featureName = "multiValuedAttribute";
- final Diff diff = Iterators.find(differences.iterator(), and(fromSide(DifferenceSource.LEFT),
- addedToAttribute("root.origin", featureName, "value1")));
+ final Diff diff = Iterators.find(differences.iterator(),
+ and(fromSide(DifferenceSource.LEFT), addedToAttribute("root.origin", featureName, "value1")));
mergerRegistry.getHighestRankingMerger(diff).copyLeftToRight(diff, new BasicMonitor());
final EObject originNode = getNodeNamed(right, "origin");
@@ -1074,8 +1074,8 @@ public class IndividualMergeTest {
assertEquals(1, differences.size());
final String featureName = "multiValuedAttribute";
- final Diff diff = Iterators.find(differences.iterator(), and(fromSide(DifferenceSource.LEFT),
- addedToAttribute("root.origin", featureName, "value1")));
+ final Diff diff = Iterators.find(differences.iterator(),
+ and(fromSide(DifferenceSource.LEFT), addedToAttribute("root.origin", featureName, "value1")));
mergerRegistry.getHighestRankingMerger(diff).copyRightToLeft(diff, new BasicMonitor());
final EObject originNode = getNodeNamed(left, "origin");
@@ -1352,8 +1352,8 @@ public class IndividualMergeTest {
assertEquals(1, differences.size());
final String featureName = "multiValuedAttribute";
- final Diff diff = Iterators.find(differences.iterator(), and(fromSide(DifferenceSource.LEFT),
- movedInAttribute("root.origin", featureName, "value1")));
+ final Diff diff = Iterators.find(differences.iterator(),
+ and(fromSide(DifferenceSource.LEFT), movedInAttribute("root.origin", featureName, "value1")));
mergerRegistry.getHighestRankingMerger(diff).copyLeftToRight(diff, new BasicMonitor());
final EObject targetNode = getNodeNamed(right, "origin");
@@ -1386,8 +1386,8 @@ public class IndividualMergeTest {
assertEquals(1, differences.size());
final String featureName = "multiValuedAttribute";
- final Diff diff = Iterators.find(differences.iterator(), and(fromSide(DifferenceSource.LEFT),
- movedInAttribute("root.origin", featureName, "value1")));
+ final Diff diff = Iterators.find(differences.iterator(),
+ and(fromSide(DifferenceSource.LEFT), movedInAttribute("root.origin", featureName, "value1")));
mergerRegistry.getHighestRankingMerger(diff).copyRightToLeft(diff, new BasicMonitor());
final EObject targetNode = getNodeNamed(left, "origin");
@@ -1421,8 +1421,8 @@ public class IndividualMergeTest {
assertEquals(1, differences.size());
final String featureName = "multiValuedAttribute";
- final Diff diff = Iterators.find(differences.iterator(), and(fromSide(DifferenceSource.LEFT),
- movedInAttribute("root.origin", featureName, "value1")));
+ final Diff diff = Iterators.find(differences.iterator(),
+ and(fromSide(DifferenceSource.LEFT), movedInAttribute("root.origin", featureName, "value1")));
mergerRegistry.getHighestRankingMerger(diff).copyLeftToRight(diff, new BasicMonitor());
final EObject targetNode = getNodeNamed(right, "origin");
@@ -1458,8 +1458,8 @@ public class IndividualMergeTest {
assertEquals(1, differences.size());
final String featureName = "multiValuedAttribute";
- final Diff diff = Iterators.find(differences.iterator(), and(fromSide(DifferenceSource.LEFT),
- movedInAttribute("root.origin", featureName, "value1")));
+ final Diff diff = Iterators.find(differences.iterator(),
+ and(fromSide(DifferenceSource.LEFT), movedInAttribute("root.origin", featureName, "value1")));
mergerRegistry.getHighestRankingMerger(diff).copyRightToLeft(diff, new BasicMonitor());
final EObject targetNode = getNodeNamed(left, "origin");
@@ -2717,8 +2717,8 @@ public class IndividualMergeTest {
assertEquals(1, differences.size());
final String featureName = "containmentRef1";
- final Diff diff = Iterators.find(differences.iterator(), and(fromSide(DifferenceSource.LEFT), moved(
- "root.value2", featureName)));
+ final Diff diff = Iterators.find(differences.iterator(),
+ and(fromSide(DifferenceSource.LEFT), moved("root.value2", featureName)));
mergerRegistry.getHighestRankingMerger(diff).copyLeftToRight(diff, new BasicMonitor());
final EObject targetNode = getNodeNamed(right, "value2");
@@ -2751,8 +2751,8 @@ public class IndividualMergeTest {
assertEquals(1, differences.size());
final String featureName = "containmentRef1";
- final Diff diff = Iterators.find(differences.iterator(), and(fromSide(DifferenceSource.LEFT), moved(
- "root.value2", featureName)));
+ final Diff diff = Iterators.find(differences.iterator(),
+ and(fromSide(DifferenceSource.LEFT), moved("root.value2", featureName)));
mergerRegistry.getHighestRankingMerger(diff).copyRightToLeft(diff, new BasicMonitor());
final EObject targetNode = getNodeNamed(right, "value2");
diff --git a/plugins/org.eclipse.emf.compare.tests/src/org/eclipse/emf/compare/tests/merge/MultipleMergeTest.java b/plugins/org.eclipse.emf.compare.tests/src/org/eclipse/emf/compare/tests/merge/MultipleMergeTest.java
index b4292a6ee..2d92d7186 100644
--- a/plugins/org.eclipse.emf.compare.tests/src/org/eclipse/emf/compare/tests/merge/MultipleMergeTest.java
+++ b/plugins/org.eclipse.emf.compare.tests/src/org/eclipse/emf/compare/tests/merge/MultipleMergeTest.java
@@ -120,15 +120,15 @@ public class MultipleMergeTest {
// First, reject all conflicts on the right
// left: 8923410, right: 62930147
- final ReferenceChange rightAdOfNode9 = (ReferenceChange)Iterators.find(differences.iterator(), and(
- fromSide(DifferenceSource.RIGHT), added("Root.Node9")));
+ final ReferenceChange rightAdOfNode9 = (ReferenceChange)Iterators.find(differences.iterator(),
+ and(fromSide(DifferenceSource.RIGHT), added("Root.Node9")));
mergerRegistry.getHighestRankingMerger(rightAdOfNode9).copyLeftToRight(rightAdOfNode9,
new BasicMonitor());
// left: 8923410, right: 6230147
- final ReferenceChange rightMoveOfNode1 = (ReferenceChange)Iterators.find(differences.iterator(), and(
- fromSide(DifferenceSource.RIGHT), moved("Root.Node1", "containmentRef1")));
+ final ReferenceChange rightMoveOfNode1 = (ReferenceChange)Iterators.find(differences.iterator(),
+ and(fromSide(DifferenceSource.RIGHT), moved("Root.Node1", "containmentRef1")));
// revert move of Node 1 in right. It should be re-positioned right before 2
mergerRegistry.getHighestRankingMerger(rightMoveOfNode1).copyLeftToRight(rightMoveOfNode1,
new BasicMonitor());
@@ -136,16 +136,16 @@ public class MultipleMergeTest {
// left: 8923410, right: 6123047
- final ReferenceChange rightAddOfNode0 = (ReferenceChange)Iterators.find(differences.iterator(), and(
- fromSide(DifferenceSource.RIGHT), added("Root.Node0")));
+ final ReferenceChange rightAddOfNode0 = (ReferenceChange)Iterators.find(differences.iterator(),
+ and(fromSide(DifferenceSource.RIGHT), added("Root.Node0")));
// revert addition of 0 in right
mergerRegistry.getHighestRankingMerger(rightAddOfNode0).copyLeftToRight(rightAddOfNode0,
new BasicMonitor());
// left: 8923410, right: 612347
- final ReferenceChange rightMoveOfNode6 = (ReferenceChange)Iterators.find(differences.iterator(), and(
- fromSide(DifferenceSource.RIGHT), moved("Root.Node6", "containmentRef1")));
+ final ReferenceChange rightMoveOfNode6 = (ReferenceChange)Iterators.find(differences.iterator(),
+ and(fromSide(DifferenceSource.RIGHT), moved("Root.Node6", "containmentRef1")));
// Revert move of 6 in right.
mergerRegistry.getHighestRankingMerger(rightMoveOfNode6).copyLeftToRight(rightMoveOfNode6,
new BasicMonitor());
@@ -165,8 +165,8 @@ public class MultipleMergeTest {
// And now, accept all other changes
// add Node8
- final ReferenceChange leftAddOfNode8 = (ReferenceChange)Iterators.find(differences.iterator(), and(
- fromSide(DifferenceSource.LEFT), added("Root.Node8")));
+ final ReferenceChange leftAddOfNode8 = (ReferenceChange)Iterators.find(differences.iterator(),
+ and(fromSide(DifferenceSource.LEFT), added("Root.Node8")));
// LCS is currently {2, 3, 4}. Insertion index is right before 2.
mergerRegistry.getHighestRankingMerger(leftAddOfNode8).copyLeftToRight(leftAddOfNode8,
new BasicMonitor());
@@ -175,8 +175,8 @@ public class MultipleMergeTest {
// left: 8923410, right: 1823467
// add Node9
- final ReferenceChange leftAddOfNode9 = (ReferenceChange)Iterators.find(differences.iterator(), and(
- fromSide(DifferenceSource.LEFT), added("Root.Node9")));
+ final ReferenceChange leftAddOfNode9 = (ReferenceChange)Iterators.find(differences.iterator(),
+ and(fromSide(DifferenceSource.LEFT), added("Root.Node9")));
// LCS is now {8, 2, 3, 4}. Insertion should be right after 8
mergerRegistry.getHighestRankingMerger(leftAddOfNode9).copyLeftToRight(leftAddOfNode9,
new BasicMonitor());
@@ -185,8 +185,8 @@ public class MultipleMergeTest {
// left: 8923410, right: 18923467
// move Node1
- final ReferenceChange leftMoveOfNode1 = (ReferenceChange)Iterators.find(differences.iterator(), and(
- fromSide(DifferenceSource.LEFT), moved("Root.Node1", "containmentRef1")));
+ final ReferenceChange leftMoveOfNode1 = (ReferenceChange)Iterators.find(differences.iterator(),
+ and(fromSide(DifferenceSource.LEFT), moved("Root.Node1", "containmentRef1")));
// LCS is {8, 9, 2, 3, 4}. 1 should be moved right after 4.
mergerRegistry.getHighestRankingMerger(leftMoveOfNode1).copyLeftToRight(leftMoveOfNode1,
new BasicMonitor());
@@ -195,8 +195,8 @@ public class MultipleMergeTest {
// left: 8923410, right: 89234167
// add Node0
- final ReferenceChange leftAddOfNode0 = (ReferenceChange)Iterators.find(differences.iterator(), and(
- fromSide(DifferenceSource.LEFT), added("Root.Node0")));
+ final ReferenceChange leftAddOfNode0 = (ReferenceChange)Iterators.find(differences.iterator(),
+ and(fromSide(DifferenceSource.LEFT), added("Root.Node0")));
// LCS is now {8, 9, 2, 3, 4, 1}. 0 should be added right after 1
mergerRegistry.getHighestRankingMerger(leftAddOfNode0).copyLeftToRight(leftAddOfNode0,
new BasicMonitor());
@@ -224,8 +224,8 @@ public class MultipleMergeTest {
// left: 8923410, right: 89234107
// merge 7 (remove Node7)
- final ReferenceChange diff7 = (ReferenceChange)Iterators.find(differences.iterator(), and(
- fromSide(DifferenceSource.LEFT), removed("Root.Node7")));
+ final ReferenceChange diff7 = (ReferenceChange)Iterators.find(differences.iterator(),
+ and(fromSide(DifferenceSource.LEFT), removed("Root.Node7")));
mergerRegistry.getHighestRankingMerger(diff7).copyLeftToRight(diff7, new BasicMonitor());
assertValueIndexIs(diff7, false, -1);
@@ -270,8 +270,8 @@ public class MultipleMergeTest {
// left: 89234610, right: 62930147
// Revert add of 9 on the left side
- final ReferenceChange leftAddOfNode9 = (ReferenceChange)Iterators.find(differences.iterator(), and(
- fromSide(DifferenceSource.LEFT), added("Root.Node9")));
+ final ReferenceChange leftAddOfNode9 = (ReferenceChange)Iterators.find(differences.iterator(),
+ and(fromSide(DifferenceSource.LEFT), added("Root.Node9")));
mergerRegistry.getHighestRankingMerger(leftAddOfNode9).copyRightToLeft(leftAddOfNode9,
new BasicMonitor());
assertValueIndexIs(leftAddOfNode9, true, -1);
@@ -288,8 +288,8 @@ public class MultipleMergeTest {
// left: 8234610, right: 62930147
// Revert add of 0 on the left side
- final ReferenceChange leftAddOfNode0 = (ReferenceChange)Iterators.find(differences.iterator(), and(
- fromSide(DifferenceSource.LEFT), added("Root.Node0")));
+ final ReferenceChange leftAddOfNode0 = (ReferenceChange)Iterators.find(differences.iterator(),
+ and(fromSide(DifferenceSource.LEFT), added("Root.Node0")));
mergerRegistry.getHighestRankingMerger(leftAddOfNode0).copyRightToLeft(leftAddOfNode0,
new BasicMonitor());
assertValueIndexIs(leftAddOfNode0, true, -1);
@@ -297,8 +297,8 @@ public class MultipleMergeTest {
// left: 823461, right: 62930147
// Revert move of 1 in left
- final ReferenceChange leftMoveOfNode1 = (ReferenceChange)Iterators.find(differences.iterator(), and(
- fromSide(DifferenceSource.LEFT), moved("Root.Node1", "containmentRef1")));
+ final ReferenceChange leftMoveOfNode1 = (ReferenceChange)Iterators.find(differences.iterator(),
+ and(fromSide(DifferenceSource.LEFT), moved("Root.Node1", "containmentRef1")));
mergerRegistry.getHighestRankingMerger(leftMoveOfNode1).copyRightToLeft(leftMoveOfNode1,
new BasicMonitor());
assertValueIndexIs(leftMoveOfNode1, true, 1);
@@ -308,8 +308,8 @@ public class MultipleMergeTest {
// And now, let's merge all the others right to left
// move 6
- final ReferenceChange rightMoveOfNode6 = (ReferenceChange)Iterators.find(differences.iterator(), and(
- fromSide(DifferenceSource.RIGHT), moved("Root.Node6", "containmentRef1")));
+ final ReferenceChange rightMoveOfNode6 = (ReferenceChange)Iterators.find(differences.iterator(),
+ and(fromSide(DifferenceSource.RIGHT), moved("Root.Node6", "containmentRef1")));
mergerRegistry.getHighestRankingMerger(rightMoveOfNode6).copyRightToLeft(rightMoveOfNode6,
new BasicMonitor());
assertValueIndexIs(rightMoveOfNode6, true, 2);
@@ -317,8 +317,8 @@ public class MultipleMergeTest {
// left: 816234, right: 62930147
// add 9
- final ReferenceChange rightAddOfNode9 = (ReferenceChange)Iterators.find(differences.iterator(), and(
- fromSide(DifferenceSource.RIGHT), added("Root.Node9")));
+ final ReferenceChange rightAddOfNode9 = (ReferenceChange)Iterators.find(differences.iterator(),
+ and(fromSide(DifferenceSource.RIGHT), added("Root.Node9")));
mergerRegistry.getHighestRankingMerger(rightAddOfNode9).copyRightToLeft(rightAddOfNode9,
new BasicMonitor());
assertValueIndexIs(rightAddOfNode9, true, 4);
@@ -326,8 +326,8 @@ public class MultipleMergeTest {
// left: 8162934, right: 62930147
// add 0
- final ReferenceChange rightAddOfNode0 = (ReferenceChange)Iterators.find(differences.iterator(), and(
- fromSide(DifferenceSource.RIGHT), added("Root.Node0")));
+ final ReferenceChange rightAddOfNode0 = (ReferenceChange)Iterators.find(differences.iterator(),
+ and(fromSide(DifferenceSource.RIGHT), added("Root.Node0")));
mergerRegistry.getHighestRankingMerger(rightAddOfNode0).copyRightToLeft(rightAddOfNode0,
new BasicMonitor());
assertValueIndexIs(rightAddOfNode0, true, 6);
@@ -335,8 +335,8 @@ public class MultipleMergeTest {
// left: 81629304, right: 62930147
// move 1
- final ReferenceChange rightMoveOfNode1 = (ReferenceChange)Iterators.find(differences.iterator(), and(
- fromSide(DifferenceSource.RIGHT), moved("Root.Node1", "containmentRef1")));
+ final ReferenceChange rightMoveOfNode1 = (ReferenceChange)Iterators.find(differences.iterator(),
+ and(fromSide(DifferenceSource.RIGHT), moved("Root.Node1", "containmentRef1")));
mergerRegistry.getHighestRankingMerger(rightMoveOfNode1).copyRightToLeft(rightMoveOfNode1,
new BasicMonitor());
assertValueIndexIs(rightMoveOfNode1, true, 6);
@@ -353,8 +353,8 @@ public class MultipleMergeTest {
// left: 86293014, right: 62930147
// revert add 8
- final ReferenceChange leftAddOfNode8 = (ReferenceChange)Iterators.find(differences.iterator(), and(
- fromSide(DifferenceSource.LEFT), added("Root.Node8")));
+ final ReferenceChange leftAddOfNode8 = (ReferenceChange)Iterators.find(differences.iterator(),
+ and(fromSide(DifferenceSource.LEFT), added("Root.Node8")));
mergerRegistry.getHighestRankingMerger(leftAddOfNode8).copyRightToLeft(leftAddOfNode8,
new BasicMonitor());
assertValueIndexIs(leftAddOfNode8, false, -1);
diff --git a/plugins/org.eclipse.emf.compare.tests/src/org/eclipse/emf/compare/tests/merge/PseudoConflictMergeTest.java b/plugins/org.eclipse.emf.compare.tests/src/org/eclipse/emf/compare/tests/merge/PseudoConflictMergeTest.java
index c3517a19e..5a0fc2dd6 100644
--- a/plugins/org.eclipse.emf.compare.tests/src/org/eclipse/emf/compare/tests/merge/PseudoConflictMergeTest.java
+++ b/plugins/org.eclipse.emf.compare.tests/src/org/eclipse/emf/compare/tests/merge/PseudoConflictMergeTest.java
@@ -69,8 +69,8 @@ public class PseudoConflictMergeTest {
List<Diff> differences = comparison.getDifferences();
assertEquals(2, differences.size());
- final Diff diff = Iterators.find(differences.iterator(), and(fromSide(DifferenceSource.LEFT),
- ofKind(DifferenceKind.ADD)));
+ final Diff diff = Iterators.find(differences.iterator(),
+ and(fromSide(DifferenceSource.LEFT), ofKind(DifferenceKind.ADD)));
// Merge -> Node A[containmentRef1 add] from left to right : <- Node A[containmentRef1 add] will be
// merge from left to right too.
@@ -109,8 +109,8 @@ public class PseudoConflictMergeTest {
List<Diff> differences = comparison.getDifferences();
assertEquals(2, differences.size());
- final Diff diff = Iterators.find(differences.iterator(), and(fromSide(DifferenceSource.RIGHT),
- ofKind(DifferenceKind.ADD)));
+ final Diff diff = Iterators.find(differences.iterator(),
+ and(fromSide(DifferenceSource.RIGHT), ofKind(DifferenceKind.ADD)));
// Merge <- Node A[containmentRef1 add] from left to right : -> Node A[containmentRef1 add] will be
// merge from left to right too.
@@ -149,8 +149,8 @@ public class PseudoConflictMergeTest {
List<Diff> differences = comparison.getDifferences();
assertEquals(2, differences.size());
- final Diff diff = Iterators.find(differences.iterator(), and(fromSide(DifferenceSource.LEFT),
- ofKind(DifferenceKind.ADD)));
+ final Diff diff = Iterators.find(differences.iterator(),
+ and(fromSide(DifferenceSource.LEFT), ofKind(DifferenceKind.ADD)));
// Merge -> Node A[containmentRef1 add] from right to left : <- Node A[containmentRef1 add] will be
// merge from right to left too.
@@ -189,8 +189,8 @@ public class PseudoConflictMergeTest {
List<Diff> differences = comparison.getDifferences();
assertEquals(2, differences.size());
- final Diff diff = Iterators.find(differences.iterator(), and(fromSide(DifferenceSource.RIGHT),
- ofKind(DifferenceKind.ADD)));
+ final Diff diff = Iterators.find(differences.iterator(),
+ and(fromSide(DifferenceSource.RIGHT), ofKind(DifferenceKind.ADD)));
// Merge <- Node A[containmentRef1 add] from right to left : -> Node A[containmentRef1 add] will be
// merge from right to left too.
@@ -229,8 +229,8 @@ public class PseudoConflictMergeTest {
List<Diff> differences = comparison.getDifferences();
assertEquals(2, differences.size());
- final Diff diff = Iterators.find(differences.iterator(), and(fromSide(DifferenceSource.LEFT),
- ofKind(DifferenceKind.DELETE)));
+ final Diff diff = Iterators.find(differences.iterator(),
+ and(fromSide(DifferenceSource.LEFT), ofKind(DifferenceKind.DELETE)));
// Merge -> Node B[containmentRef1 delete] from left to right : <- Node B[containmentRef1 delete] will
// be merge from left to right too.
@@ -269,8 +269,8 @@ public class PseudoConflictMergeTest {
List<Diff> differences = comparison.getDifferences();
assertEquals(2, differences.size());
- final Diff diff = Iterators.find(differences.iterator(), and(fromSide(DifferenceSource.RIGHT),
- ofKind(DifferenceKind.DELETE)));
+ final Diff diff = Iterators.find(differences.iterator(),
+ and(fromSide(DifferenceSource.RIGHT), ofKind(DifferenceKind.DELETE)));
// Merge <- Node B[containmentRef1 delete] from left to right : -> Node B[containmentRef1 delete] will
// be merge from left to right too.
@@ -309,8 +309,8 @@ public class PseudoConflictMergeTest {
List<Diff> differences = comparison.getDifferences();
assertEquals(2, differences.size());
- final Diff diff = Iterators.find(differences.iterator(), and(fromSide(DifferenceSource.LEFT),
- ofKind(DifferenceKind.DELETE)));
+ final Diff diff = Iterators.find(differences.iterator(),
+ and(fromSide(DifferenceSource.LEFT), ofKind(DifferenceKind.DELETE)));
// Merge -> Node B[containmentRef1 delete] from right to left : <- Node B[containmentRef1 delete] will
// be merge from right to left too.
@@ -349,8 +349,8 @@ public class PseudoConflictMergeTest {
List<Diff> differences = comparison.getDifferences();
assertEquals(2, differences.size());
- final Diff diff = Iterators.find(differences.iterator(), and(fromSide(DifferenceSource.RIGHT),
- ofKind(DifferenceKind.DELETE)));
+ final Diff diff = Iterators.find(differences.iterator(),
+ and(fromSide(DifferenceSource.RIGHT), ofKind(DifferenceKind.DELETE)));
// Merge <- Node B[containmentRef1 delete] from right to left : -> Node B[containmentRef1 delete] will
// be merge from right to left too.
@@ -389,8 +389,8 @@ public class PseudoConflictMergeTest {
List<Diff> differences = comparison.getDifferences();
assertEquals(2, differences.size());
- final Diff diff = Iterators.find(differences.iterator(), and(fromSide(DifferenceSource.LEFT),
- ofKind(DifferenceKind.CHANGE)));
+ final Diff diff = Iterators.find(differences.iterator(),
+ and(fromSide(DifferenceSource.LEFT), ofKind(DifferenceKind.CHANGE)));
// Merge -> Hello[singleValuedAttribute changed] from left to right : <- Hello[singleValuedAttribute
// changed] will be merge from left to right too.
@@ -431,8 +431,8 @@ public class PseudoConflictMergeTest {
List<Diff> differences = comparison.getDifferences();
assertEquals(2, differences.size());
- final Diff diff = Iterators.find(differences.iterator(), and(fromSide(DifferenceSource.RIGHT),
- ofKind(DifferenceKind.CHANGE)));
+ final Diff diff = Iterators.find(differences.iterator(),
+ and(fromSide(DifferenceSource.RIGHT), ofKind(DifferenceKind.CHANGE)));
// Merge <- Hello[singleValuedAttribute changed] from left to right : -> Hello[singleValuedAttribute
// changed] will be merge from left to right too.
@@ -473,8 +473,8 @@ public class PseudoConflictMergeTest {
List<Diff> differences = comparison.getDifferences();
assertEquals(2, differences.size());
- final Diff diff = Iterators.find(differences.iterator(), and(fromSide(DifferenceSource.LEFT),
- ofKind(DifferenceKind.CHANGE)));
+ final Diff diff = Iterators.find(differences.iterator(),
+ and(fromSide(DifferenceSource.LEFT), ofKind(DifferenceKind.CHANGE)));
// Merge -> Hello[singleValuedAttribute changed] from right to left : <- Hello[singleValuedAttribute
// changed] will be merge from right to left too.
@@ -515,8 +515,8 @@ public class PseudoConflictMergeTest {
List<Diff> differences = comparison.getDifferences();
assertEquals(2, differences.size());
- final Diff diff = Iterators.find(differences.iterator(), and(fromSide(DifferenceSource.RIGHT),
- ofKind(DifferenceKind.CHANGE)));
+ final Diff diff = Iterators.find(differences.iterator(),
+ and(fromSide(DifferenceSource.RIGHT), ofKind(DifferenceKind.CHANGE)));
// Merge -> Hello[singleValuedAttribute changed] from right to left : <- Hello[singleValuedAttribute
// changed] will be merge from right to left too.
diff --git a/plugins/org.eclipse.emf.compare.tests/src/org/eclipse/emf/compare/tests/merge/data/IndividualDiffInputData.java b/plugins/org.eclipse.emf.compare.tests/src/org/eclipse/emf/compare/tests/merge/data/IndividualDiffInputData.java
index eab07a4fc..805f5d1b6 100644
--- a/plugins/org.eclipse.emf.compare.tests/src/org/eclipse/emf/compare/tests/merge/data/IndividualDiffInputData.java
+++ b/plugins/org.eclipse.emf.compare.tests/src/org/eclipse/emf/compare/tests/merge/data/IndividualDiffInputData.java
@@ -536,7 +536,8 @@ public class IndividualDiffInputData extends AbstractInputData {
return loadFromClassLoader("featuremapscope/noncontainment/delete/ancestor.nodes", resourceSet);
}
- public Resource getFeatureMapNonContainmentLeftMoveOrderScope(ResourceSet resourceSet) throws IOException {
+ public Resource getFeatureMapNonContainmentLeftMoveOrderScope(ResourceSet resourceSet)
+ throws IOException {
return loadFromClassLoader("featuremapscope/noncontainment/moveorder/left.nodes", resourceSet);
}
@@ -554,7 +555,8 @@ public class IndividualDiffInputData extends AbstractInputData {
return loadFromClassLoader("featuremapscope/containment/conflicts/leftadd_rightadd/left.nodes");
}
- public Resource getFeatureMapContainmentRightConflictLeftAddRightAddWithSameKeyScope() throws IOException {
+ public Resource getFeatureMapContainmentRightConflictLeftAddRightAddWithSameKeyScope()
+ throws IOException {
return loadFromClassLoader("featuremapscope/containment/conflicts/leftadd_rightadd/right.nodes");
}
@@ -579,15 +581,18 @@ public class IndividualDiffInputData extends AbstractInputData {
}
public Resource getFeatureMapContainmentLeftConflictLeftKeyChangeRightDeleteScope() throws IOException {
- return loadFromClassLoader("featuremapscope/containment/conflicts/leftkeychange_rightdelete/left.nodes");
+ return loadFromClassLoader(
+ "featuremapscope/containment/conflicts/leftkeychange_rightdelete/left.nodes");
}
public Resource getFeatureMapContainmentRightConflictLeftKeyChangeRightDeleteScope() throws IOException {
- return loadFromClassLoader("featuremapscope/containment/conflicts/leftkeychange_rightdelete/right.nodes");
+ return loadFromClassLoader(
+ "featuremapscope/containment/conflicts/leftkeychange_rightdelete/right.nodes");
}
public Resource getFeatureMapContainmentOriginConflictLeftKeyChangeRightDeleteScope() throws IOException {
- return loadFromClassLoader("featuremapscope/containment/conflicts/leftkeychange_rightdelete/ancestor.nodes");
+ return loadFromClassLoader(
+ "featuremapscope/containment/conflicts/leftkeychange_rightdelete/ancestor.nodes");
}
public Resource getFeatureMapContainmentLeftConflictLeftMoveRightMoveScope() throws IOException {
@@ -602,18 +607,22 @@ public class IndividualDiffInputData extends AbstractInputData {
return loadFromClassLoader("featuremapscope/containment/conflicts/leftmove_rightmove/ancestor.nodes");
}
- public Resource getFeatureMapContainmentLeftConflictLeftMoveOrderRightMoveOrderScope() throws IOException {
- return loadFromClassLoader("featuremapscope/containment/conflicts/leftmoveorder_rightmoveorder/left.nodes");
+ public Resource getFeatureMapContainmentLeftConflictLeftMoveOrderRightMoveOrderScope()
+ throws IOException {
+ return loadFromClassLoader(
+ "featuremapscope/containment/conflicts/leftmoveorder_rightmoveorder/left.nodes");
}
public Resource getFeatureMapContainmentRightConflictLeftMoveOrderRightMoveOrderScope()
throws IOException {
- return loadFromClassLoader("featuremapscope/containment/conflicts/leftmoveorder_rightmoveorder/right.nodes");
+ return loadFromClassLoader(
+ "featuremapscope/containment/conflicts/leftmoveorder_rightmoveorder/right.nodes");
}
public Resource getFeatureMapContainmentOriginConflictLeftMoveOrderRightMoveOrderScope()
throws IOException {
- return loadFromClassLoader("featuremapscope/containment/conflicts/leftmoveorder_rightmoveorder/ancestor.nodes");
+ return loadFromClassLoader(
+ "featuremapscope/containment/conflicts/leftmoveorder_rightmoveorder/ancestor.nodes");
}
public Resource getFeatureMapNonContainmentLeftConflictLeftMoveOrderRightMoveOrderScope(
diff --git a/plugins/org.eclipse.emf.compare.tests/src/org/eclipse/emf/compare/tests/merge/data/TwoWayMergeInputData.java b/plugins/org.eclipse.emf.compare.tests/src/org/eclipse/emf/compare/tests/merge/data/TwoWayMergeInputData.java
index f45222c33..4b9b7a092 100644
--- a/plugins/org.eclipse.emf.compare.tests/src/org/eclipse/emf/compare/tests/merge/data/TwoWayMergeInputData.java
+++ b/plugins/org.eclipse.emf.compare.tests/src/org/eclipse/emf/compare/tests/merge/data/TwoWayMergeInputData.java
@@ -37,19 +37,23 @@ public class TwoWayMergeInputData extends AbstractInputData {
}
public Resource getOppositeReferenceChangeWithoutMatchingOrignalContainerL2RLeft() throws IOException {
- return loadFromClassLoader("twoway/oppositereferencechangewithoutmatchingorignalcontainer/ltr/left.nodes");
+ return loadFromClassLoader(
+ "twoway/oppositereferencechangewithoutmatchingorignalcontainer/ltr/left.nodes");
}
public Resource getOppositeReferenceChangeWithoutMatchingOrignalContainerL2RRight() throws IOException {
- return loadFromClassLoader("twoway/oppositereferencechangewithoutmatchingorignalcontainer/ltr/right.nodes");
+ return loadFromClassLoader(
+ "twoway/oppositereferencechangewithoutmatchingorignalcontainer/ltr/right.nodes");
}
public Resource getOppositeReferenceChangeWithAddAndDeleteOnMultivaluedSideLeft() throws IOException {
- return loadFromClassLoader("twoway/oppositereferencechangewithaddanddeleteonmultivaluedside/rtl/left.nodes");
+ return loadFromClassLoader(
+ "twoway/oppositereferencechangewithaddanddeleteonmultivaluedside/rtl/left.nodes");
}
public Resource getOppositeReferenceChangeWithAddAndDeleteOnMultivaluedSideRight() throws IOException {
- return loadFromClassLoader("twoway/oppositereferencechangewithaddanddeleteonmultivaluedside/rtl/right.nodes");
+ return loadFromClassLoader(
+ "twoway/oppositereferencechangewithaddanddeleteonmultivaluedside/rtl/right.nodes");
}
public Resource getMoveFromSingleValueReferenceToMultiValueReferenceR2LLeft() throws IOException {
@@ -57,7 +61,8 @@ public class TwoWayMergeInputData extends AbstractInputData {
}
public Resource getMoveFromSingleValueReferenceToMultiValueReferenceR2LRight() throws IOException {
- return loadFromClassLoader("twoway/movefromsinglevaluereferencetomultivaluereference/rtl/right.nodes");
+ return loadFromClassLoader(
+ "twoway/movefromsinglevaluereferencetomultivaluereference/rtl/right.nodes");
}
public Resource getMoveToNewContainerInADifferentOrderR2LLeft() throws IOException {
diff --git a/plugins/org.eclipse.emf.compare.tests/src/org/eclipse/emf/compare/tests/postprocess/PostProcessorTest.java b/plugins/org.eclipse.emf.compare.tests/src/org/eclipse/emf/compare/tests/postprocess/PostProcessorTest.java
index 18f37b473..ee69b85b0 100644
--- a/plugins/org.eclipse.emf.compare.tests/src/org/eclipse/emf/compare/tests/postprocess/PostProcessorTest.java
+++ b/plugins/org.eclipse.emf.compare.tests/src/org/eclipse/emf/compare/tests/postprocess/PostProcessorTest.java
@@ -61,8 +61,8 @@ public class PostProcessorTest {
// Post processing (add a match element) if EMF Compare scans a model coming from the namespace URI
// "http://www.eclipse.org/emf/compare/tests/nodes" at least.
- final Comparison comparison = compareWithPostProcessing(left, right, Pattern
- .compile("http://www.eclipse.org/emf/compare/tests/nodes"), null);
+ final Comparison comparison = compareWithPostProcessing(left, right,
+ Pattern.compile("http://www.eclipse.org/emf/compare/tests/nodes"), null);
assertEquals(2, comparison.getMatches().size());
@@ -138,8 +138,8 @@ public class PostProcessorTest {
// Post processing (add a match element) if EMF Compare scans a resource where its U
// the specified one at least.
- final Comparison comparison = compareWithPostProcessing(left, right, null, Pattern.compile(left
- .getURI().toString()));
+ final Comparison comparison = compareWithPostProcessing(left, right, null,
+ Pattern.compile(left.getURI().toString()));
assertEquals(2, comparison.getMatches().size());
@@ -152,8 +152,8 @@ public class PostProcessorTest {
// Post processing (add a match element) if EMF Compare scans a resource where its U
// specified regex at least.
- final Comparison comparison = compareWithPostProcessing(left, right, null, Pattern
- .compile(".*.nodes"));
+ final Comparison comparison = compareWithPostProcessing(left, right, null,
+ Pattern.compile(".*.nodes"));
assertEquals(2, comparison.getMatches().size());
@@ -165,8 +165,8 @@ public class PostProcessorTest {
final Resource right = input.getRight();
// No post processes if the regex matches no scanned resource URIs
- final Comparison comparison = compareWithPostProcessing(left, right, null, Pattern
- .compile(".*.nides"));
+ final Comparison comparison = compareWithPostProcessing(left, right, null,
+ Pattern.compile(".*.nides"));
assertEquals(1, comparison.getMatches().size());
@@ -203,18 +203,20 @@ public class PostProcessorTest {
final IComparisonScope scope = new DefaultComparisonScope(left, right, null);
PostProcessorDescriptorRegistryImpl<String> registry = new PostProcessorDescriptorRegistryImpl<String>();
- registry.put(TestPostProcessor1.class.getName(), new TestPostProcessorDescriptor(Pattern.compile(""),
- null, new TestPostProcessor1(), 1));
- registry.put(TestPostProcessor2.class.getName(), new TestPostProcessorDescriptor(Pattern
- .compile("http://www.eclipse.org/emf/compare/tests/nodes"), null, new TestPostProcessor2(),
- 10));
+ registry.put(TestPostProcessor1.class.getName(),
+ new TestPostProcessorDescriptor(Pattern.compile(""), null, new TestPostProcessor1(), 1));
+ registry.put(TestPostProcessor2.class.getName(),
+ new TestPostProcessorDescriptor(
+ Pattern.compile("http://www.eclipse.org/emf/compare/tests/nodes"), null,
+ new TestPostProcessor2(), 10));
registry.put(TestPostProcessor3.class.getName(),
- new TestPostProcessorDescriptor(Pattern
- .compile("http://www.eclipse.org/emf/compare/tests/nodes"), null,
+ new TestPostProcessorDescriptor(
+ Pattern.compile("http://www.eclipse.org/emf/compare/tests/nodes"), null,
new TestPostProcessor3(), 9));
- registry.put(TestPostProcessor4.class.getName(), new TestPostProcessorDescriptor(Pattern
- .compile("http://www.eclipse.org/emf/compare/tests/nodes"), null, new TestPostProcessor4(),
- 11));
+ registry.put(TestPostProcessor4.class.getName(),
+ new TestPostProcessorDescriptor(
+ Pattern.compile("http://www.eclipse.org/emf/compare/tests/nodes"), null,
+ new TestPostProcessor4(), 11));
// Populate nsURIs of the scope.
EMFCompare.builder().setPostProcessorRegistry(registry).build().compare(scope);
@@ -230,8 +232,8 @@ public class PostProcessorTest {
private Comparison compareWithPostProcessing(Resource left, Resource right, Pattern nsURI,
Pattern resourceURI) {
PostProcessorDescriptorRegistryImpl<String> registry = new PostProcessorDescriptorRegistryImpl<String>();
- registry.put(TestPostProcessor.class.getName(), new TestPostProcessorDescriptor(nsURI, resourceURI,
- new TestPostProcessor(), 10));
+ registry.put(TestPostProcessor.class.getName(),
+ new TestPostProcessorDescriptor(nsURI, resourceURI, new TestPostProcessor(), 10));
final IComparisonScope scope = new DefaultComparisonScope(left, right, null);
return EMFCompare.builder().setPostProcessorRegistry(registry).build().compare(scope);
diff --git a/plugins/org.eclipse.emf.compare.tests/src/org/eclipse/emf/compare/tests/req/ReqComputingTest.java b/plugins/org.eclipse.emf.compare.tests/src/org/eclipse/emf/compare/tests/req/ReqComputingTest.java
index a316870b0..496fa1bc5 100644
--- a/plugins/org.eclipse.emf.compare.tests/src/org/eclipse/emf/compare/tests/req/ReqComputingTest.java
+++ b/plugins/org.eclipse.emf.compare.tests/src/org/eclipse/emf/compare/tests/req/ReqComputingTest.java
@@ -719,8 +719,8 @@ public class ReqComputingTest {
private void testH(TestKind testKind, Comparison comparison) {
EList<Diff> differences = comparison.getDifferences();
- Collection<Diff> racs = Collections2.filter(differences, Predicates
- .instanceOf(ResourceAttachmentChange.class));
+ Collection<Diff> racs = Collections2.filter(differences,
+ Predicates.instanceOf(ResourceAttachmentChange.class));
assertEquals(1, racs.size());
Diff rac = racs.iterator().next();
@@ -728,10 +728,10 @@ public class ReqComputingTest {
Predicate<? super Diff> deleteInnerNodeDiffDescription = null;
if (testKind == TestKind.DELETE) {
- deleteFragmentedDiffDescription = removed("root.fragmented"); //$NON-NLS-1$
+ deleteFragmentedDiffDescription = removed("root.fragmented"); //$NON-NLS-1$
deleteInnerNodeDiffDescription = removed("root.fragmented.innerNode"); //$NON-NLS-1$
} else {
- deleteFragmentedDiffDescription = added("root.fragmented"); //$NON-NLS-1$
+ deleteFragmentedDiffDescription = added("root.fragmented"); //$NON-NLS-1$
deleteInnerNodeDiffDescription = added("root.fragmented.innerNode"); //$NON-NLS-1$
}
@@ -922,8 +922,8 @@ public class ReqComputingTest {
Predicate<? super Diff> addedMultiValuedRefDiffDescription = null;
if (kind.equals(TestKind.DELETE)) {
deleteDestinationDiffDescription = removed("Requirements.containerDestination.destination2"); //$NON-NLS-1$
- deletedMultiValuedRefDiffDescription = removedFromReference(
- "Requirements.containerSource.source", "multiValuedReference", //$NON-NLS-1$ //$NON-NLS-2$
+ deletedMultiValuedRefDiffDescription = removedFromReference("Requirements.containerSource.source", //$NON-NLS-1$
+ "multiValuedReference", //$NON-NLS-1$
"Requirements.containerDestination.destination2"); //$NON-NLS-1$
addedMultiValuedRefDiffDescription = addedToReference("Requirements.containerSource.source", //$NON-NLS-1$
"multiValuedReference", "Requirements.destination1"); //$NON-NLS-1$//$NON-NLS-2$
@@ -1251,23 +1251,23 @@ public class ReqComputingTest {
if (kind.equals(TestKind.ADD)) {
addBDescription = added("Requirements.B"); //$NON-NLS-1$
delCDescription = removed("Requirements.C"); //$NON-NLS-1$
- changeRefBDescription = changedReference(
- "Requirements.A", "singleValuedReference", "Requirements.C", "Requirements.B"); //$NON-NLS-1$//$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
+ changeRefBDescription = changedReference("Requirements.A", "singleValuedReference", //$NON-NLS-1$//$NON-NLS-2$
+ "Requirements.C", "Requirements.B"); //$NON-NLS-1$ //$NON-NLS-2$
addEDescription = added("Requirements.E"); //$NON-NLS-1$
delFDescription = removed("Requirements.F"); //$NON-NLS-1$
- addRefEDescription = addedToReference("Requirements.D", "multiValuedReference", "Requirements.E"); //$NON-NLS-1$//$NON-NLS-2$ //$NON-NLS-3$
- delRefFDescription = removedFromReference(
- "Requirements.D", "multiValuedReference", "Requirements.F"); //$NON-NLS-1$//$NON-NLS-2$ //$NON-NLS-3$
+ addRefEDescription = addedToReference("Requirements.D", "multiValuedReference", "Requirements.E"); //$NON-NLS-1$//$NON-NLS-2$ //$NON-NLS-3$
+ delRefFDescription = removedFromReference("Requirements.D", "multiValuedReference", //$NON-NLS-1$//$NON-NLS-2$
+ "Requirements.F"); //$NON-NLS-1$
} else {
addBDescription = removed("Requirements.B"); //$NON-NLS-1$
delCDescription = added("Requirements.C"); //$NON-NLS-1$
- changeRefBDescription = changedReference(
- "Requirements.A", "singleValuedReference", "Requirements.B", "Requirements.C"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
+ changeRefBDescription = changedReference("Requirements.A", "singleValuedReference", //$NON-NLS-1$ //$NON-NLS-2$
+ "Requirements.B", "Requirements.C"); //$NON-NLS-1$ //$NON-NLS-2$
addEDescription = removed("Requirements.E"); //$NON-NLS-1$
delFDescription = added("Requirements.F"); //$NON-NLS-1$
- addRefEDescription = removedFromReference(
- "Requirements.D", "multiValuedReference", "Requirements.E"); //$NON-NLS-1$//$NON-NLS-2$ //$NON-NLS-3$
- delRefFDescription = addedToReference("Requirements.D", "multiValuedReference", "Requirements.F"); //$NON-NLS-1$//$NON-NLS-2$ //$NON-NLS-3$
+ addRefEDescription = removedFromReference("Requirements.D", "multiValuedReference", //$NON-NLS-1$//$NON-NLS-2$
+ "Requirements.E"); //$NON-NLS-1$
+ delRefFDescription = addedToReference("Requirements.D", "multiValuedReference", "Requirements.F"); //$NON-NLS-1$//$NON-NLS-2$ //$NON-NLS-3$
}
final Diff addB = Iterators.find(differences.iterator(), addBDescription);
diff --git a/plugins/org.eclipse.emf.compare.tests/src/org/eclipse/emf/compare/tests/scope/DefaultComparisonScopeTest.java b/plugins/org.eclipse.emf.compare.tests/src/org/eclipse/emf/compare/tests/scope/DefaultComparisonScopeTest.java
index cecf07bbe..25dc83b80 100644
--- a/plugins/org.eclipse.emf.compare.tests/src/org/eclipse/emf/compare/tests/scope/DefaultComparisonScopeTest.java
+++ b/plugins/org.eclipse.emf.compare.tests/src/org/eclipse/emf/compare/tests/scope/DefaultComparisonScopeTest.java
@@ -122,8 +122,8 @@ public class DefaultComparisonScopeTest {
final EObject root = allEObjects.next();
final Iterator<? extends EObject> scopeChildren = resourceScope.getChildren(root);
- final List<EObject> children = Lists.newArrayList(Iterators.filter(EcoreUtil
- .getAllProperContents(root, false), EObject.class));
+ final List<EObject> children = Lists.newArrayList(
+ Iterators.filter(EcoreUtil.getAllProperContents(root, false), EObject.class));
while (scopeChildren.hasNext()) {
assertTrue(children.remove(scopeChildren.next()));
@@ -149,8 +149,8 @@ public class DefaultComparisonScopeTest {
final Resource originResource = (Resource)resourceScope.getOrigin();
final Iterator<? extends EObject> scopeLeftChildren = resourceScope.getCoveredEObjects(leftResource);
- final List<EObject> leftChildren = Lists.newArrayList(Iterators.filter(EcoreUtil
- .getAllProperContents(leftResource, false), EObject.class));
+ final List<EObject> leftChildren = Lists.newArrayList(
+ Iterators.filter(EcoreUtil.getAllProperContents(leftResource, false), EObject.class));
while (scopeLeftChildren.hasNext()) {
assertTrue(leftChildren.remove(scopeLeftChildren.next()));
}
@@ -161,8 +161,8 @@ public class DefaultComparisonScopeTest {
final Iterator<? extends EObject> scopeRightChildren = resourceScope
.getCoveredEObjects(rightResource);
- final List<EObject> rightChildren = Lists.newArrayList(Iterators.filter(EcoreUtil
- .getAllProperContents(rightResource, false), EObject.class));
+ final List<EObject> rightChildren = Lists.newArrayList(
+ Iterators.filter(EcoreUtil.getAllProperContents(rightResource, false), EObject.class));
while (scopeRightChildren.hasNext()) {
assertTrue(rightChildren.remove(scopeRightChildren.next()));
}
@@ -173,8 +173,8 @@ public class DefaultComparisonScopeTest {
final Iterator<? extends EObject> scopeOriginChildren = resourceScope
.getCoveredEObjects(originResource);
- final List<EObject> originChildren = Lists.newArrayList(Iterators.filter(EcoreUtil
- .getAllProperContents(originResource, false), EObject.class));
+ final List<EObject> originChildren = Lists.newArrayList(
+ Iterators.filter(EcoreUtil.getAllProperContents(originResource, false), EObject.class));
while (scopeOriginChildren.hasNext()) {
assertTrue(originChildren.remove(scopeOriginChildren.next()));
}
@@ -283,8 +283,8 @@ public class DefaultComparisonScopeTest {
final EObject root = allEObjects.next();
final Iterator<? extends EObject> scopeChildren = resourceScope.getChildren(root);
- final List<EObject> children = Lists.newArrayList(Iterators.filter(EcoreUtil
- .getAllProperContents(root, false), EObject.class));
+ final List<EObject> children = Lists.newArrayList(
+ Iterators.filter(EcoreUtil.getAllProperContents(root, false), EObject.class));
while (scopeChildren.hasNext()) {
assertTrue(children.remove(scopeChildren.next()));
diff --git a/plugins/org.eclipse.emf.compare.tests/src/org/eclipse/emf/compare/tests/suite/AllTests.java b/plugins/org.eclipse.emf.compare.tests/src/org/eclipse/emf/compare/tests/suite/AllTests.java
index c8bb708cb..38afa7a79 100644
--- a/plugins/org.eclipse.emf.compare.tests/src/org/eclipse/emf/compare/tests/suite/AllTests.java
+++ b/plugins/org.eclipse.emf.compare.tests/src/org/eclipse/emf/compare/tests/suite/AllTests.java
@@ -83,8 +83,8 @@ import org.junit.runners.Suite.SuiteClasses;
@SuiteClasses({CompareTestSuite.class, DefaultComparisonScopeTest.class, IdentifierComparisonTest.class,
ExtLibraryTest.class, ConflictDetectionTest.class, ReqComputingTest.class, EquiComputingTest.class,
DiffUtilTest.class, FeatureMapMoveDiffTest.class, ComparisonUtilTest.class, LCSPerformanceTest.class,
- MultipleMergeTest.class, PostProcessorTest.class, IndividualMergeTest.class,
- ExtensionMergeTest.class, IndividualMergeOutOfScopeValuesTest.class, ProximityComparisonTest.class,
+ MultipleMergeTest.class, PostProcessorTest.class, IndividualMergeTest.class, ExtensionMergeTest.class,
+ IndividualMergeOutOfScopeValuesTest.class, ProximityComparisonTest.class,
DynamicInstanceComparisonTest.class, URIDistanceTest.class, FragmentationTest.class,
AllEditTests.class, CommandStackTestSuite.class, MatchEngineFactoryRegistryTest.class,
RootIDMatchingTest.class, XMIMatchingTest.class, ProxyMatchingTest.class, ConflictMergeTest.class,
diff --git a/plugins/org.eclipse.emf.compare.tests/src/org/eclipse/emf/compare/tests/utils/GraphTest.java b/plugins/org.eclipse.emf.compare.tests/src/org/eclipse/emf/compare/tests/utils/GraphTest.java
index 362f33313..aa9981c4c 100644
--- a/plugins/org.eclipse.emf.compare.tests/src/org/eclipse/emf/compare/tests/utils/GraphTest.java
+++ b/plugins/org.eclipse.emf.compare.tests/src/org/eclipse/emf/compare/tests/utils/GraphTest.java
@@ -38,19 +38,11 @@ public class GraphTest {
@Test
public void testBuildSubGraph() {
IGraph<String> graph = new Graph<String>();
- //@formatter:off
+ // @formatter:off
/*
- * Add the following graph:
- * e f
- * | |
- * b c d
- * \ | /
- * \ | /
- * ---------
- * |
- * a
+ * Add the following graph: e f | | b c d \ | / \ | / --------- | a
*/
- //@formatter:on
+ // @formatter:on
graph.addChildren("a", ImmutableSet.of("b", "c", "d"));
graph.addChildren("c", ImmutableSet.of("e"));
graph.addChildren("d", ImmutableSet.of("f"));
@@ -66,16 +58,11 @@ public class GraphTest {
@Test
public void testPrune() {
IGraph<String> graph = new Graph<String>();
- //@formatter:off
+ // @formatter:off
/*
- * Add the following graph:
- * c-\
- * | |
- * b-/
- * |
- * a
+ * Add the following graph: c-\ | | b-/ | a
*/
- //@formatter:on
+ // @formatter:on
graph.addChildren("a", ImmutableSet.of("b"));
graph.addChildren("b", ImmutableSet.of("c"));
graph.addChildren("c", ImmutableSet.of("b"));
@@ -89,22 +76,13 @@ public class GraphTest {
@Test
public void testBreadthFirstIteration() {
IGraph<String> graph = new Graph<String>();
- //@formatter:off
+ // @formatter:off
/*
- * With the following Graph:
- *
- * A I J
- * / \ / / \
- * B C G K L
- * / / \ / \ / \
- * D E F H M N
- *
- * We expect our iteration to go in the following order:
- * three first items, in unspecified order : A, I, J
- * next five, in unspecified order : B, C, G, K, L
- * finally, still in unspecified order : D, E, F, H, M, N
+ * With the following Graph: A I J / \ / / \ B C G K L / / \ / \ / \ D E F H M N We expect our
+ * iteration to go in the following order: three first items, in unspecified order : A, I, J next
+ * five, in unspecified order : B, C, G, K, L finally, still in unspecified order : D, E, F, H, M, N
*/
- //@formatter:on
+ // @formatter:on
graph.addChildren("A", ImmutableSet.of("B", "C"));
graph.addChildren("B", ImmutableSet.of("D"));
graph.addChildren("C", ImmutableSet.of("E", "F"));
@@ -258,7 +236,7 @@ public class GraphTest {
* B C G K L
* / / \ / \ / \
* D E F H M N
- * </pre>
+ * </pre>
*/
private IGraph<String> getAcyclicGraph() {
IGraph<String> graph = new Graph<String>();
@@ -283,7 +261,7 @@ public class GraphTest {
* B C G K L
* / / \ / \ \ // \
* D - E F = H M N
- * </pre>
+ * </pre>
*/
private IGraph<String> getGraphWithCycles() {
IGraph<String> graph = new Graph<String>();

Back to the top