1
0
Fork 0
mirror of https://github.com/eclipse-cdt/cdt synced 2025-04-29 19:45:01 +02:00

Warnings cleanup.

This commit is contained in:
Mikhail Khodjaiants 2003-06-24 04:37:07 +00:00
parent f8fa23bae5
commit 45e573a88b
3 changed files with 28 additions and 13 deletions

View file

@ -1,3 +1,8 @@
2003-06-24 Mikhail Khodjaiants
Warnings cleanup.
* CDebugPreferencePage.java
* MemoryControlArea.java
2003-06-20 Mikhail Khodjaiants 2003-06-20 Mikhail Khodjaiants
In the 'getVariableText' and 'getVariableImage' methods of CDTDebugModelPresentation In the 'getVariableText' and 'getVariableImage' methods of CDTDebugModelPresentation
ignore exceptions thrown by getType. ignore exceptions thrown by getType.

View file

@ -153,7 +153,7 @@ public class CDebugPreferencePage extends PreferencePage implements IWorkbenchPr
fPathsButton.setSelection( store.getBoolean( ICDebugPreferenceConstants.PREF_SHOW_FULL_PATHS ) ); fPathsButton.setSelection( store.getBoolean( ICDebugPreferenceConstants.PREF_SHOW_FULL_PATHS ) );
fAutoDisassemblyButton.setSelection( CDebugCorePlugin.getDefault().getPluginPreferences().getBoolean( ICDebugConstants.PREF_AUTO_DISASSEMBLY ) ); 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 ) ) ); fVariableFormatCombo.select( getFormatIndex( CDebugCorePlugin.getDefault().getPluginPreferences().getInt( ICDebugConstants.PREF_DEFAULT_VARIABLE_FORMAT ) ) );
fExpressionFormatCombo.select( getFormatIndex( CDebugCorePlugin.getDefault().getPluginPreferences().getInt( ICDebugConstants.PREF_DEFAULT_EXPRESSION_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 ) ) ); 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 ) public void propertyChange( PropertyChangeEvent event )
{ {
if ( event.getProperty().equals( FieldEditor.IS_VALID ) ) 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(); IPreferenceStore store = getPreferenceStore();
store.setValue( ICDebugPreferenceConstants.PREF_SHOW_FULL_PATHS, fPathsButton.getSelection() ); 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_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_VARIABLE_FORMAT, getFormatId( fVariableFormatCombo.getSelectionIndex() ) );
CDebugCorePlugin.getDefault().getPluginPreferences().setValue( ICDebugConstants.PREF_DEFAULT_EXPRESSION_FORMAT, getFormatId( fExpressionFormatCombo.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() ) ); 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(); IPreferenceStore store = getPreferenceStore();
fPathsButton.setSelection( store.getDefaultBoolean( ICDebugPreferenceConstants.PREF_SHOW_FULL_PATHS ) ); fPathsButton.setSelection( store.getDefaultBoolean( ICDebugPreferenceConstants.PREF_SHOW_FULL_PATHS ) );
fAutoDisassemblyButton.setSelection( CDebugCorePlugin.getDefault().getPluginPreferences().getDefaultBoolean( ICDebugConstants.PREF_AUTO_DISASSEMBLY ) ); 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 ) ) ); fVariableFormatCombo.select( getFormatIndex( CDebugCorePlugin.getDefault().getPluginPreferences().getDefaultInt( ICDebugConstants.PREF_DEFAULT_VARIABLE_FORMAT ) ) );
fExpressionFormatCombo.select( getFormatIndex( CDebugCorePlugin.getDefault().getPluginPreferences().getDefaultInt( ICDebugConstants.PREF_DEFAULT_EXPRESSION_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 ) ) ); 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 i;
return -1; return -1;
} }
protected IntegerFieldEditor getMaxNumberOfInstructionsText()
{
return fMaxNumberOfInstructionsText;
}
} }

View file

@ -131,12 +131,12 @@ public class MemoryControlArea extends Composite implements ITextOperationTarget
{ {
public void focusGained( FocusEvent e ) public void focusGained( FocusEvent e )
{ {
fMemoryView.updateObjects(); getMemoryView().updateObjects();
} }
public void focusLost( FocusEvent e ) public void focusLost( FocusEvent e )
{ {
fMemoryView.updateObjects(); getMemoryView().updateObjects();
} }
} ); } );
text.addModifyListener( new ModifyListener() text.addModifyListener( new ModifyListener()
@ -150,29 +150,29 @@ public class MemoryControlArea extends Composite implements ITextOperationTarget
{ {
public void keyPressed( KeyEvent e ) public void keyPressed( KeyEvent e )
{ {
fMemoryView.updateObjects(); getMemoryView().updateObjects();
} }
public void keyReleased( KeyEvent e ) public void keyReleased( KeyEvent e )
{ {
fMemoryView.updateObjects(); getMemoryView().updateObjects();
} }
} ); } );
text.addMouseListener( new MouseListener() text.addMouseListener( new MouseListener()
{ {
public void mouseDoubleClick( MouseEvent e ) public void mouseDoubleClick( MouseEvent e )
{ {
fMemoryView.updateObjects(); getMemoryView().updateObjects();
} }
public void mouseDown( MouseEvent e ) public void mouseDown( MouseEvent e )
{ {
fMemoryView.updateObjects(); getMemoryView().updateObjects();
} }
public void mouseUp( MouseEvent e ) 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() ); CDebugUIPlugin.errorDialog( "Unable to get memory block.", e.getStatus() );
} }
refresh(); refresh();
fMemoryView.updateObjects(); getMemoryView().updateObjects();
} }
} }
@ -264,7 +264,7 @@ public class MemoryControlArea extends Composite implements ITextOperationTarget
{ {
fAddressText.setText( ( getPresentation() != null ) ? getPresentation().getAddressExpression() : "" ); fAddressText.setText( ( getPresentation() != null ) ? getPresentation().getAddressExpression() : "" );
fMemoryText.refresh(); fMemoryText.refresh();
fMemoryView.updateObjects(); getMemoryView().updateObjects();
updateToolTipText(); updateToolTipText();
} }
@ -564,4 +564,9 @@ public class MemoryControlArea extends Composite implements ITextOperationTarget
break; break;
} }
} }
protected MemoryView getMemoryView()
{
return fMemoryView;
}
} }