Skip to main content
summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorLaurent Goubet2015-06-05 07:28:01 +0000
committerLaurent Goubet2015-06-08 08:23:34 +0000
commit6587255f108450c17a89e9f85b94d936325ffda2 (patch)
tree3f1d9b73edf989a95046db3d0cab0fc928adc400 /plugins
parent9203ea9993d2f8235dadac1393bb0a8530728a85 (diff)
downloadorg.eclipse.emf.compare-6587255f108450c17a89e9f85b94d936325ffda2.tar.gz
org.eclipse.emf.compare-6587255f108450c17a89e9f85b94d936325ffda2.tar.xz
org.eclipse.emf.compare-6587255f108450c17a89e9f85b94d936325ffda2.zip
Restore caching of the logical model
The logical model of all files in a given logical model will always be the same and contain all said files. The caching of this information allows us to avoid a lot of useless re-computation of the logical model (and reduce the amount of I/O operations needed for a given comparison) Change-Id: I5f2614a6ddd7e326a1aa27f62028feb5846820cc
Diffstat (limited to 'plugins')
-rw-r--r--plugins/org.eclipse.emf.compare.ide.ui/src/org/eclipse/emf/compare/ide/ui/internal/logical/EMFModelProvider.java11
1 files changed, 2 insertions, 9 deletions
diff --git a/plugins/org.eclipse.emf.compare.ide.ui/src/org/eclipse/emf/compare/ide/ui/internal/logical/EMFModelProvider.java b/plugins/org.eclipse.emf.compare.ide.ui/src/org/eclipse/emf/compare/ide/ui/internal/logical/EMFModelProvider.java
index 441098895..ba7da3a4c 100644
--- a/plugins/org.eclipse.emf.compare.ide.ui/src/org/eclipse/emf/compare/ide/ui/internal/logical/EMFModelProvider.java
+++ b/plugins/org.eclipse.emf.compare.ide.ui/src/org/eclipse/emf/compare/ide/ui/internal/logical/EMFModelProvider.java
@@ -44,8 +44,6 @@ import org.eclipse.core.runtime.IAdaptable;
import org.eclipse.core.runtime.IProgressMonitor;
import org.eclipse.core.runtime.NullProgressMonitor;
import org.eclipse.emf.compare.ide.ui.internal.EMFCompareIDEUIPlugin;
-import org.eclipse.emf.compare.ide.ui.internal.logical.resolver.CrossReferenceResolutionScope;
-import org.eclipse.emf.compare.ide.ui.internal.logical.resolver.ResolutionUtil;
import org.eclipse.emf.compare.ide.ui.logical.IModelMinimizer;
import org.eclipse.emf.compare.ide.ui.logical.IModelResolver;
import org.eclipse.emf.compare.ide.ui.logical.IStorageProvider;
@@ -252,13 +250,8 @@ public class EMFModelProvider extends ModelProvider {
}
syncModel = computeLogicalModel(file, context, monitor);
if (syncModel != null) {
- if (ResolutionUtil.getResolutionScope().equals(CrossReferenceResolutionScope.WORKSPACE)) {
- // logical model will be the same for all resources contained in the model
- for (IResource res : syncModel.getResources()) {
- resourceMappingCache.put(res, syncModel);
- }
- } else {
- resourceMappingCache.put(file, syncModel);
+ for (IResource res : syncModel.getResources()) {
+ resourceMappingCache.put(res, syncModel);
}
}
} else if (LOGGER.isDebugEnabled()) {

Back to the top