Skip to main content
aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMikhail Khodjaiants2005-03-09 21:22:27 +0000
committerMikhail Khodjaiants2005-03-09 21:22:27 +0000
commitb7f2832d9247550a834fca14b61a978e7db9dbfa (patch)
tree3193f46fdca9b54e07d82554f0173ca33f8f1b7a /debug/org.eclipse.cdt.debug.mi.ui/src/org/eclipse
parente9c3b52623b37a7b84efc922c96aca5ee2191c82 (diff)
downloadorg.eclipse.cdt-b7f2832d9247550a834fca14b61a978e7db9dbfa.tar.gz
org.eclipse.cdt-b7f2832d9247550a834fca14b61a978e7db9dbfa.tar.xz
org.eclipse.cdt-b7f2832d9247550a834fca14b61a978e7db9dbfa.zip
Fix for bug 87546: Obsolete debug MI settings in Preference need to be removed.
Diffstat (limited to 'debug/org.eclipse.cdt.debug.mi.ui/src/org/eclipse')
-rw-r--r--debug/org.eclipse.cdt.debug.mi.ui/src/org/eclipse/cdt/debug/mi/internal/ui/preferences/MIPreferencePage.java19
-rw-r--r--debug/org.eclipse.cdt.debug.mi.ui/src/org/eclipse/cdt/debug/mi/internal/ui/preferences/PreferenceMessages.properties3
-rw-r--r--debug/org.eclipse.cdt.debug.mi.ui/src/org/eclipse/cdt/debug/mi/internal/ui/propertypages/OptionsPropertyPage.java17
-rw-r--r--debug/org.eclipse.cdt.debug.mi.ui/src/org/eclipse/cdt/debug/mi/internal/ui/propertypages/PropertyMessages.properties3
4 files changed, 12 insertions, 30 deletions
diff --git a/debug/org.eclipse.cdt.debug.mi.ui/src/org/eclipse/cdt/debug/mi/internal/ui/preferences/MIPreferencePage.java b/debug/org.eclipse.cdt.debug.mi.ui/src/org/eclipse/cdt/debug/mi/internal/ui/preferences/MIPreferencePage.java
index f3095e15298..c577e359e39 100644
--- a/debug/org.eclipse.cdt.debug.mi.ui/src/org/eclipse/cdt/debug/mi/internal/ui/preferences/MIPreferencePage.java
+++ b/debug/org.eclipse.cdt.debug.mi.ui/src/org/eclipse/cdt/debug/mi/internal/ui/preferences/MIPreferencePage.java
@@ -36,7 +36,6 @@ import org.eclipse.swt.widgets.Control;
import org.eclipse.swt.widgets.Label;
import org.eclipse.ui.IWorkbench;
import org.eclipse.ui.IWorkbenchPreferencePage;
-import org.eclipse.ui.help.WorkbenchHelp;
/**
* Page for preferences that apply specifically to GDB MI.
@@ -291,7 +290,7 @@ public class MIPreferencePage extends PreferencePage implements IWorkbenchPrefer
}
}
- private final static String GDB_MI_HELP_CONTEXT = MIUIPlugin.PLUGIN_ID + "mi_preference_page_context"; //$NON-NLS-1$
+ private IWorkbench fWorkbench;
// Debugger timeout preference widgets
private IntegerFieldEditor fDebugTimeoutText;
@@ -299,8 +298,6 @@ public class MIPreferencePage extends PreferencePage implements IWorkbenchPrefer
// Launch timeout preference widgets
private IntegerFieldEditor fLaunchTimeoutText;
- private BooleanFieldEditor fRefreshRegistersButton;
-
private BooleanFieldEditor fRefreshSolibsButton;
private MIPreferenceStore fMICorePreferenceStore = new MIPreferenceStore( MIPlugin.getDefault().getPluginPreferences() );
@@ -320,7 +317,7 @@ public class MIPreferencePage extends PreferencePage implements IWorkbenchPrefer
* @see org.eclipse.jface.preference.PreferencePage#createContents(Composite)
*/
protected Control createContents( Composite parent ) {
- WorkbenchHelp.setHelp( getControl(), IMIHelpContextIds.MI_PREFERENCE_PAGE );
+ getWorkbench().getHelpSystem().setHelp( getControl(), IMIHelpContextIds.MI_PREFERENCE_PAGE );
//The main composite
Composite composite = new Composite( parent, SWT.NULL );
GridLayout layout = new GridLayout();
@@ -334,7 +331,6 @@ public class MIPreferencePage extends PreferencePage implements IWorkbenchPrefer
composite.setLayoutData( data );
createSpacer( composite, 1 );
createCommunicationPreferences( composite );
- WorkbenchHelp.setHelp( composite, GDB_MI_HELP_CONTEXT );
return composite;
}
@@ -374,7 +370,6 @@ public class MIPreferencePage extends PreferencePage implements IWorkbenchPrefer
private void setDefaultValues() {
fDebugTimeoutText.loadDefault();
fLaunchTimeoutText.loadDefault();
- fRefreshRegistersButton.loadDefault();
fRefreshSolibsButton.loadDefault();
}
@@ -384,6 +379,7 @@ public class MIPreferencePage extends PreferencePage implements IWorkbenchPrefer
* @see org.eclipse.ui.IWorkbenchPreferencePage#init(IWorkbench)
*/
public void init( IWorkbench workbench ) {
+ fWorkbench = workbench;
}
protected void createSpacer( Composite composite, int columnSpan ) {
@@ -418,7 +414,6 @@ public class MIPreferencePage extends PreferencePage implements IWorkbenchPrefer
setValid( getLaunchTimeoutText().isValid() );
}
} );
- fRefreshRegistersButton = createRefreshField( IMIConstants.PREF_REGISTERS_AUTO_REFRESH, PreferenceMessages.getString( "MIPreferencePage.5" ), spacingComposite ); //$NON-NLS-1$
fRefreshSolibsButton = createRefreshField( IMIConstants.PREF_SHARED_LIBRARIES_AUTO_REFRESH, PreferenceMessages.getString( "MIPreferencePage.6" ), spacingComposite ); //$NON-NLS-1$
}
@@ -428,7 +423,6 @@ public class MIPreferencePage extends PreferencePage implements IWorkbenchPrefer
private void storeValues() {
fDebugTimeoutText.store();
fLaunchTimeoutText.store();
- fRefreshRegistersButton.store();
fRefreshSolibsButton.store();
}
@@ -466,7 +460,6 @@ public class MIPreferencePage extends PreferencePage implements IWorkbenchPrefer
public void dispose() {
fDebugTimeoutText.dispose();
fLaunchTimeoutText.dispose();
- fRefreshRegistersButton.dispose();
fRefreshSolibsButton.dispose();
super.dispose();
}
@@ -478,4 +471,10 @@ public class MIPreferencePage extends PreferencePage implements IWorkbenchPrefer
protected IntegerFieldEditor getDebugTimeoutText() {
return fDebugTimeoutText;
}
+
+
+ private IWorkbench getWorkbench() {
+ return fWorkbench;
+ }
+
} \ No newline at end of file
diff --git a/debug/org.eclipse.cdt.debug.mi.ui/src/org/eclipse/cdt/debug/mi/internal/ui/preferences/PreferenceMessages.properties b/debug/org.eclipse.cdt.debug.mi.ui/src/org/eclipse/cdt/debug/mi/internal/ui/preferences/PreferenceMessages.properties
index a417595fc99..402a1c8be35 100644
--- a/debug/org.eclipse.cdt.debug.mi.ui/src/org/eclipse/cdt/debug/mi/internal/ui/preferences/PreferenceMessages.properties
+++ b/debug/org.eclipse.cdt.debug.mi.ui/src/org/eclipse/cdt/debug/mi/internal/ui/preferences/PreferenceMessages.properties
@@ -14,5 +14,4 @@ MIPreferencePage.1=Communication
MIPreferencePage.2=&Debugger timeout (ms):
MIPreferencePage.3=&Launch timeout (ms):
MIPreferencePage.4=The valid value range is [{0},{1}].
-MIPreferencePage.5=Automatically refresh registers
-MIPreferencePage.6=Automatically refresh shared libraries
+MIPreferencePage.6=Automatically refresh modules
diff --git a/debug/org.eclipse.cdt.debug.mi.ui/src/org/eclipse/cdt/debug/mi/internal/ui/propertypages/OptionsPropertyPage.java b/debug/org.eclipse.cdt.debug.mi.ui/src/org/eclipse/cdt/debug/mi/internal/ui/propertypages/OptionsPropertyPage.java
index 681ee7d407b..55fe013909e 100644
--- a/debug/org.eclipse.cdt.debug.mi.ui/src/org/eclipse/cdt/debug/mi/internal/ui/propertypages/OptionsPropertyPage.java
+++ b/debug/org.eclipse.cdt.debug.mi.ui/src/org/eclipse/cdt/debug/mi/internal/ui/propertypages/OptionsPropertyPage.java
@@ -28,8 +28,6 @@ import org.eclipse.ui.dialogs.PropertyPage;
*/
public class OptionsPropertyPage extends PropertyPage {
- private Button fRefreshRegistersButton;
-
private Button fRefreshSolibsButton;
/**
@@ -44,7 +42,6 @@ public class OptionsPropertyPage extends PropertyPage {
*/
protected Control createContents( Composite parent ) {
Composite comp = ControlFactory.createComposite( parent, 1 );
- fRefreshRegistersButton = createCheckButton( comp, PropertyMessages.getString( "OptionsPropertyPage.0" ) ); //$NON-NLS-1$
fRefreshSolibsButton = createCheckButton( comp, PropertyMessages.getString( "OptionsPropertyPage.1" ) ); //$NON-NLS-1$
initialize();
return comp;
@@ -60,14 +57,11 @@ public class OptionsPropertyPage extends PropertyPage {
}
private void initialize() {
- boolean regUpdate = true;
boolean solibUpdate = true;
ICDISession session = (ICDISession)getElement().getAdapter( ICDISession.class );
if ( session instanceof Session ) {
- regUpdate = ((Session)session).getRegisterManager().isAutoUpdate();
solibUpdate = ((Session)session).getSharedLibraryManager().isAutoUpdate();
}
- fRefreshRegistersButton.setSelection( regUpdate );
fRefreshSolibsButton.setSelection( solibUpdate );
}
@@ -86,23 +80,14 @@ public class OptionsPropertyPage extends PropertyPage {
ICDISession session = (ICDISession)getElement().getAdapter( ICDISession.class );
final ICDITarget target = (ICDITarget)getElement().getAdapter( ICDITarget.class );
if ( session instanceof Session ) {
- final boolean regUpdate = fRefreshRegistersButton.getSelection();
final boolean solibUpdate = fRefreshSolibsButton.getSelection();
final Session miSession = ((Session)session);
- miSession.getRegisterManager().setAutoUpdate( regUpdate );
miSession.getSharedLibraryManager().setAutoUpdate( solibUpdate );
- if ( target.isSuspended() && (regUpdate || solibUpdate) ) {
+ if ( target.isSuspended() && solibUpdate ) {
DebugPlugin.getDefault().asyncExec( new Runnable() {
public void run() {
if ( target.isSuspended() ) {
- if ( regUpdate ) {
- try {
- miSession.getRegisterManager().update();
- }
- catch( CDIException e ) {
- }
- }
if ( solibUpdate ) {
try {
miSession.getSharedLibraryManager().update();
diff --git a/debug/org.eclipse.cdt.debug.mi.ui/src/org/eclipse/cdt/debug/mi/internal/ui/propertypages/PropertyMessages.properties b/debug/org.eclipse.cdt.debug.mi.ui/src/org/eclipse/cdt/debug/mi/internal/ui/propertypages/PropertyMessages.properties
index d421597a5a9..f4b7e963e26 100644
--- a/debug/org.eclipse.cdt.debug.mi.ui/src/org/eclipse/cdt/debug/mi/internal/ui/propertypages/PropertyMessages.properties
+++ b/debug/org.eclipse.cdt.debug.mi.ui/src/org/eclipse/cdt/debug/mi/internal/ui/propertypages/PropertyMessages.properties
@@ -1,2 +1 @@
-OptionsPropertyPage.0=Automatically refresh registers
-OptionsPropertyPage.1=Automatically refresh shared libraries
+OptionsPropertyPage.1=Automatically refresh modules

Back to the top