Skip to main content
summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMartin Fleck2017-02-27 11:36:36 -0500
committerLaurent Goubet2017-04-10 09:13:39 -0400
commit397973f42e0b298452e56379659fe9caae172fe4 (patch)
treef54f48f24c0c477edc239d669290477041c1a6c8 /performance
parent0460c391dbeb04a23f6f7662bc7babc453aae04e (diff)
downloadorg.eclipse.emf.compare-397973f42e0b298452e56379659fe9caae172fe4.tar.gz
org.eclipse.emf.compare-397973f42e0b298452e56379659fe9caae172fe4.tar.xz
org.eclipse.emf.compare-397973f42e0b298452e56379659fe9caae172fe4.zip
[512562] Diff/merge can't handle multiple repos
Fix issue of handling multiple repos by pruning resources that are not in the repository of the left logical model starting point from the logical model. - Extend model minimizers to consider the logical model starting point - Add registry and extension point for the model minimizers - Add minimizer to remove resources not matching the expected repository - Use registered model minimizers where applicable Bug: 512562 Change-Id: I2a6b378760bdfca5e4c09dc4fbd945016ae58dc0 Signed-off-by: Martin Fleck <mfleck@eclipsesource.com>
Diffstat (limited to 'performance')
-rw-r--r--performance/org.eclipse.emf.compare.tests.performance/src/data/models/DataGit.java9
1 files changed, 5 insertions, 4 deletions
diff --git a/performance/org.eclipse.emf.compare.tests.performance/src/data/models/DataGit.java b/performance/org.eclipse.emf.compare.tests.performance/src/data/models/DataGit.java
index 8eb515d5b..e56817348 100644
--- a/performance/org.eclipse.emf.compare.tests.performance/src/data/models/DataGit.java
+++ b/performance/org.eclipse.emf.compare.tests.performance/src/data/models/DataGit.java
@@ -1,5 +1,5 @@
/*******************************************************************************
- * Copyright (c) 2015, 2016 Obeo.
+ * Copyright (c) 2015, 2017 Obeo and others.
* All rights reserved. This program and the accompanying materials
* are made available under the terms of the Eclipse Public License v1.0
* which accompanies this distribution, and is available at
@@ -7,6 +7,7 @@
*
* Contributors:
* Obeo - initial API and implementation
+ * Martin Fleck - bug 512562
*******************************************************************************/
package data.models;
@@ -38,8 +39,8 @@ import org.eclipse.emf.common.util.EList;
import org.eclipse.emf.common.util.TreeIterator;
import org.eclipse.emf.compare.Comparison;
import org.eclipse.emf.compare.EMFCompare;
-import org.eclipse.emf.compare.conflict.MatchBasedConflictDetector;
import org.eclipse.emf.compare.conflict.IConflictDetector;
+import org.eclipse.emf.compare.conflict.MatchBasedConflictDetector;
import org.eclipse.emf.compare.diagram.internal.CompareDiagramPostProcessor;
import org.eclipse.emf.compare.diff.DefaultDiffEngine;
import org.eclipse.emf.compare.diff.DiffBuilder;
@@ -49,7 +50,6 @@ import org.eclipse.emf.compare.equi.DefaultEquiEngine;
import org.eclipse.emf.compare.equi.IEquiEngine;
import org.eclipse.emf.compare.ide.ui.internal.EMFCompareIDEUIPlugin;
import org.eclipse.emf.compare.ide.ui.internal.logical.ComparisonScopeBuilder;
-import org.eclipse.emf.compare.ide.ui.internal.logical.IdenticalResourceMinimizer;
import org.eclipse.emf.compare.ide.ui.internal.logical.StorageTypedElement;
import org.eclipse.emf.compare.ide.ui.internal.logical.SubscriberStorageAccessor;
import org.eclipse.emf.compare.ide.ui.internal.logical.resolver.registry.ModelResolverRegistry;
@@ -165,7 +165,8 @@ public class DataGit {
ModelResolverRegistry mrr = EMFCompareIDEUIPlugin.getDefault().getModelResolverRegistry();
IModelResolver resolver = mrr.getBestResolverFor(sourceProvider.getStorage(m));
final ComparisonScopeBuilder scopeBuilder = new ComparisonScopeBuilder(resolver,
- new IdenticalResourceMinimizer(), storageAccessor);
+ EMFCompareIDEUIPlugin.getDefault().getModelMinimizerRegistry().getCompoundMinimizer(),
+ storageAccessor);
scope = scopeBuilder.build(left, right, origin, m);
resourceSets.add((ResourceSet)scope.getLeft());

Back to the top