1
0
Fork 0
mirror of https://github.com/eclipse-cdt/cdt synced 2025-08-09 17:25:38 +02:00

Added default preferences to the C/C++ Debug preference page.

Removed the preference page of the Shared Libraries views.
This commit is contained in:
Mikhail Khodjaiants 2004-04-01 00:18:58 +00:00
parent 4963455c1d
commit 4eb55adeda
6 changed files with 62 additions and 178 deletions

View file

@ -1,3 +1,12 @@
2004-03-31 Mikhail Khodjaiants
Added default preferences to the C/C++ Debug preference page.
Removed the preference page of the Shared Libraries views.
* SharedLibrariesPreferencePage.java - removed
* CDebugPreferencePage.java
* CDebugUIPluginResources.properties
* CDebugUIPlugin.java
* plugin.xml
2004-03-31 Mikhail Khodjaiants
The Registers view has been contibuted and moved to the Eclipse platform.
* org.eclipse.cdt.debug.ui/src/org/eclipse/cdt/debug/internal/ui/views/registers/* - removed

View file

@ -69,24 +69,24 @@
targetID="org.eclipse.debug.ui.DebugPerspective">
<view
relative="org.eclipse.debug.ui.VariableView"
id="org.eclipse.cdt.debug.ui.MemoryView"
relationship="stack">
relationship="stack"
id="org.eclipse.cdt.debug.ui.MemoryView">
</view>
<viewShortcut
id="org.eclipse.cdt.debug.ui.MemoryView">
</viewShortcut>
<view
relative="org.eclipse.debug.ui.VariableView"
id="org.eclipse.cdt.debug.ui.SharedLibrariesView"
relationship="stack">
relationship="stack"
id="org.eclipse.cdt.debug.ui.SharedLibrariesView">
</view>
<viewShortcut
id="org.eclipse.cdt.debug.ui.SharedLibrariesView">
</viewShortcut>
<view
relative="org.eclipse.debug.ui.VariableView"
id="org.eclipse.cdt.debug.ui.SignalsView"
relationship="stack">
relationship="stack"
id="org.eclipse.cdt.debug.ui.SignalsView">
</view>
<viewShortcut
id="org.eclipse.cdt.debug.ui.SignalsView">
@ -101,12 +101,6 @@
</extension>
<extension
point="org.eclipse.ui.preferencePages">
<page
name="%SharedLibrariesPreferencePage.name"
category="org.eclipse.debug.ui.DebugPreferencePage"
class="org.eclipse.cdt.debug.internal.ui.preferences.SharedLibrariesViewPreferencePage"
id="org.eclipse.cdt.debug.ui.SharedLibrariesViewPreferencePage">
</page>
<page
name="%MemoryPreferencePage.name"
category="org.eclipse.debug.ui.DebugPreferencePage"
@ -298,8 +292,8 @@
</action>
<action
label="%ShowFullPathsAction.label"
icon="icons/full/clcl16/show_paths.gif"
style="toggle"
icon="icons/full/clcl16/show_paths.gif"
helpContextId="show_full_paths_action_context"
class="org.eclipse.cdt.debug.internal.ui.actions.ShowFullPathsAction"
menubarPath="renderGroup"
@ -313,8 +307,8 @@
</action>
<action
label="%SwitchToDisassemblyAction.label"
icon="icons/full/clcl16/disassembly.gif"
style="toggle"
icon="icons/full/clcl16/disassembly.gif"
helpContextId="switch_to_disassembly_action_context"
class="org.eclipse.cdt.debug.internal.ui.actions.SwitchToDisassemblyActionDelegate"
menubarPath="renderGroup"
@ -329,8 +323,8 @@
</action>
<action
label="%ShowDebuggerConsoleAction.label"
icon="icons/full/clcl16/debugger_console.gif"
style="toggle"
icon="icons/full/clcl16/debugger_console.gif"
helpContextId="show_debugger_console_action_context"
class="org.eclipse.cdt.debug.internal.ui.actions.DebuggerConsoleActionDelegate"
menubarPath="renderGroup"
@ -468,8 +462,8 @@
id="org.eclipse.cdt.debug.ui.breakpointview.popupMenu">
<action
label="%ShowFullPathsAction.label"
icon="icons/full/clcl16/show_paths.gif"
style="toggle"
icon="icons/full/clcl16/show_paths.gif"
helpContextId="show_full_paths_action_context"
class="org.eclipse.cdt.debug.internal.ui.actions.ShowFullPathsAction"
menubarPath="renderGroup"
@ -744,8 +738,8 @@
id="org.eclipse.cdt.debug.ui.SharedLibrariesViewPopupActions">
<action
label="%ShowFullPathsAction.label"
icon="icons/full/clcl16/show_paths.gif"
style="toggle"
icon="icons/full/clcl16/show_paths.gif"
helpContextId="show_full_paths_action_context"
class="org.eclipse.cdt.debug.internal.ui.actions.ShowFullPathsAction"
menubarPath="renderGroup"
@ -765,8 +759,8 @@
label="%LoadSymbolsAction.label"
icon="icons/full/clcl16/load_symbols_co.gif"
helpContextId="load_symbols_action_context"
tooltip="%LoadSymbolsAction.tooltip"
class="org.eclipse.cdt.debug.internal.ui.actions.LoadSymbolsActionDelegate"
tooltip="%LoadSymbolsAction.tooltip"
menubarPath="sharedLibrariesGroup"
enablesFor="1"
id="org.eclipse.cdt.debug.internal.ui.actions.LoadSymbolsActionDelegate">
@ -785,8 +779,8 @@
label="%SignalAction.label"
icon="icons/full/clcl16/signal_co.gif"
helpContextId="signal_action_context"
tooltip="%SignalAction.tooltip"
class="org.eclipse.cdt.debug.internal.ui.actions.SignalActionDelegate"
tooltip="%SignalAction.tooltip"
menubarPath="additions"
enablesFor="1"
id="org.eclipse.cdt.debug.internal.ui.actions.SignalActionDelegate">
@ -823,8 +817,8 @@
<action
label="%RestoreDefaultTypeAction.label"
helpContextId="restore_default_type_action_context"
class="org.eclipse.cdt.debug.internal.ui.actions.RestoreDefaultTypeActionDelegate"
tooltip="%RestoreDefaultTypeAction.tooltip"
class="org.eclipse.cdt.debug.internal.ui.actions.RestoreDefaultTypeActionDelegate"
menubarPath="additions"
enablesFor="1"
id="org.eclipse.cdt.debug.internal.ui.actions.RestoreDefaultTypeActionDelegate">
@ -839,8 +833,8 @@
label="%CastToTypeAction.label"
icon="icons/full/clcl16/casttotype_co.gif"
helpContextId="cast_to_type_action_context"
class="org.eclipse.cdt.debug.internal.ui.actions.CastToTypeActionDelegate"
tooltip="%CastToTypeAction.tooltip"
class="org.eclipse.cdt.debug.internal.ui.actions.CastToTypeActionDelegate"
menubarPath="additions"
enablesFor="1"
id="org.eclipse.cdt.debug.internal.ui.actions.CastToTypeActionDelegate">
@ -855,8 +849,8 @@
label="%CastToArrayAction.label"
icon="icons/full/clcl16/showasarray_co.gif"
helpContextId="cast_to_array_action_context"
class="org.eclipse.cdt.debug.internal.ui.actions.CastToArrayActionDelegate"
tooltip="%CastToArrayAction.tooltip"
class="org.eclipse.cdt.debug.internal.ui.actions.CastToArrayActionDelegate"
menubarPath="additions"
enablesFor="1"
id="org.eclipse.cdt.debug.internal.ui.actions.CastToArrayActionDelegate">
@ -875,8 +869,8 @@
label="%ManageFunctionBreakpointAction.label"
icon="icons/full/obj16/funbrkp_obj.gif"
helpContextId="manage_function_breakpoint_action_context"
class="org.eclipse.cdt.debug.internal.ui.actions.ManageFunctionBreakpointActionDelegate"
tooltip="%ManageFunctionBreakpointAction.tooltip"
class="org.eclipse.cdt.debug.internal.ui.actions.ManageFunctionBreakpointActionDelegate"
menubarPath="additions"
enablesFor="1"
id="org.eclipse.cdt.debug.internal.ui.actions.ManageFunctionBreakpointActionDelegate">
@ -895,8 +889,8 @@
label="%DisableVariablesAction.label"
icon="icons/full/clcl16/disabled_co.gif"
helpContextId="disable_variables_action_context"
class="org.eclipse.cdt.debug.internal.ui.actions.DisableVariablesActionDelegate"
tooltip="%DisableVariablesAction.tooltip"
class="org.eclipse.cdt.debug.internal.ui.actions.DisableVariablesActionDelegate"
menubarPath="variableGroup"
enablesFor="2+"
id="org.eclipse.cdt.debug.internal.ui.actions.DisableVariablesActionDelegate">
@ -908,8 +902,8 @@
label="%EnableVariablesAction.label"
icon="icons/full/clcl16/enabled_co.gif"
helpContextId="enable_variables_action_context"
class="org.eclipse.cdt.debug.internal.ui.actions.EnableVariablesActionDelegate"
tooltip="%EnableVariablesAction.tooltip"
class="org.eclipse.cdt.debug.internal.ui.actions.EnableVariablesActionDelegate"
menubarPath="variableGroup"
enablesFor="2+"
id="org.eclipse.cdt.debug.internal.ui.actions.EnableVariablesActionDelegate">
@ -932,8 +926,8 @@
disabledIcon="icons/full/dlcl16/restart.gif"
enablesFor="1"
icon="icons/full/elcl16/restart.gif"
label="%RestartAction.label"
helpContextId="restart_action_context"
label="%RestartAction.label"
tooltip="%RestartAction.tooltip">
<enablement>
<pluginState
@ -950,8 +944,8 @@
class="org.eclipse.cdt.debug.internal.ui.actions.ShowFullPathsAction"
disabledIcon="icons/full/dlcl16/show_paths.gif"
icon="icons/full/elcl16/show_parents.gif"
label="%ShowFullPathsAction.label"
helpContextId="show_full_paths_action_context"
label="%ShowFullPathsAction.label"
tooltip="%ShowFullPathsAction.tooltip">
<enablement>
<pluginState
@ -969,8 +963,8 @@
disabledIcon="icons/full/dlcl16/disassembly.gif"
enablesFor="1"
icon="icons/full/elcl16/disassembly.gif"
label="%SwitchToDisassemblyAction.label"
helpContextId="switch_to_disassembly_action_context"
label="%SwitchToDisassemblyAction.label"
tooltip="%SwitchToDisassemblyAction.tooltip">
<enablement>
<pluginState
@ -988,8 +982,8 @@
disabledIcon="icons/full/dlcl16/debugger_console.gif"
enablesFor="1"
icon="icons/full/elcl16/debugger_console.gif"
label="%ShowDebuggerConsoleAction.label"
helpContextId="show_debugger_console_action_context"
label="%ShowDebuggerConsoleAction.label"
tooltip="%ShowDebuggerConsoleAction.tooltip">
<enablement>
<pluginState
@ -1010,8 +1004,8 @@
class="org.eclipse.cdt.debug.internal.ui.actions.ShowFullPathsAction"
disabledIcon="icons/full/dlcl16/show_paths.gif"
icon="icons/full/elcl16/show_parents.gif"
label="%ShowFullPathsAction.label"
helpContextId="show_full_paths_action_context"
label="%ShowFullPathsAction.label"
tooltip="%ShowFullPathsAction.tooltip">
<enablement>
<pluginState
@ -1032,8 +1026,8 @@
disabledIcon="icons/full/dlcl16/watch_globals.gif"
enablesFor="1"
icon="icons/full/elcl16/watch_globals.gif"
label="%AddGlobalsAction.label"
helpContextId="add_globals_action_context"
label="%AddGlobalsAction.label"
tooltip="%AddGlobalsAction.tooltip">
<enablement>
<pluginState
@ -1054,8 +1048,8 @@
class="org.eclipse.cdt.debug.internal.ui.actions.ShowFullPathsAction"
disabledIcon="icons/full/dlcl16/show_paths.gif"
icon="icons/full/elcl16/show_parents.gif"
label="%ShowFullPathsAction.label"
helpContextId="show_full_paths_action_context"
label="%ShowFullPathsAction.label"
tooltip="%ShowFullPathsAction.tooltip">
<enablement>
<pluginState
@ -1145,20 +1139,20 @@
<extension
point="org.eclipse.debug.core.statusHandlers">
<statusHandler
code="10000"
plugin="org.eclipse.cdt.debug.core"
code="10000"
class="org.eclipse.cdt.debug.internal.ui.QuestionStatusHandler"
id="org.eclipse.cdt.debug.internal.ui.QuestionStatusHandler">
</statusHandler>
<statusHandler
code="10001"
plugin="org.eclipse.cdt.debug.core"
code="10001"
class="org.eclipse.cdt.debug.internal.ui.InfoStatusHandler"
id="org.eclipse.cdt.debug.internal.ui.InfoStatusHandler">
</statusHandler>
<statusHandler
code="10002"
plugin="org.eclipse.cdt.debug.core"
code="10002"
class="org.eclipse.cdt.debug.internal.ui.ErrorStatusHandler"
id="org.eclipse.cdt.debug.internal.ui.ErrorStatusHandler">
</statusHandler>
@ -1221,16 +1215,16 @@
point="org.eclipse.ui.editors">
<editor
name="%DisassemblyEditor.name"
extensions="dasm"
icon="icons/full/obj16/disassembly_obj.gif"
extensions="dasm"
class="org.eclipse.cdt.debug.internal.ui.editors.DisassemblyEditor"
id="org.eclipse.cdt.debug.ui.DisassemblyEditor">
</editor>
<editor
name="%CDebugEditor.name"
icon="icons/full/obj16/filenotfound_obj.gif"
class="org.eclipse.cdt.debug.internal.ui.editors.CDebugEditor"
contributorClass="org.eclipse.cdt.internal.ui.editor.CEditorActionContributor"
class="org.eclipse.cdt.debug.internal.ui.editors.CDebugEditor"
id="org.eclipse.cdt.debug.ui.editor.CDebugEditor">
</editor>
</extension>
@ -1252,8 +1246,8 @@
<context
name="Debugging C/C++"
description="Debugging C/C++ Programs"
id="org.eclipse.cdt.debug.ui.debugging"
parentId="org.eclipse.debug.ui.debugging">
parentId="org.eclipse.debug.ui.debugging"
id="org.eclipse.cdt.debug.ui.debugging">
</context>
</extension>
<extension
@ -1267,23 +1261,23 @@
point="org.eclipse.debug.ui.contextViewBindings">
<contextViewBinding
viewId="org.eclipse.cdt.debug.ui.MemoryView"
autoClose="false"
contextId="org.eclipse.cdt.debug.ui.debugging">
contextId="org.eclipse.cdt.debug.ui.debugging"
autoClose="false">
</contextViewBinding>
<contextViewBinding
viewId="org.eclipse.cdt.debug.ui.SharedLibrariesView"
autoClose="false"
contextId="org.eclipse.cdt.debug.ui.debugging">
contextId="org.eclipse.cdt.debug.ui.debugging"
autoClose="false">
</contextViewBinding>
<contextViewBinding
viewId="org.eclipse.cdt.debug.ui.SignalsView"
autoClose="false"
contextId="org.eclipse.cdt.debug.ui.debugging">
contextId="org.eclipse.cdt.debug.ui.debugging"
autoClose="false">
</contextViewBinding>
<contextViewBinding
viewId="org.eclipse.debug.ui.RegistersView"
autoClose="false"
contextId="org.eclipse.cdt.debug.ui.debugging">
contextId="org.eclipse.cdt.debug.ui.debugging"
autoClose="false">
</contextViewBinding>
</extension>

View file

@ -52,6 +52,8 @@ public class CDebugPreferencePage extends PreferencePage implements IWorkbenchPr
{
// View setting widgets
private Button fPathsButton;
private Button fRefreshRegistersButton;
private Button fRefreshSolibsButton;
private Combo fVariableFormatCombo;
private Combo fExpressionFormatCombo;
private Combo fRegisterFormatCombo;
@ -150,8 +152,9 @@ public class CDebugPreferencePage extends PreferencePage implements IWorkbenchPr
private void setValues()
{
IPreferenceStore store = getPreferenceStore();
fPathsButton.setSelection( store.getBoolean( ICDebugPreferenceConstants.PREF_SHOW_FULL_PATHS ) );
fRefreshRegistersButton.setSelection( CDebugCorePlugin.getDefault().getPluginPreferences().getBoolean( ICDebugConstants.PREF_REGISTERS_AUTO_REFRESH ) );
fRefreshSolibsButton.setSelection( CDebugCorePlugin.getDefault().getPluginPreferences().getBoolean( ICDebugConstants.PREF_SHARED_LIBRARIES_AUTO_REFRESH ) );
fAutoDisassemblyButton.setSelection( CDebugCorePlugin.getDefault().getPluginPreferences().getBoolean( ICDebugConstants.PREF_AUTO_DISASSEMBLY ) );
getMaxNumberOfInstructionsText().setStringValue( new Integer( CDebugCorePlugin.getDefault().getPluginPreferences().getInt( ICDebugConstants.PREF_MAX_NUMBER_OF_INSTRUCTIONS ) ).toString() );
fVariableFormatCombo.select( getFormatIndex( CDebugCorePlugin.getDefault().getPluginPreferences().getInt( ICDebugConstants.PREF_DEFAULT_VARIABLE_FORMAT ) ) );
@ -205,6 +208,8 @@ public class CDebugPreferencePage extends PreferencePage implements IWorkbenchPr
{
Composite comp = createGroupComposite( parent, 1, CDebugUIPlugin.getResourceString("internal.ui.preferences.CDebugPreferencePage.Opened_view_default_settings") ); //$NON-NLS-1$
fPathsButton = createCheckButton( comp, CDebugUIPlugin.getResourceString("internal.ui.preferences.CDebugPreferencePage.pathsButton") ); //$NON-NLS-1$
fRefreshRegistersButton = createCheckButton( comp, CDebugUIPlugin.getResourceString( "internal.ui.preferences.CDebugPreferencePage.autoRefreshRegistersButton" ) ); //$NON-NLS-1$
fRefreshSolibsButton = createCheckButton( comp, CDebugUIPlugin.getResourceString( "internal.ui.preferences.CDebugPreferencePage.autoRefreshSolibsButton" ) ); //$NON-NLS-1$
Composite formatComposite = ControlFactory.createCompositeEx( comp, 2, 0 );
((GridLayout)formatComposite.getLayout()).makeColumnsEqualWidth = true;
fVariableFormatCombo = createComboBox( formatComposite, CDebugUIPlugin.getResourceString("internal.ui.preferences.CDebugPreferencePage.variableFormatCombo"), fFormatLabels, fFormatLabels[0] ); //$NON-NLS-1$
@ -355,6 +360,8 @@ public class CDebugPreferencePage extends PreferencePage implements IWorkbenchPr
{
IPreferenceStore store = getPreferenceStore();
store.setValue( ICDebugPreferenceConstants.PREF_SHOW_FULL_PATHS, fPathsButton.getSelection() );
CDebugCorePlugin.getDefault().getPluginPreferences().setValue( ICDebugConstants.PREF_REGISTERS_AUTO_REFRESH, fRefreshRegistersButton.getSelection() );
CDebugCorePlugin.getDefault().getPluginPreferences().setValue( ICDebugConstants.PREF_SHARED_LIBRARIES_AUTO_REFRESH, fRefreshSolibsButton.getSelection() );
CDebugCorePlugin.getDefault().getPluginPreferences().setValue( ICDebugConstants.PREF_AUTO_DISASSEMBLY, fAutoDisassemblyButton.getSelection() );
CDebugCorePlugin.getDefault().getPluginPreferences().setValue( ICDebugConstants.PREF_MAX_NUMBER_OF_INSTRUCTIONS, getMaxNumberOfInstructionsText().getIntValue() );
CDebugCorePlugin.getDefault().getPluginPreferences().setValue( ICDebugConstants.PREF_DEFAULT_VARIABLE_FORMAT, getFormatId( fVariableFormatCombo.getSelectionIndex() ) );
@ -376,6 +383,8 @@ public class CDebugPreferencePage extends PreferencePage implements IWorkbenchPr
{
IPreferenceStore store = getPreferenceStore();
fPathsButton.setSelection( store.getDefaultBoolean( ICDebugPreferenceConstants.PREF_SHOW_FULL_PATHS ) );
fRefreshRegistersButton.setSelection( CDebugCorePlugin.getDefault().getPluginPreferences().getDefaultBoolean( ICDebugConstants.PREF_REGISTERS_AUTO_REFRESH ) );
fRefreshSolibsButton.setSelection( CDebugCorePlugin.getDefault().getPluginPreferences().getDefaultBoolean( ICDebugConstants.PREF_SHARED_LIBRARIES_AUTO_REFRESH ) );
fAutoDisassemblyButton.setSelection( CDebugCorePlugin.getDefault().getPluginPreferences().getDefaultBoolean( ICDebugConstants.PREF_AUTO_DISASSEMBLY ) );
getMaxNumberOfInstructionsText().setStringValue( new Integer( CDebugCorePlugin.getDefault().getPluginPreferences().getDefaultInt( ICDebugConstants.PREF_MAX_NUMBER_OF_INSTRUCTIONS ) ).toString() );
fVariableFormatCombo.select( getFormatIndex( CDebugCorePlugin.getDefault().getPluginPreferences().getDefaultInt( ICDebugConstants.PREF_DEFAULT_VARIABLE_FORMAT ) ) );

View file

@ -1,125 +0,0 @@
/*
*(c) Copyright QNX Software Systems Ltd. 2002.
* All Rights Reserved.
*
*/
package org.eclipse.cdt.debug.internal.ui.preferences;
import org.eclipse.cdt.debug.core.CDebugCorePlugin;
import org.eclipse.cdt.debug.core.ICDebugConstants;
import org.eclipse.cdt.debug.internal.ui.ICDebugHelpContextIds;
import org.eclipse.cdt.debug.ui.CDebugUIPlugin;
import org.eclipse.cdt.utils.ui.controls.ControlFactory;
import org.eclipse.jface.preference.FieldEditorPreferencePage;
import org.eclipse.jface.preference.IPreferenceStore;
import org.eclipse.swt.SWT;
import org.eclipse.swt.layout.GridData;
import org.eclipse.swt.layout.GridLayout;
import org.eclipse.swt.widgets.Button;
import org.eclipse.swt.widgets.Composite;
import org.eclipse.swt.widgets.Label;
import org.eclipse.ui.IWorkbench;
import org.eclipse.ui.IWorkbenchPreferencePage;
import org.eclipse.ui.help.WorkbenchHelp;
/**
* Enter type comment.
*
* @since: Feb 7, 2003
*/
public class SharedLibrariesViewPreferencePage extends FieldEditorPreferencePage
implements IWorkbenchPreferencePage
{
private Button fAutoRefreshField = null;
/**
* Constructor for SharedLibrariesViewPreferencePage.
* @param style
*/
public SharedLibrariesViewPreferencePage()
{
super( GRID );
setDescription( CDebugUIPlugin.getResourceString("internal.ui.preferences.SharedLibrariesViewPreferencePage.Shared_Libraries_View_Settings") ); //$NON-NLS-1$
setPreferenceStore( CDebugUIPlugin.getDefault().getPreferenceStore() );
}
/* (non-Javadoc)
* @see org.eclipse.jface.preference.FieldEditorPreferencePage#createFieldEditors()
*/
protected void createFieldEditors()
{
fAutoRefreshField = ControlFactory.createCheckBox( getFieldEditorParent(), CDebugUIPlugin.getResourceString("internal.ui.preferences.SharedLibrariesViewPreferencePage.Auto-Refresh_by_default") ); //$NON-NLS-1$
fAutoRefreshField.setSelection( CDebugCorePlugin.getDefault().getPluginPreferences().getBoolean( ICDebugConstants.PREF_SHARED_LIBRARIES_AUTO_REFRESH ) );
}
/* (non-Javadoc)
* @see org.eclipse.ui.IWorkbenchPreferencePage#init(org.eclipse.ui.IWorkbench)
*/
public void init( IWorkbench workbench )
{
}
/* (non-Javadoc)
* @see org.eclipse.jface.dialogs.IDialogPage#createControl(org.eclipse.swt.widgets.Composite)
*/
public void createControl(Composite parent)
{
super.createControl( parent );
WorkbenchHelp.setHelp( parent, ICDebugHelpContextIds.SHARED_LIBRARIES_PREFERENCE_PAGE );
}
public static void initDefaults( IPreferenceStore store )
{
CDebugCorePlugin.getDefault().getPluginPreferences().setDefault( ICDebugConstants.PREF_SHARED_LIBRARIES_AUTO_REFRESH, false );
}
protected void createSpacer( Composite composite, int columnSpan )
{
Label label = new Label( composite, SWT.NONE );
GridData gd = new GridData();
gd.horizontalSpan = columnSpan;
label.setLayoutData( gd );
}
/* (non-Javadoc)
* @see org.eclipse.jface.preference.IPreferencePage#performOk()
*/
public boolean performOk()
{
boolean ok = super.performOk();
storeValues();
CDebugUIPlugin.getDefault().savePluginPreferences();
CDebugCorePlugin.getDefault().savePluginPreferences();
return ok;
}
/* (non-Javadoc)
* @see org.eclipse.jface.preference.PreferencePage#performDefaults()
*/
protected void performDefaults()
{
setDefaultValues();
super.performDefaults();
}
private void setDefaultValues()
{
fAutoRefreshField.setSelection( CDebugCorePlugin.getDefault().getPluginPreferences().getDefaultBoolean( ICDebugConstants.PREF_SHARED_LIBRARIES_AUTO_REFRESH ) );
}
private void storeValues()
{
CDebugCorePlugin.getDefault().getPluginPreferences().setValue( ICDebugConstants.PREF_SHARED_LIBRARIES_AUTO_REFRESH, fAutoRefreshField.getSelection() );
}
/* (non-Javadoc)
* @see org.eclipse.jface.preference.FieldEditorPreferencePage#adjustGridLayout()
*/
protected void adjustGridLayout()
{
super.adjustGridLayout();
// If there are no editor fields on this page set the number of columns to prevent stack overflow
if ( ((GridLayout)getFieldEditorParent().getLayout()).numColumns == 0 )
((GridLayout)getFieldEditorParent().getLayout()).numColumns = 2;
}
}

