diff options
author | Marc Khouzam | 2012-02-21 19:14:19 +0000 |
---|---|---|
committer | Marc Khouzam | 2012-03-06 14:23:34 +0000 |
commit | 49c5be791f23eb89f6db1ac86d8519fec0183f42 (patch) | |
tree | 5724ba271c180ffaf461c1b420282f39276d879f /debug/org.eclipse.cdt.debug.ui | |
parent | 23a8adbdb7b4aa5a80d7d0cbd770efb1022b7b8c (diff) | |
download | org.eclipse.cdt-49c5be791f23eb89f6db1ac86d8519fec0183f42.tar.gz org.eclipse.cdt-49c5be791f23eb89f6db1ac86d8519fec0183f42.tar.xz org.eclipse.cdt-49c5be791f23eb89f6db1ac86d8519fec0183f42.zip |
Bug 370462: Improving the debug preferences - add support for different charsets and unify DSF and CDI debug preferences. Update to number format changes to avoid API breakage.
Diffstat (limited to 'debug/org.eclipse.cdt.debug.ui')
3 files changed, 15 insertions, 14 deletions
diff --git a/debug/org.eclipse.cdt.debug.ui/plugin.properties b/debug/org.eclipse.cdt.debug.ui/plugin.properties index c60a7ff9ee3..15a35463bcd 100644 --- a/debug/org.eclipse.cdt.debug.ui/plugin.properties +++ b/debug/org.eclipse.cdt.debug.ui/plugin.properties @@ -68,7 +68,7 @@ RemoveAllGlobalsAction.tooltip=Remove All Global Variables CVariableFormatMenu.label=Format HexVariableFormatAction.label=Hexadecimal DecVariableFormatAction.label=Decimal -NaturalVariableFormatAction.label=Natural +NaturalVariableFormatAction.label=Default BinaryVariableFormatAction.label=Binary CDebugActionGroup.name=C/C++ Debug diff --git a/debug/org.eclipse.cdt.debug.ui/src/org/eclipse/cdt/debug/internal/ui/actions/NumberFormatsContribution.java b/debug/org.eclipse.cdt.debug.ui/src/org/eclipse/cdt/debug/internal/ui/actions/NumberFormatsContribution.java index 36b018bc6ce..1569d6f0405 100644 --- a/debug/org.eclipse.cdt.debug.ui/src/org/eclipse/cdt/debug/internal/ui/actions/NumberFormatsContribution.java +++ b/debug/org.eclipse.cdt.debug.ui/src/org/eclipse/cdt/debug/internal/ui/actions/NumberFormatsContribution.java @@ -1,5 +1,5 @@ /******************************************************************************* - * Copyright (c) 2009 QNX Software Systems and others. + * Copyright (c) 2009, 2012 QNX Software Systems 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 @@ -7,6 +7,7 @@ * * Contributors: * QNX Software Systems - Initial API and implementation + * Marc Khouzam (Ericsson) - Support for octal number format (bug 370462) *******************************************************************************/ package org.eclipse.cdt.debug.internal.ui.actions; @@ -40,10 +41,10 @@ public class NumberFormatsContribution extends CompoundContributionItem implemen private static final Map<CVariableFormat, String> FORMATS = new LinkedHashMap<CVariableFormat, String>(); static { - FORMATS.put(CVariableFormat.NATURAL, "Natural"); + FORMATS.put(CVariableFormat.NATURAL, "Default"); FORMATS.put(CVariableFormat.DECIMAL, "Decimal"); FORMATS.put(CVariableFormat.HEXADECIMAL, "Hexadecimal"); - //FORMATS.put(CVariableFormat.OCTAL, "Octal"); + FORMATS.put(CVariableFormat.OCTAL, "Octal"); FORMATS.put(CVariableFormat.BINARY, "Binary"); } diff --git a/debug/org.eclipse.cdt.debug.ui/src/org/eclipse/cdt/debug/internal/ui/preferences/CDebugPreferencePage.java b/debug/org.eclipse.cdt.debug.ui/src/org/eclipse/cdt/debug/internal/ui/preferences/CDebugPreferencePage.java index 1960ddd60a5..a58f8e28671 100644 --- a/debug/org.eclipse.cdt.debug.ui/src/org/eclipse/cdt/debug/internal/ui/preferences/CDebugPreferencePage.java +++ b/debug/org.eclipse.cdt.debug.ui/src/org/eclipse/cdt/debug/internal/ui/preferences/CDebugPreferencePage.java @@ -180,18 +180,18 @@ public class CDebugPreferencePage extends PreferencePage implements IWorkbenchPr // Charset editors PreferenceStore ps = new PreferenceStore(); - ps.setDefault(ICDebugConstants.PREF_CHARSET, CDebugCorePlugin.getDefault().getPluginPreferences().getDefaultString(ICDebugConstants.PREF_CHARSET)); - ps.setValue(ICDebugConstants.PREF_CHARSET, CDebugCorePlugin.getDefault().getPluginPreferences().getString(ICDebugConstants.PREF_CHARSET)); + ps.setDefault(ICDebugConstants.PREF_DEBUG_CHARSET, CDebugCorePlugin.getDefault().getPluginPreferences().getDefaultString(ICDebugConstants.PREF_DEBUG_CHARSET)); + ps.setValue(ICDebugConstants.PREF_DEBUG_CHARSET, CDebugCorePlugin.getDefault().getPluginPreferences().getString(ICDebugConstants.PREF_DEBUG_CHARSET)); fCharsetEditor.setPreferenceStore(ps); fCharsetEditor.load(); - if (CDebugCorePlugin.getDefault().getPluginPreferences().isDefault(ICDebugConstants.PREF_CHARSET)) + if (CDebugCorePlugin.getDefault().getPluginPreferences().isDefault(ICDebugConstants.PREF_DEBUG_CHARSET)) fCharsetEditor.loadDefault(); - ps.setDefault(ICDebugConstants.PREF_WIDE_CHARSET, CDebugCorePlugin.getDefault().getPluginPreferences().getDefaultString(ICDebugConstants.PREF_WIDE_CHARSET)); - ps.setValue(ICDebugConstants.PREF_WIDE_CHARSET, CDebugCorePlugin.getDefault().getPluginPreferences().getString(ICDebugConstants.PREF_WIDE_CHARSET)); + ps.setDefault(ICDebugConstants.PREF_DEBUG_WIDE_CHARSET, CDebugCorePlugin.getDefault().getPluginPreferences().getDefaultString(ICDebugConstants.PREF_DEBUG_WIDE_CHARSET)); + ps.setValue(ICDebugConstants.PREF_DEBUG_WIDE_CHARSET, CDebugCorePlugin.getDefault().getPluginPreferences().getString(ICDebugConstants.PREF_DEBUG_WIDE_CHARSET)); fWideCharsetEditor.setPreferenceStore(ps); fWideCharsetEditor.load(); - if (CDebugCorePlugin.getDefault().getPluginPreferences().isDefault(ICDebugConstants.PREF_WIDE_CHARSET)) + if (CDebugCorePlugin.getDefault().getPluginPreferences().isDefault(ICDebugConstants.PREF_DEBUG_WIDE_CHARSET)) fWideCharsetEditor.loadDefault(); // Others @@ -251,12 +251,12 @@ public class CDebugPreferencePage extends PreferencePage implements IWorkbenchPr // Create charset editor Composite charsetComposite = ControlFactory.createComposite(formatComposite, 1); - fCharsetEditor = new EncodingFieldEditor(ICDebugConstants.PREF_CHARSET, "", PreferenceMessages.getString( "CDebugPreferencePage.18" ), charsetComposite); //$NON-NLS-1$ //$NON-NLS-2$ + fCharsetEditor = new EncodingFieldEditor(ICDebugConstants.PREF_DEBUG_CHARSET, "", PreferenceMessages.getString( "CDebugPreferencePage.18" ), charsetComposite); //$NON-NLS-1$ //$NON-NLS-2$ fCharsetEditor.setPropertyChangeListener(getPropertyChangeListener()); // Create wide charset editor Composite wideCharsetComposite = ControlFactory.createComposite(formatComposite, 1); - fWideCharsetEditor = new EncodingFieldEditor(ICDebugConstants.PREF_WIDE_CHARSET, "", PreferenceMessages.getString( "CDebugPreferencePage.16" ), wideCharsetComposite); //$NON-NLS-1$ //$NON-NLS-2$ + fWideCharsetEditor = new EncodingFieldEditor(ICDebugConstants.PREF_DEBUG_WIDE_CHARSET, "", PreferenceMessages.getString( "CDebugPreferencePage.16" ), wideCharsetComposite); //$NON-NLS-1$ //$NON-NLS-2$ fWideCharsetEditor.setPropertyChangeListener(getPropertyChangeListener()); } @@ -355,10 +355,10 @@ public class CDebugPreferencePage extends PreferencePage implements IWorkbenchPr CDebugCorePlugin.getDefault().getPluginPreferences().setValue( ICDebugConstants.PREF_DEFAULT_REGISTER_FORMAT, getFormatId( fRegisterFormatCombo.getSelectionIndex() ) ); fCharsetEditor.store(); - CDebugCorePlugin.getDefault().getPluginPreferences().setValue(ICDebugConstants.PREF_CHARSET, fCharsetEditor.getPreferenceStore().getString(ICDebugConstants.PREF_CHARSET)); + CDebugCorePlugin.getDefault().getPluginPreferences().setValue(ICDebugConstants.PREF_DEBUG_CHARSET, fCharsetEditor.getPreferenceStore().getString(ICDebugConstants.PREF_DEBUG_CHARSET)); fWideCharsetEditor.store(); - CDebugCorePlugin.getDefault().getPluginPreferences().setValue(ICDebugConstants.PREF_WIDE_CHARSET, fWideCharsetEditor.getPreferenceStore().getString(ICDebugConstants.PREF_WIDE_CHARSET)); + CDebugCorePlugin.getDefault().getPluginPreferences().setValue(ICDebugConstants.PREF_DEBUG_WIDE_CHARSET, fWideCharsetEditor.getPreferenceStore().getString(ICDebugConstants.PREF_DEBUG_WIDE_CHARSET)); CCorePlugin.getDefault().getPluginPreferences().setValue( CCorePreferenceConstants.SHOW_SOURCE_FILES_IN_BINARIES, fShowBinarySourceFilesButton.getSelection() ); } |