diff options
author | Sergey Prigogin | 2015-08-30 15:52:50 +0000 |
---|---|---|
committer | Sergey Prigogin | 2015-08-30 15:52:50 +0000 |
commit | 17a25db6d50adeb3498b536c24c7ca196d6636d5 (patch) | |
tree | 2788f6b6b581286fefd830289adb15b27d54e53b | |
parent | a0c122897e0c9086bd19b32622ff264ce9647d2e (diff) | |
download | eclipse.platform.runtime-17a25db6d50adeb3498b536c24c7ca196d6636d5.tar.gz eclipse.platform.runtime-17a25db6d50adeb3498b536c24c7ca196d6636d5.tar.xz eclipse.platform.runtime-17a25db6d50adeb3498b536c24c7ca196d6636d5.zip |
Bug 394739 - Remove org.eclipse.core.runtime.compatibility* bundles
Fixed PreferenceExportTest.
Change-Id: I24fcd233570e9b4c84878289fd56810a42dc7621
-rw-r--r-- | tests/org.eclipse.core.tests.runtime/src/org/eclipse/core/tests/runtime/PreferenceExportTest.java | 10 |
1 files changed, 6 insertions, 4 deletions
diff --git a/tests/org.eclipse.core.tests.runtime/src/org/eclipse/core/tests/runtime/PreferenceExportTest.java b/tests/org.eclipse.core.tests.runtime/src/org/eclipse/core/tests/runtime/PreferenceExportTest.java index bd96774df..76106a91a 100644 --- a/tests/org.eclipse.core.tests.runtime/src/org/eclipse/core/tests/runtime/PreferenceExportTest.java +++ b/tests/org.eclipse.core.tests.runtime/src/org/eclipse/core/tests/runtime/PreferenceExportTest.java @@ -19,6 +19,7 @@ import org.eclipse.core.runtime.*; * @deprecated This class tests intentionally tests deprecated functionality, so tag * added to hide deprecation reference warnings. */ +@Deprecated public class PreferenceExportTest extends RuntimeTest { public static Test suite() { return new TestSuite(PreferenceExportTest.class); @@ -41,7 +42,7 @@ public class PreferenceExportTest extends RuntimeTest { super.tearDown(); //remove properties modified by this test - Plugin testPlugin = Platform.getPlugin(PI_RUNTIME_TESTS); + Plugin testPlugin = RuntimeTestsPlugin.getPlugin(); Preferences prefs = testPlugin.getPluginPreferences(); prefs.setDefault("SomeTestKey", Preferences.STRING_DEFAULT_DEFAULT); prefs.setDefault("SomeOtherTestKey", Preferences.STRING_DEFAULT_DEFAULT); @@ -62,7 +63,7 @@ public class PreferenceExportTest extends RuntimeTest { IPath exportPath = new Path(System.getProperty("java.io.tmpdir")).append(Long.toString(System.currentTimeMillis())); exportPath.toFile().delete(); //add a property change listener that asserts key identity - Plugin testPlugin = Platform.getPlugin(PI_RUNTIME_TESTS); + Plugin testPlugin = RuntimeTestsPlugin.getPlugin(); Preferences prefs = testPlugin.getPluginPreferences(); try { //add a preference on the runtime plugin @@ -115,7 +116,7 @@ public class PreferenceExportTest extends RuntimeTest { IPath exportPath = new Path(System.getProperty("java.io.tmpdir")).append(Long.toString(System.currentTimeMillis())); exportPath.toFile().delete(); //add a property change listener that asserts key identity - Plugin testPlugin = Platform.getPlugin(PI_RUNTIME_TESTS); + Plugin testPlugin = RuntimeTestsPlugin.getPlugin(); Preferences prefs = testPlugin.getPluginPreferences(); Preferences.IPropertyChangeListener listener = new Preferences.IPropertyChangeListener() { @Override @@ -157,8 +158,9 @@ public class PreferenceExportTest extends RuntimeTest { } } finally { exportPath.toFile().delete(); - if (prefs != null) + if (prefs != null) { prefs.removePropertyChangeListener(listener); + } } } } |