View file

@ -18,7 +18,6 @@ import org.eclipse.cdt.debug.internal.ui.editors.DisassemblyDocumentProvider;
import org.eclipse.cdt.debug.internal.ui.editors.DisassemblyEditorInput;
import org.eclipse.cdt.debug.internal.ui.preferences.CDebugPreferencePage;
import org.eclipse.cdt.debug.internal.ui.preferences.MemoryViewPreferencePage;
import org.eclipse.cdt.debug.internal.ui.preferences.SharedLibrariesViewPreferencePage;
import org.eclipse.cdt.debug.ui.sourcelookup.DefaultSourceLocator;
import org.eclipse.core.resources.IStorage;
import org.eclipse.core.resources.IWorkspace;
@ -177,7 +176,6 @@ public class CDebugUIPlugin extends AbstractUIPlugin
protected void initializeDefaultPreferences( IPreferenceStore pstore )
{
MemoryViewPreferencePage.initDefaults( pstore );
SharedLibrariesViewPreferencePage.initDefaults( pstore );
CDebugPreferencePage.initDefaults( pstore );
}

View file

@ -118,9 +118,6 @@ internal.ui.editors.DisassemblyEditorInput.Disassembly=Disassembly
internal.ui.preferences.SharedLibrariesViewPreferencePage.Shared_Libraries_View_Settings=Shared Libraries View Settings.
internal.ui.preferences.SharedLibrariesViewPreferencePage.Auto-Refresh_by_default=Auto-Refresh by default
internal.ui.preferences.RegistersViewPreferencePage.Registers_View_Settings=Registers View Settings.
internal.ui.preferences.RegistersViewPreferencePage.Changed_register_value_color=&Changed register value color:
internal.ui.preferences.RegistersViewPreferencePage.Auto-Refresh_by_default=Auto-Refresh by default
internal.ui.preferences.CDebugPreferencePage.Natural=Natural
internal.ui.preferences.CDebugPreferencePage.Hexadecimal=Hexadecimal
@ -138,6 +135,8 @@ internal.ui.preferences.CDebugPreferencePage.ErrorMaxNumberOfInstructionsRange=T
internal.ui.preferences.SourcePreferencePage.Description=Common source lookup settings.
internal.ui.preferences.SourcePreferencePage.Source_locations=Source Locations
internal.ui.preferences.SourcePreferencePage.Search_for_duplicate_source_files=Search for duplicate source files
internal.ui.preferences.CDebugPreferencePage.autoRefreshRegistersButton=Automatically refresh registers
internal.ui.preferences.CDebugPreferencePage.autoRefreshSolibsButton=Automatically refresh shared libraries
internal.ui.preferences.MemoryViewPreferencePage.Description=Memory View Settings.
internal.ui.preferences.MemoryViewPreferencePage.Text_Color=Text Color:
internal.ui.preferences.MemoryViewPreferencePage.Background_Color=Background Color: