Skip to main content
aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAlexander Kurtakov2013-11-15 12:10:23 +0000
committerAlexander Kurtakov2013-11-15 12:10:23 +0000
commit8416a6a1ddda58fb41169429fa85abf6c7275cfb (patch)
tree5cdc7991344cde9ee54cc87a4822f34b7bb88404 /bundles/org.eclipse.equinox.p2.ui.sdk
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')
-rw-r--r--bundles/org.eclipse.equinox.p2.ui.sdk/src/org/eclipse/equinox/internal/p2/ui/sdk/prefs/PreferenceInitializer.java4
-rw-r--r--bundles/org.eclipse.equinox.p2.ui.sdk/src/org/eclipse/equinox/internal/p2/ui/sdk/prefs/ProvisioningPreferencePage.java2
2 files changed, 3 insertions, 3 deletions
diff --git a/bundles/org.eclipse.equinox.p2.ui.sdk/src/org/eclipse/equinox/internal/p2/ui/sdk/prefs/PreferenceInitializer.java b/bundles/org.eclipse.equinox.p2.ui.sdk/src/org/eclipse/equinox/internal/p2/ui/sdk/prefs/PreferenceInitializer.java
index 9a3ce6ed9..bf3177f7a 100644
--- a/bundles/org.eclipse.equinox.p2.ui.sdk/src/org/eclipse/equinox/internal/p2/ui/sdk/prefs/PreferenceInitializer.java
+++ b/bundles/org.eclipse.equinox.p2.ui.sdk/src/org/eclipse/equinox/internal/p2/ui/sdk/prefs/PreferenceInitializer.java
@@ -35,7 +35,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(ProvSDKUIActivator.PLUGIN_ID);
+ Preferences oldPref = InstanceScope.INSTANCE.getNode(ProvSDKUIActivator.PLUGIN_ID);
// don't migrate everything. Some of the preferences moved to
// another bundle.
pref.put(PreferenceConstants.PREF_OPEN_WIZARD_ON_ERROR_PLAN, oldPref.get(PreferenceConstants.PREF_OPEN_WIZARD_ON_ERROR_PLAN, MessageDialogWithToggle.PROMPT));
@@ -56,7 +56,7 @@ public class PreferenceInitializer extends AbstractPreferenceInitializer {
* @see org.eclipse.core.runtime.preferences.AbstractPreferenceInitializer#initializeDefaultPreferences()
*/
public void initializeDefaultPreferences() {
- Preferences node = new DefaultScope().getNode("org.eclipse.equinox.p2.ui.sdk"); //$NON-NLS-1$
+ Preferences node = DefaultScope.INSTANCE.getNode("org.eclipse.equinox.p2.ui.sdk"); //$NON-NLS-1$
// default values
node.putBoolean(PreferenceConstants.PREF_SHOW_LATEST_VERSION, true);
node.put(PreferenceConstants.PREF_OPEN_WIZARD_ON_ERROR_PLAN, MessageDialogWithToggle.PROMPT);
diff --git a/bundles/org.eclipse.equinox.p2.ui.sdk/src/org/eclipse/equinox/internal/p2/ui/sdk/prefs/ProvisioningPreferencePage.java b/bundles/org.eclipse.equinox.p2.ui.sdk/src/org/eclipse/equinox/internal/p2/ui/sdk/prefs/ProvisioningPreferencePage.java
index 7a49f117f..7f6d1566e 100644
--- a/bundles/org.eclipse.equinox.p2.ui.sdk/src/org/eclipse/equinox/internal/p2/ui/sdk/prefs/ProvisioningPreferencePage.java
+++ b/bundles/org.eclipse.equinox.p2.ui.sdk/src/org/eclipse/equinox/internal/p2/ui/sdk/prefs/ProvisioningPreferencePage.java
@@ -121,7 +121,7 @@ public class ProvisioningPreferencePage extends PreferencePage implements IWorkb
protected void performDefaults() {
super.performDefaults();
- Preferences pref = new DefaultScope().getNode(ProvSDKUIActivator.PLUGIN_ID);
+ Preferences pref = DefaultScope.INSTANCE.getNode(ProvSDKUIActivator.PLUGIN_ID);
showLatestRadio.setSelection(pref.getBoolean(PreferenceConstants.PREF_SHOW_LATEST_VERSION, false));
showAllRadio.setSelection(!pref.getBoolean(PreferenceConstants.PREF_SHOW_LATEST_VERSION, false));
String openWizard = pref.get(PreferenceConstants.PREF_OPEN_WIZARD_ON_ERROR_PLAN, ""); //$NON-NLS-1$

Back to the top