Skip to main content
summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authortle2012-02-20 19:30:23 +0000
committertle2012-02-20 19:30:23 +0000
commit17f02c829619fcf7e95e96d9c51aac6936f2c423 (patch)
tree9ef10076e2d2ecac2d1b8fdacbe4d57ef7374dc7 /jpa/tests/org.eclipse.jpt.jpa.core.tests/src/org
parent3c6ec5a8fb6843b0620c946dfa22f569f027afa9 (diff)
downloadwebtools.dali-17f02c829619fcf7e95e96d9c51aac6936f2c423.tar.gz
webtools.dali-17f02c829619fcf7e95e96d9c51aac6936f2c423.tar.xz
webtools.dali-17f02c829619fcf7e95e96d9c51aac6936f2c423.zip
Refactored preferences support with JpaPreferencesManager
Diffstat (limited to 'jpa/tests/org.eclipse.jpt.jpa.core.tests/src/org')
-rw-r--r--jpa/tests/org.eclipse.jpt.jpa.core.tests/src/org/eclipse/jpt/jpa/core/tests/JptJpaCoreTestsPlugin.java3
-rw-r--r--jpa/tests/org.eclipse.jpt.jpa.core.tests/src/org/eclipse/jpt/jpa/core/tests/internal/context/ContextModelTestCase.java5
2 files changed, 5 insertions, 3 deletions
diff --git a/jpa/tests/org.eclipse.jpt.jpa.core.tests/src/org/eclipse/jpt/jpa/core/tests/JptJpaCoreTestsPlugin.java b/jpa/tests/org.eclipse.jpt.jpa.core.tests/src/org/eclipse/jpt/jpa/core/tests/JptJpaCoreTestsPlugin.java
index dd1ef03c55..f3b96b3b39 100644
--- a/jpa/tests/org.eclipse.jpt.jpa.core.tests/src/org/eclipse/jpt/jpa/core/tests/JptJpaCoreTestsPlugin.java
+++ b/jpa/tests/org.eclipse.jpt.jpa.core.tests/src/org/eclipse/jpt/jpa/core/tests/JptJpaCoreTestsPlugin.java
@@ -14,6 +14,7 @@ import org.eclipse.core.runtime.Plugin;
import org.eclipse.jpt.common.utility.internal.ReflectionTools;
import org.eclipse.jpt.jpa.core.JpaProjectManager;
import org.eclipse.jpt.jpa.core.JptJpaCorePlugin;
+import org.eclipse.jpt.jpa.core.internal.prefs.JpaPreferencesManager;
import org.osgi.framework.BundleContext;
/**
@@ -51,7 +52,7 @@ public class JptJpaCoreTestsPlugin
JpaProjectManager jpaProjectManager = this.getJpaProjectManager();
ReflectionTools.executeMethod(jpaProjectManager, "executeCommandsSynchronously");
ReflectionTools.setFieldValue(jpaProjectManager, "test", Boolean.TRUE);
- ReflectionTools.executeStaticMethod(JptJpaCorePlugin.class, "doNotFlushPreferences");
+ ReflectionTools.executeStaticMethod(JpaPreferencesManager.class, "doNotFlushPreferences");
}
private JpaProjectManager getJpaProjectManager() {
diff --git a/jpa/tests/org.eclipse.jpt.jpa.core.tests/src/org/eclipse/jpt/jpa/core/tests/internal/context/ContextModelTestCase.java b/jpa/tests/org.eclipse.jpt.jpa.core.tests/src/org/eclipse/jpt/jpa/core/tests/internal/context/ContextModelTestCase.java
index c21bb21b2c..f79ef43756 100644
--- a/jpa/tests/org.eclipse.jpt.jpa.core.tests/src/org/eclipse/jpt/jpa/core/tests/internal/context/ContextModelTestCase.java
+++ b/jpa/tests/org.eclipse.jpt.jpa.core.tests/src/org/eclipse/jpt/jpa/core/tests/internal/context/ContextModelTestCase.java
@@ -1,5 +1,5 @@
/*******************************************************************************
- * Copyright (c) 2007, 2011 Oracle. All rights reserved.
+ * Copyright (c) 2007, 2012 Oracle. 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 http://www.eclipse.org/legal/epl-v10.html.
@@ -31,6 +31,7 @@ import org.eclipse.jpt.jpa.core.context.persistence.PersistenceUnit;
import org.eclipse.jpt.jpa.core.internal.facet.JpaFacetDataModelProperties;
import org.eclipse.jpt.jpa.core.internal.facet.JpaFacetInstallDataModelProperties;
import org.eclipse.jpt.jpa.core.internal.facet.JpaFacetInstallDataModelProvider;
+import org.eclipse.jpt.jpa.core.internal.prefs.JpaPreferencesManager;
import org.eclipse.jpt.jpa.core.platform.GenericPlatform;
import org.eclipse.jpt.jpa.core.platform.JpaPlatformDescription;
import org.eclipse.jpt.jpa.core.resource.orm.XmlEntityMappings;
@@ -72,7 +73,7 @@ public abstract class ContextModelTestCase extends AnnotationTestCase
protected void tearDown() throws Exception {
this.persistenceXmlResource = null;
this.ormXmlResource = null;
- JptJpaCorePlugin.getWorkspacePreferences().clear();
+ JpaPreferencesManager.clearWorkspacePreferences();
this.waitForWorkspaceJobsToFinish();
super.tearDown();
}

Back to the top