Skip to main content
aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorChris Goldthorpe2011-09-23 20:55:45 +0000
committerChris Goldthorpe2011-09-23 20:56:44 +0000
commit2bebfff91cd3f259579817e928fb5932dbd622c4 (patch)
treea0dcd60982ef694e7094cd1ae17536b4b65820b9 /org.eclipse.ua.tests/help/org
parent2b9e134f639655caad85f80eb6195e8dc525bc3b (diff)
downloadeclipse.platform.ua-2bebfff91cd3f259579817e928fb5932dbd622c4.tar.gz
eclipse.platform.ua-2bebfff91cd3f259579817e928fb5932dbd622c4.tar.xz
eclipse.platform.ua-2bebfff91cd3f259579817e928fb5932dbd622c4.zip
Bug 358778 - [Test] Eliminate deprecation warnings inv20110926
org.eclipse.ua.tests
Diffstat (limited to 'org.eclipse.ua.tests/help/org')
-rw-r--r--org.eclipse.ua.tests/help/org/eclipse/ua/tests/help/preferences/HelpDataTest.java9
-rw-r--r--org.eclipse.ua.tests/help/org/eclipse/ua/tests/help/remote/RemotePreferenceStore.java5
-rw-r--r--org.eclipse.ua.tests/help/org/eclipse/ua/tests/help/remote/RemotePreferenceTest.java8
-rw-r--r--org.eclipse.ua.tests/help/org/eclipse/ua/tests/help/toc/TocSortingTest.java8
-rw-r--r--org.eclipse.ua.tests/help/org/eclipse/ua/tests/help/webapp/RestrictedTopicParameter.java5
5 files changed, 13 insertions, 22 deletions
diff --git a/org.eclipse.ua.tests/help/org/eclipse/ua/tests/help/preferences/HelpDataTest.java b/org.eclipse.ua.tests/help/org/eclipse/ua/tests/help/preferences/HelpDataTest.java
index 2ecc5acaa..4e018d0c2 100644
--- a/org.eclipse.ua.tests/help/org/eclipse/ua/tests/help/preferences/HelpDataTest.java
+++ b/org.eclipse.ua.tests/help/org/eclipse/ua/tests/help/preferences/HelpDataTest.java
@@ -70,20 +70,17 @@ public class HelpDataTest extends TestCase {
}
private void setBaseTocs(String value) {
- InstanceScope instanceScope = new InstanceScope();
- IEclipsePreferences pref = instanceScope.getNode(HelpPlugin.PLUGIN_ID);
+ IEclipsePreferences pref = InstanceScope.INSTANCE.getNode(HelpPlugin.PLUGIN_ID);
pref.put(HelpPlugin.BASE_TOCS_KEY, value);
}
private void setIgnoredTocs(String value) {
- InstanceScope instanceScope = new InstanceScope();
- IEclipsePreferences pref = instanceScope.getNode(HelpPlugin.PLUGIN_ID);
+ IEclipsePreferences pref = InstanceScope.INSTANCE.getNode(HelpPlugin.PLUGIN_ID);
pref.put(HelpPlugin.IGNORED_TOCS_KEY, value);
}
private void setIgnoredIndexes(String value) {
- InstanceScope instanceScope = new InstanceScope();
- IEclipsePreferences pref = instanceScope.getNode(HelpPlugin.PLUGIN_ID);
+ IEclipsePreferences pref = InstanceScope.INSTANCE.getNode(HelpPlugin.PLUGIN_ID);
pref.put(HelpPlugin.IGNORED_INDEXES_KEY, value);
}
diff --git a/org.eclipse.ua.tests/help/org/eclipse/ua/tests/help/remote/RemotePreferenceStore.java b/org.eclipse.ua.tests/help/org/eclipse/ua/tests/help/remote/RemotePreferenceStore.java
index 4e9d44d90..852a76672 100644
--- a/org.eclipse.ua.tests/help/org/eclipse/ua/tests/help/remote/RemotePreferenceStore.java
+++ b/org.eclipse.ua.tests/help/org/eclipse/ua/tests/help/remote/RemotePreferenceStore.java
@@ -1,5 +1,5 @@
/*******************************************************************************
- * Copyright (c) 2009, 2010 IBM Corporation and others.
+ * Copyright (c) 2009, 2011 IBM Corporation 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
@@ -64,8 +64,7 @@ public class RemotePreferenceStore {
}
public static void restorePreferences() throws Exception {
- InstanceScope instanceScope = new InstanceScope();
- IEclipsePreferences prefs = instanceScope.getNode(HelpBasePlugin.PLUGIN_ID);
+ IEclipsePreferences prefs = InstanceScope.INSTANCE.getNode(HelpBasePlugin.PLUGIN_ID);
prefs.put(IHelpBaseConstants.P_KEY_REMOTE_HELP_NAME, namePreference);
prefs.put(IHelpBaseConstants.P_KEY_REMOTE_HELP_HOST, hostPreference);
prefs.put(IHelpBaseConstants.P_KEY_REMOTE_HELP_PATH, pathPreference);
diff --git a/org.eclipse.ua.tests/help/org/eclipse/ua/tests/help/remote/RemotePreferenceTest.java b/org.eclipse.ua.tests/help/org/eclipse/ua/tests/help/remote/RemotePreferenceTest.java
index e3e1cfcec..59320f1fd 100644
--- a/org.eclipse.ua.tests/help/org/eclipse/ua/tests/help/remote/RemotePreferenceTest.java
+++ b/org.eclipse.ua.tests/help/org/eclipse/ua/tests/help/remote/RemotePreferenceTest.java
@@ -1,5 +1,5 @@
/*******************************************************************************
- * Copyright (c) 2008, 2010 IBM Corporation and others.
+ * Copyright (c) 2008, 2011 IBM Corporation 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
@@ -23,8 +23,7 @@ import org.eclipse.help.internal.base.remote.RemoteIC;
public class RemotePreferenceTest extends TestCase {
public static void setPreference(String name, String value) {
- InstanceScope instanceScope = new InstanceScope();
- IEclipsePreferences prefs = instanceScope.getNode(HelpBasePlugin.PLUGIN_ID);
+ IEclipsePreferences prefs = InstanceScope.INSTANCE.getNode(HelpBasePlugin.PLUGIN_ID);
prefs.put(name, value);
}
@@ -37,8 +36,7 @@ public class RemotePreferenceTest extends TestCase {
}
private void setToDefault(String preference) {
- InstanceScope instanceScope = new InstanceScope();
- IEclipsePreferences prefs = instanceScope.getNode(HelpBasePlugin.PLUGIN_ID);
+ IEclipsePreferences prefs = InstanceScope.INSTANCE.getNode(HelpBasePlugin.PLUGIN_ID);
prefs.remove(preference);
}
diff --git a/org.eclipse.ua.tests/help/org/eclipse/ua/tests/help/toc/TocSortingTest.java b/org.eclipse.ua.tests/help/org/eclipse/ua/tests/help/toc/TocSortingTest.java
index 10ca1c134..f9f7e9451 100644
--- a/org.eclipse.ua.tests/help/org/eclipse/ua/tests/help/toc/TocSortingTest.java
+++ b/org.eclipse.ua.tests/help/org/eclipse/ua/tests/help/toc/TocSortingTest.java
@@ -1,5 +1,5 @@
/*******************************************************************************
- * Copyright (c) 2007, 2009 IBM Corporation and others.
+ * Copyright (c) 2007, 2011 IBM Corporation 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
@@ -137,14 +137,12 @@ public class TocSortingTest extends TestCase {
}
private void setHelpData(String value) {
- InstanceScope instanceScope = new InstanceScope();
- IEclipsePreferences prefs = instanceScope.getNode(HelpPlugin.PLUGIN_ID);
+ IEclipsePreferences prefs = InstanceScope.INSTANCE.getNode(HelpPlugin.PLUGIN_ID);
prefs.put(HelpPlugin.HELP_DATA_KEY, value);
}
private void setBaseTocs(String value) {
- InstanceScope instanceScope = new InstanceScope();
- IEclipsePreferences prefs = instanceScope.getNode(HelpPlugin.PLUGIN_ID);
+ IEclipsePreferences prefs = InstanceScope.INSTANCE.getNode(HelpPlugin.PLUGIN_ID);
prefs.put(BASE_TOCS, value);
}
diff --git a/org.eclipse.ua.tests/help/org/eclipse/ua/tests/help/webapp/RestrictedTopicParameter.java b/org.eclipse.ua.tests/help/org/eclipse/ua/tests/help/webapp/RestrictedTopicParameter.java
index d4eb6ce83..a4390aac9 100644
--- a/org.eclipse.ua.tests/help/org/eclipse/ua/tests/help/webapp/RestrictedTopicParameter.java
+++ b/org.eclipse.ua.tests/help/org/eclipse/ua/tests/help/webapp/RestrictedTopicParameter.java
@@ -1,5 +1,5 @@
/*******************************************************************************
- * Copyright (c) 2008, 2010 IBM Corporation and others.
+ * Copyright (c) 2008, 2011 IBM Corporation 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
@@ -43,8 +43,7 @@ public class RestrictedTopicParameter extends TestCase {
}
private void setRestrictTopic(boolean isRestrict) {
- InstanceScope instanceScope = new InstanceScope();
- IEclipsePreferences pref = instanceScope.getNode(HelpBasePlugin.PLUGIN_ID);
+ IEclipsePreferences pref = InstanceScope.INSTANCE.getNode(HelpBasePlugin.PLUGIN_ID);
pref.putBoolean(RESTRICT_TOPIC, isRestrict);
}

Back to the top