Skip to main content
aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAlexander Kurtakov2013-11-15 07:10:23 -0500
committerAlexander Kurtakov2013-11-15 07:10:23 -0500
commit8416a6a1ddda58fb41169429fa85abf6c7275cfb (patch)
tree5cdc7991344cde9ee54cc87a4822f34b7bb88404 /bundles/org.eclipse.equinox.p2.ui.sdk.scheduler
parentda737983183dff20ac53e3c0b91fcdae4bd700b8 (diff)
downloadrt.equinox.p2-8416a6a1ddda58fb41169429fa85abf6c7275cfb.tar.gz
rt.equinox.p2-8416a6a1ddda58fb41169429fa85abf6c7275cfb.tar.xz
rt.equinox.p2-8416a6a1ddda58fb41169429fa85abf6c7275cfb.zip
Bug 421824 - Use *Scope.INSTANCE
*Scope constructors are deprecated and using the INSTANCE static field is recommended. Change-Id: I56de8e03818ef4abe45c9b7097cbf5ae1d92ce14 Signed-off-by: Alexander Kurtakov <akurtako@redhat.com>
Diffstat (limited to 'bundles/org.eclipse.equinox.p2.ui.sdk.scheduler')
-rw-r--r--bundles/org.eclipse.equinox.p2.ui.sdk.scheduler/src/org/eclipse/equinox/internal/p2/ui/sdk/scheduler/PreferenceInitializer.java4
1 files changed, 2 insertions, 2 deletions
diff --git a/bundles/org.eclipse.equinox.p2.ui.sdk.scheduler/src/org/eclipse/equinox/internal/p2/ui/sdk/scheduler/PreferenceInitializer.java b/bundles/org.eclipse.equinox.p2.ui.sdk.scheduler/src/org/eclipse/equinox/internal/p2/ui/sdk/scheduler/PreferenceInitializer.java
index eeca5763a..4cc0bea98 100644
--- a/bundles/org.eclipse.equinox.p2.ui.sdk.scheduler/src/org/eclipse/equinox/internal/p2/ui/sdk/scheduler/PreferenceInitializer.java
+++ b/bundles/org.eclipse.equinox.p2.ui.sdk.scheduler/src/org/eclipse/equinox/internal/p2/ui/sdk/scheduler/PreferenceInitializer.java
@@ -41,7 +41,7 @@ public class PreferenceInitializer extends AbstractPreferenceInitializer {
try {
if (pref.keys().length == 0) {
// migrate preferences from instance scope to profile scope
- Preferences oldPref = new InstanceScope().getNode(AutomaticUpdatePlugin.PLUGIN_ID);
+ Preferences oldPref = InstanceScope.INSTANCE.getNode(AutomaticUpdatePlugin.PLUGIN_ID);
String[] keys = oldPref.keys();
for (int i = 0; i < keys.length; i++)
pref.put(keys[i], oldPref.get(keys[i], "")); //$NON-NLS-1$
@@ -163,7 +163,7 @@ public class PreferenceInitializer extends AbstractPreferenceInitializer {
public void initializeDefaultPreferences() {
// initialize the default scope
- Preferences node = new DefaultScope().getNode(AutomaticUpdatePlugin.PLUGIN_ID);
+ Preferences node = DefaultScope.INSTANCE.getNode(AutomaticUpdatePlugin.PLUGIN_ID);
node.putBoolean(PreferenceConstants.PREF_AUTO_UPDATE_ENABLED, false);
node.put(PreferenceConstants.PREF_AUTO_UPDATE_SCHEDULE, PreferenceConstants.PREF_UPDATE_ON_STARTUP);
node.putBoolean(PreferenceConstants.PREF_DOWNLOAD_ONLY, false);

Back to the top