Skip to main content
summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMathieu Cartaud2016-01-14 11:43:13 +0000
committerMathieu Cartaud2016-02-01 09:18:44 +0000
commit755f4bc6c59ebc762a6b92c53c6011243be344b4 (patch)
treefc8ddcfb5e2402e3df6586e09b950c4079b45671 /plugins/org.eclipse.emf.compare.tests
parentae6fc1e8a3d7de7a5b1135476adcfda258c77627 (diff)
downloadorg.eclipse.emf.compare-755f4bc6c59ebc762a6b92c53c6011243be344b4.tar.gz
org.eclipse.emf.compare-755f4bc6c59ebc762a6b92c53c6011243be344b4.tar.xz
org.eclipse.emf.compare-755f4bc6c59ebc762a6b92c53c6011243be344b4.zip
Scalable conflict detector
New algorithm searches for conflicts only where it makes sense, which is basically in the same match generally, except for ReferenceChanges, for which an index on values is used. Consequently, the algorithm shrinks from O(n²) to O(n) or maybe O(n log(n)). Change-Id: I021d90dd7a0429116edc071759ee65f2fa06b56c Signed-off-by: Laurent Delaigue <laurent.delaigue@obeo.fr> Signed-off-by: Mathieu Cartaud <mathieu.cartaud@obeo.fr>
Diffstat (limited to 'plugins/org.eclipse.emf.compare.tests')
-rw-r--r--plugins/org.eclipse.emf.compare.tests/src/org/eclipse/emf/compare/tests/framework/junit/internal/ConflictStatement.java6
1 files changed, 3 insertions, 3 deletions
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 f1a5b1183..7188adcb0 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
@@ -1,5 +1,5 @@
/**
- * Copyright (c) 2013, 2014 Obeo.
+ * Copyright (c) 2013, 2016 Obeo.
* All rights reserved. This program and the accompanying materials
* are made available under the terms of the Eclipse Public License v1.0
* which accompanies this distribution, and is available at
@@ -16,7 +16,7 @@ import org.eclipse.emf.common.notify.Notifier;
import org.eclipse.emf.common.util.BasicMonitor;
import org.eclipse.emf.common.util.Monitor;
import org.eclipse.emf.compare.Comparison;
-import org.eclipse.emf.compare.conflict.DefaultConflictDetector;
+import org.eclipse.emf.compare.conflict.MatchBasedConflictDetector;
import org.eclipse.emf.compare.conflict.IConflictDetector;
import org.eclipse.emf.compare.diff.DefaultDiffEngine;
import org.eclipse.emf.compare.diff.DiffBuilder;
@@ -87,7 +87,7 @@ public class ConflictStatement extends Statement {
final IComparisonScope scope = createComparisonScope(tuple, annotation);
final IMatchEngine matchEngine = createMatchEngine(annotation);
final IDiffEngine diffEngine = createDiffEngine(annotation);
- final IConflictDetector detector = new DefaultConflictDetector();
+ final IConflictDetector detector = new MatchBasedConflictDetector();
final Monitor monitor = new BasicMonitor();
final Comparison comparison = matchEngine.match(scope, new BasicMonitor());

Back to the top