diff --git a/debug/org.eclipse.cdt.debug.ui/ChangeLog b/debug/org.eclipse.cdt.debug.ui/ChangeLog index 62e579e20f6..855b672b205 100644 --- a/debug/org.eclipse.cdt.debug.ui/ChangeLog +++ b/debug/org.eclipse.cdt.debug.ui/ChangeLog @@ -1,3 +1,8 @@ +2003-06-24 Mikhail Khodjaiants + Warnings cleanup. + * CDebugPreferencePage.java + * MemoryControlArea.java + 2003-06-20 Mikhail Khodjaiants In the 'getVariableText' and 'getVariableImage' methods of CDTDebugModelPresentation ignore exceptions thrown by getType. 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 7c825865a94..7ea0e6a18e1 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 @@ -153,7 +153,7 @@ public class CDebugPreferencePage extends PreferencePage implements IWorkbenchPr fPathsButton.setSelection( store.getBoolean( ICDebugPreferenceConstants.PREF_SHOW_FULL_PATHS ) ); fAutoDisassemblyButton.setSelection( CDebugCorePlugin.getDefault().getPluginPreferences().getBoolean( ICDebugConstants.PREF_AUTO_DISASSEMBLY ) ); - fMaxNumberOfInstructionsText.setStringValue( new Integer( CDebugCorePlugin.getDefault().getPluginPreferences().getInt( ICDebugConstants.PREF_MAX_NUMBER_OF_INSTRUCTIONS ) ).toString() ); + 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 ) ) ); fExpressionFormatCombo.select( getFormatIndex( CDebugCorePlugin.getDefault().getPluginPreferences().getInt( ICDebugConstants.PREF_DEFAULT_EXPRESSION_FORMAT ) ) ); fRegisterFormatCombo.select( getFormatIndex( CDebugCorePlugin.getDefault().getPluginPreferences().getInt( ICDebugConstants.PREF_DEFAULT_REGISTER_FORMAT ) ) ); @@ -245,7 +245,7 @@ public class CDebugPreferencePage extends PreferencePage implements IWorkbenchPr public void propertyChange( PropertyChangeEvent event ) { if ( event.getProperty().equals( FieldEditor.IS_VALID ) ) - setValid( fMaxNumberOfInstructionsText.isValid() ); + setValid( getMaxNumberOfInstructionsText().isValid() ); } } ); } @@ -356,7 +356,7 @@ 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_AUTO_DISASSEMBLY, fAutoDisassemblyButton.getSelection() ); - CDebugCorePlugin.getDefault().getPluginPreferences().setValue( ICDebugConstants.PREF_MAX_NUMBER_OF_INSTRUCTIONS, fMaxNumberOfInstructionsText.getIntValue() ); + CDebugCorePlugin.getDefault().getPluginPreferences().setValue( ICDebugConstants.PREF_MAX_NUMBER_OF_INSTRUCTIONS, getMaxNumberOfInstructionsText().getIntValue() ); CDebugCorePlugin.getDefault().getPluginPreferences().setValue( ICDebugConstants.PREF_DEFAULT_VARIABLE_FORMAT, getFormatId( fVariableFormatCombo.getSelectionIndex() ) ); CDebugCorePlugin.getDefault().getPluginPreferences().setValue( ICDebugConstants.PREF_DEFAULT_EXPRESSION_FORMAT, getFormatId( fExpressionFormatCombo.getSelectionIndex() ) ); CDebugCorePlugin.getDefault().getPluginPreferences().setValue( ICDebugConstants.PREF_DEFAULT_REGISTER_FORMAT, getFormatId( fRegisterFormatCombo.getSelectionIndex() ) ); @@ -377,7 +377,7 @@ public class CDebugPreferencePage extends PreferencePage implements IWorkbenchPr IPreferenceStore store = getPreferenceStore(); fPathsButton.setSelection( store.getDefaultBoolean( ICDebugPreferenceConstants.PREF_SHOW_FULL_PATHS ) ); fAutoDisassemblyButton.setSelection( CDebugCorePlugin.getDefault().getPluginPreferences().getDefaultBoolean( ICDebugConstants.PREF_AUTO_DISASSEMBLY ) ); - fMaxNumberOfInstructionsText.setStringValue( new Integer( CDebugCorePlugin.getDefault().getPluginPreferences().getDefaultInt( ICDebugConstants.PREF_MAX_NUMBER_OF_INSTRUCTIONS ) ).toString() ); + 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 ) ) ); fExpressionFormatCombo.select( getFormatIndex( CDebugCorePlugin.getDefault().getPluginPreferences().getDefaultInt( ICDebugConstants.PREF_DEFAULT_EXPRESSION_FORMAT ) ) ); fRegisterFormatCombo.select( getFormatIndex( CDebugCorePlugin.getDefault().getPluginPreferences().getDefaultInt( ICDebugConstants.PREF_DEFAULT_REGISTER_FORMAT ) ) ); @@ -395,4 +395,9 @@ public class CDebugPreferencePage extends PreferencePage implements IWorkbenchPr return i; return -1; } + + protected IntegerFieldEditor getMaxNumberOfInstructionsText() + { + return fMaxNumberOfInstructionsText; + } } diff --git a/debug/org.eclipse.cdt.debug.ui/src/org/eclipse/cdt/debug/internal/ui/views/memory/MemoryControlArea.java b/debug/org.eclipse.cdt.debug.ui/src/org/eclipse/cdt/debug/internal/ui/views/memory/MemoryControlArea.java index 35b8ff8059f..b3bb3513fd6 100644 --- a/debug/org.eclipse.cdt.debug.ui/src/org/eclipse/cdt/debug/internal/ui/views/memory/MemoryControlArea.java +++ b/debug/org.eclipse.cdt.debug.ui/src/org/eclipse/cdt/debug/internal/ui/views/memory/MemoryControlArea.java @@ -131,12 +131,12 @@ public class MemoryControlArea extends Composite implements ITextOperationTarget { public void focusGained( FocusEvent e ) { - fMemoryView.updateObjects(); + getMemoryView().updateObjects(); } public void focusLost( FocusEvent e ) { - fMemoryView.updateObjects(); + getMemoryView().updateObjects(); } } ); text.addModifyListener( new ModifyListener() @@ -150,29 +150,29 @@ public class MemoryControlArea extends Composite implements ITextOperationTarget { public void keyPressed( KeyEvent e ) { - fMemoryView.updateObjects(); + getMemoryView().updateObjects(); } public void keyReleased( KeyEvent e ) { - fMemoryView.updateObjects(); + getMemoryView().updateObjects(); } } ); text.addMouseListener( new MouseListener() { public void mouseDoubleClick( MouseEvent e ) { - fMemoryView.updateObjects(); + getMemoryView().updateObjects(); } public void mouseDown( MouseEvent e ) { - fMemoryView.updateObjects(); + getMemoryView().updateObjects(); } public void mouseUp( MouseEvent e ) { - fMemoryView.updateObjects(); + getMemoryView().updateObjects(); } } ); @@ -214,7 +214,7 @@ public class MemoryControlArea extends Composite implements ITextOperationTarget CDebugUIPlugin.errorDialog( "Unable to get memory block.", e.getStatus() ); } refresh(); - fMemoryView.updateObjects(); + getMemoryView().updateObjects(); } } @@ -264,7 +264,7 @@ public class MemoryControlArea extends Composite implements ITextOperationTarget { fAddressText.setText( ( getPresentation() != null ) ? getPresentation().getAddressExpression() : "" ); fMemoryText.refresh(); - fMemoryView.updateObjects(); + getMemoryView().updateObjects(); updateToolTipText(); } @@ -564,4 +564,9 @@ public class MemoryControlArea extends Composite implements ITextOperationTarget break; } } + + protected MemoryView getMemoryView() + { + return fMemoryView; + } }