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
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.
-rw-r--r--debug/org.eclipse.cdt.debug.mi.core/ChangeLog6
-rw-r--r--debug/org.eclipse.cdt.debug.mi.core/cdi/org/eclipse/cdt/debug/mi/core/cdi/RegisterManager.java6
-rw-r--r--debug/org.eclipse.cdt.debug.mi.core/src/org/eclipse/cdt/debug/mi/core/IMIConstants.java11
-rw-r--r--debug/org.eclipse.cdt.debug.mi.core/src/org/eclipse/cdt/debug/mi/core/MIPreferenceInitializer.java1
-rw-r--r--debug/org.eclipse.cdt.debug.mi.ui/ChangeLog7
-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
9 files changed, 27 insertions, 46 deletions
diff --git a/debug/org.eclipse.cdt.debug.mi.core/ChangeLog b/debug/org.eclipse.cdt.debug.mi.core/ChangeLog
index e3b6ffdd39..649dad3166 100644
--- a/debug/org.eclipse.cdt.debug.mi.core/ChangeLog
+++ b/debug/org.eclipse.cdt.debug.mi.core/ChangeLog
@@ -1,3 +1,9 @@
+2005-03-09 Mikhail Khodjaiants
+ Fix for bug 87546: Obsolete debug MI settings in Preference need to be removed.
+ * RegisterManager.java
+ * IMIConstants.java
+ * MIPreferenceInitializer.java
+
2005-03-07 Alain Magloire
Fix for 87230: base on Jayaprakash ideas/patch
On HP statck-list-frames answer contain not kosher strings
diff --git a/debug/org.eclipse.cdt.debug.mi.core/cdi/org/eclipse/cdt/debug/mi/core/cdi/RegisterManager.java b/debug/org.eclipse.cdt.debug.mi.core/cdi/org/eclipse/cdt/debug/mi/core/cdi/RegisterManager.java
index 5bd4deab41..a2a4a8618c 100644
--- a/debug/org.eclipse.cdt.debug.mi.core/cdi/org/eclipse/cdt/debug/mi/core/cdi/RegisterManager.java
+++ b/debug/org.eclipse.cdt.debug.mi.core/cdi/org/eclipse/cdt/debug/mi/core/cdi/RegisterManager.java
@@ -15,13 +15,10 @@ import java.util.Collections;
import java.util.Hashtable;
import java.util.List;
import java.util.Map;
-
import org.eclipse.cdt.debug.core.cdi.CDIException;
import org.eclipse.cdt.debug.core.cdi.model.ICDIRegisterDescriptor;
import org.eclipse.cdt.debug.core.cdi.model.ICDIRegisterGroup;
-import org.eclipse.cdt.debug.mi.core.IMIConstants;
import org.eclipse.cdt.debug.mi.core.MIException;
-import org.eclipse.cdt.debug.mi.core.MIPlugin;
import org.eclipse.cdt.debug.mi.core.MISession;
import org.eclipse.cdt.debug.mi.core.cdi.model.Register;
import org.eclipse.cdt.debug.mi.core.cdi.model.RegisterDescriptor;
@@ -54,7 +51,8 @@ public class RegisterManager extends Manager {
public RegisterManager(Session session) {
super(session, true);
regsMap = new Hashtable();
- setAutoUpdate( MIPlugin.getDefault().getPluginPreferences().getBoolean( IMIConstants.PREF_REGISTERS_AUTO_REFRESH ) );
+ // The register bookkeeping provides better update control.
+ setAutoUpdate( true );
}
synchronized List getRegistersList(Target target) {
diff --git a/debug/org.eclipse.cdt.debug.mi.core/src/org/eclipse/cdt/debug/mi/core/IMIConstants.java b/debug/org.eclipse.cdt.debug.mi.core/src/org/eclipse/cdt/debug/mi/core/IMIConstants.java
index 11f759d839..0c54ef77bd 100644
--- a/debug/org.eclipse.cdt.debug.mi.core/src/org/eclipse/cdt/debug/mi/core/IMIConstants.java
+++ b/debug/org.eclipse.cdt.debug.mi.core/src/org/eclipse/cdt/debug/mi/core/IMIConstants.java
@@ -63,15 +63,4 @@ public interface IMIConstants
* The default value of the for <code>PREF_SHARED_LIBRARIES_AUTO_REFRESH</code> property
*/
public static final boolean DEF_PREF_SHARED_LIBRARIES_AUTO_REFRESH = true;
-
- /**
- * Boolean preference controlling whether the register manager will be
- * refreshed every time when the execution of program stops.
- */
- public static final String PREF_REGISTERS_AUTO_REFRESH = PLUGIN_ID + ".Registers.auto_refresh"; //$NON-NLS-1$
-
- /**
- * The default value of the for <code>PREF_REGISTERS_AUTO_REFRESH</code> property
- */
- public static final boolean DEF_PREF_REGISTERS_AUTO_REFRESH = true;
}
diff --git a/debug/org.eclipse.cdt.debug.mi.core/src/org/eclipse/cdt/debug/mi/core/MIPreferenceInitializer.java b/debug/org.eclipse.cdt.debug.mi.core/src/org/eclipse/cdt/debug/mi/core/MIPreferenceInitializer.java
index 4fb388c55f..9456cf20fa 100644
--- a/debug/org.eclipse.cdt.debug.mi.core/src/org/eclipse/cdt/debug/mi/core/MIPreferenceInitializer.java
+++ b/debug/org.eclipse.cdt.debug.mi.core/src/org/eclipse/cdt/debug/mi/core/MIPreferenceInitializer.java
@@ -27,7 +27,6 @@ public class MIPreferenceInitializer extends AbstractPreferenceInitializer {
public void initializeDefaultPreferences() {
MIPlugin.getDefault().getPluginPreferences().setDefault(IMIConstants.PREF_REQUEST_TIMEOUT, IMIConstants.DEF_REQUEST_TIMEOUT);
MIPlugin.getDefault().getPluginPreferences().setDefault(IMIConstants.PREF_REQUEST_LAUNCH_TIMEOUT, IMIConstants.DEF_REQUEST_LAUNCH_TIMEOUT);
- MIPlugin.getDefault().getPluginPreferences().setDefault(IMIConstants.PREF_REGISTERS_AUTO_REFRESH, IMIConstants.DEF_PREF_REGISTERS_AUTO_REFRESH);
MIPlugin.getDefault().getPluginPreferences().setDefault(IMIConstants.PREF_SHARED_LIBRARIES_AUTO_REFRESH, IMIConstants.DEF_PREF_SHARED_LIBRARIES_AUTO_REFRESH);
}
} \ No newline at end of file
diff --git a/debug/org.eclipse.cdt.debug.mi.ui/ChangeLog b/debug/org.eclipse.cdt.debug.mi.ui/ChangeLog
index e440b5f811..f3c764c565 100644
--- a/debug/org.eclipse.cdt.debug.mi.ui/ChangeLog
+++ b/debug/org.eclipse.cdt.debug.mi.ui/ChangeLog
@@ -1,3 +1,10 @@
+2005-03-09 Mikhail Khodjaiants
+ Fix for bug 87546: Obsolete debug MI settings in Preference need to be removed.
+ * MIPreferencePage.java
+ * PreferenceMessages.properties
+ * OptionsPropertyPage.java
+ * PropertyMessages.properties
+
2005-03-03 Mikhail Khodjaiants
Conflicting methods.
* SolibSearchPathBlock.java
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 f3095e1529..c577e359e3 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 a417595fc9..402a1c8be3 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 681ee7d407..55fe013909 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 d421597a5a..f4b7e963e2 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