Skip to main content
summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorLaurent Delaigue2015-12-11 03:56:26 -0500
committerLaurent Delaigue2015-12-11 04:14:27 -0500
commit9cc18900e87f9ae921396569338365485f9a067a (patch)
tree8aa69f752674877f61b6d96c32019080278dfd7c
parentdfe4d4c397a2cd8bc75e5ddfe046538e50d15222 (diff)
downloadorg.eclipse.emf.compare-9cc18900e87f9ae921396569338365485f9a067a.tar.gz
org.eclipse.emf.compare-9cc18900e87f9ae921396569338365485f9a067a.tar.xz
org.eclipse.emf.compare-9cc18900e87f9ae921396569338365485f9a067a.zip
Fix performance tests
Change-Id: I8a687e2b56884b12450008db1335fe1cb576dd12 Signed-off-by: Laurent Delaigue <laurent.delaigue@obeo.fr>
-rw-r--r--performance/org.eclipse.emf.compare.tests.performance/src/data/models/DataGit.java16
1 files changed, 12 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 753e54ae5..d7036461b 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
@@ -98,6 +98,17 @@ public class DataGit {
private Repository repository;
+ private static ThreadedModelResolver resolver;
+
+ protected static synchronized ThreadedModelResolver getModelResolver() {
+ if (resolver == null) {
+ resolver = new ThreadedModelResolver();
+ EMFCompareRCPPlugin.getDefault().register(resolver);
+ resolver.initialize();
+ }
+ return resolver;
+ }
+
public DataGit(String zippedRepoLocation, String repoName, String rootProjectName, String modelName) {
try {
this.disposers = new ArrayList<Runnable>();
@@ -161,10 +172,7 @@ public class DataGit {
final ITypedElement left = new StorageTypedElement(sourceProvider.getStorage(m), fullPath);
final ITypedElement right = new StorageTypedElement(remoteProvider.getStorage(m), fullPath);
final ITypedElement origin = new StorageTypedElement(ancestorProvider.getStorage(m), fullPath);
- final ThreadedModelResolver resolver = new ThreadedModelResolver();
- EMFCompareRCPPlugin.getDefault().register(resolver);
- resolver.initialize();
- final ComparisonScopeBuilder scopeBuilder = new ComparisonScopeBuilder(resolver,
+ final ComparisonScopeBuilder scopeBuilder = new ComparisonScopeBuilder(getModelResolver(),
new IdenticalResourceMinimizer(), storageAccessor);
scope = scopeBuilder.build(left, right, origin, m);

Back to the top