Skip to main content
aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorCurtis Windatt2009-09-02 15:43:13 +0000
committerCurtis Windatt2009-09-02 15:43:13 +0000
commit41d00a6636352205da39b5597e55fb43db282026 (patch)
tree7637f90b67241c642ae008a2f9bf0a4575c21eeb /org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/preferences
parent990767a0adfa6e9b75b9df76f532234b4c543373 (diff)
downloadeclipse.platform.debug-41d00a6636352205da39b5597e55fb43db282026.tar.gz
eclipse.platform.debug-41d00a6636352205da39b5597e55fb43db282026.tar.xz
eclipse.platform.debug-41d00a6636352205da39b5597e55fb43db282026.zip
Bug 288299: Debug core should not be using the deprecated preferences code
https://bugs.eclipse.org/bugs/show_bug.cgi?id=288299
Diffstat (limited to 'org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/preferences')
-rw-r--r--org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/preferences/LaunchConfigurationsPreferencePage.java13
1 files changed, 8 insertions, 5 deletions
diff --git a/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/preferences/LaunchConfigurationsPreferencePage.java b/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/preferences/LaunchConfigurationsPreferencePage.java
index f40d84da7..b0850b8eb 100644
--- a/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/preferences/LaunchConfigurationsPreferencePage.java
+++ b/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/preferences/LaunchConfigurationsPreferencePage.java
@@ -1,5 +1,5 @@
/*******************************************************************************
- * Copyright (c) 2004, 2008 IBM Corporation and others.
+ * Copyright (c) 2004, 2009 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
@@ -14,10 +14,12 @@ import java.util.ArrayList;
import java.util.List;
import org.eclipse.core.runtime.CoreException;
+import org.eclipse.core.runtime.Platform;
import org.eclipse.debug.core.DebugPlugin;
import org.eclipse.debug.core.ILaunchConfiguration;
import org.eclipse.debug.core.ILaunchConfigurationType;
import org.eclipse.debug.core.ILaunchManager;
+import org.eclipse.debug.internal.core.Preferences;
import org.eclipse.debug.internal.core.IInternalDebugCoreConstants;
import org.eclipse.debug.internal.core.LaunchManager;
import org.eclipse.debug.internal.ui.AbstractDebugCheckboxSelectionDialog;
@@ -336,8 +338,9 @@ public class LaunchConfigurationsPreferencePage extends PreferencePage implement
editor.setPreferenceStore(getPreferenceStore());
editor.load();
}
- fDeleteConfigs.setSelection(DebugPlugin.getDefault().getPluginPreferences().getBoolean(
- LaunchManager.PREF_DELETE_CONFIGS_ON_PROJECT_DELETE));
+ fDeleteConfigs.setSelection(
+ Platform.getPreferencesService().getBoolean(DebugPlugin.getUniqueIdentifier(),
+ LaunchManager.PREF_DELETE_CONFIGS_ON_PROJECT_DELETE, true, null));
//restore the tables' checked state
String[] types = getPreferenceStore().getString(IInternalDebugUIConstants.PREF_FILTER_TYPE_LIST).split("\\,"); //$NON-NLS-1$
TableItem[] items = fTable.getItems();
@@ -356,6 +359,7 @@ public class LaunchConfigurationsPreferencePage extends PreferencePage implement
* @see org.eclipse.jface.preference.PreferencePage#performDefaults()
*/
protected void performDefaults() {
+ fDeleteConfigs.setSelection(Preferences.getDefaultBoolean(DebugPlugin.getUniqueIdentifier(), LaunchManager.PREF_DELETE_CONFIGS_ON_PROJECT_DELETE, true));
FieldEditor editor = null;
for(int i = 0; i < fFieldEditors.size(); i++) {
editor = (FieldEditor)fFieldEditors.get(i);
@@ -375,8 +379,7 @@ public class LaunchConfigurationsPreferencePage extends PreferencePage implement
for(int i = 0; i < fFieldEditors.size(); i++) {
((FieldEditor)fFieldEditors.get(i)).store();
}
- DebugPlugin.getDefault().getPluginPreferences().setValue(
- LaunchManager.PREF_DELETE_CONFIGS_ON_PROJECT_DELETE, fDeleteConfigs.getSelection());
+ Preferences.setBoolean(DebugPlugin.getUniqueIdentifier(), LaunchManager.PREF_DELETE_CONFIGS_ON_PROJECT_DELETE, fDeleteConfigs.getSelection(), null);
//save table
String types = IInternalDebugCoreConstants.EMPTY_STRING;
TableItem[] items = fTable.getItems();

Back to the top