Skip to main content
aboutsummaryrefslogtreecommitdiffstats
path: root/launch
diff options
context:
space:
mode:
authorMikhail Khodjaiants2004-10-11 20:24:15 +0000
committerMikhail Khodjaiants2004-10-11 20:24:15 +0000
commitacf19e50fa65590efee798b6f494aa295ba8a029 (patch)
tree47aa9d628b4d9a864fe4009cb3c2ce139ba9397a /launch
parent06b4f414c0394080a502e8ce63b72b4807db6a11 (diff)
downloadorg.eclipse.cdt-acf19e50fa65590efee798b6f494aa295ba8a029.tar.gz
org.eclipse.cdt-acf19e50fa65590efee798b6f494aa295ba8a029.tar.xz
org.eclipse.cdt-acf19e50fa65590efee798b6f494aa295ba8a029.zip
Added the launch configuration preference for the register bookkeeping.
Diffstat (limited to 'launch')
-rw-r--r--launch/org.eclipse.cdt.launch/ChangeLog5
-rw-r--r--launch/org.eclipse.cdt.launch/src/org/eclipse/cdt/launch/internal/ui/LaunchUIPluginResources.properties4
-rw-r--r--launch/org.eclipse.cdt.launch/src/org/eclipse/cdt/launch/ui/CDebuggerTab.java52
3 files changed, 38 insertions, 23 deletions
diff --git a/launch/org.eclipse.cdt.launch/ChangeLog b/launch/org.eclipse.cdt.launch/ChangeLog
index 5c4546acf4..fb90665ccf 100644
--- a/launch/org.eclipse.cdt.launch/ChangeLog
+++ b/launch/org.eclipse.cdt.launch/ChangeLog
@@ -1,3 +1,8 @@
+2004-10-08 Mikhail Khodjaiants
+ Added the launch configuration preference for the register bookkeeping.
+ * LaunchUIPluginResources.properties
+ * CDebuggerTab.java
+
2004-08-23 Mikhail Khodjaiants
Changes in the "Debugger" tab of the launch configuration dialog.
Replaced the "Run in debugger/Attach to running process" radio button by
diff --git a/launch/org.eclipse.cdt.launch/src/org/eclipse/cdt/launch/internal/ui/LaunchUIPluginResources.properties b/launch/org.eclipse.cdt.launch/src/org/eclipse/cdt/launch/internal/ui/LaunchUIPluginResources.properties
index d8505d7cce..fad346d756 100644
--- a/launch/org.eclipse.cdt.launch/src/org/eclipse/cdt/launch/internal/ui/LaunchUIPluginResources.properties
+++ b/launch/org.eclipse.cdt.launch/src/org/eclipse/cdt/launch/internal/ui/LaunchUIPluginResources.properties
@@ -93,10 +93,12 @@ CMainTab.Choose_program_to_run_from_NAME=Choose a program to run from {0}:
CDebuggerTab.Attach_to_running_process=Attach to running process
CDebuggerTab.Advanced_Options_Dialog_Title=Advanced Options
CDebuggerTab.Stop_at_main_on_startup=Stop at main() on startup
-CDebuggerTab.Automatically_track_values_of_variables=Automatically track the values of variables.
+CDebuggerTab.Automatically_track_values_of=Automatically track the values of
CDebuggerTab.Debugger_Options=Debugger Options
CDebuggerTab.Mode_not_supported=Mode ''{0}'' is not supported by selected debugger
CDebuggerTab.Advanced=Advanced...
+CDebuggerTab.Variables=Variables
+CDebuggerTab.Registers=Registers
CDebuggerTab.No_debugger_available=No debugger available
CDebuggerTab.CPU_is_not_supported=The CPU is not supported by selected debugger.
diff --git a/launch/org.eclipse.cdt.launch/src/org/eclipse/cdt/launch/ui/CDebuggerTab.java b/launch/org.eclipse.cdt.launch/src/org/eclipse/cdt/launch/ui/CDebuggerTab.java
index b4163c2885..2e05eedd04 100644
--- a/launch/org.eclipse.cdt.launch/src/org/eclipse/cdt/launch/ui/CDebuggerTab.java
+++ b/launch/org.eclipse.cdt.launch/src/org/eclipse/cdt/launch/ui/CDebuggerTab.java
@@ -50,14 +50,13 @@ public class CDebuggerTab extends AbstractCDebuggerTab {
private Button fVarBookKeeping;
- private Map fAttributes;
+ private Button fRegBookKeeping;
- /**
- * Constructor for AdvancedDebuggerOptionsDialog.
+ /**
+ * Constructor for AdvancedDebuggerOptionsDialog.
*/
- public AdvancedDebuggerOptionsDialog( Shell parentShell, Map attributes ) {
+ protected AdvancedDebuggerOptionsDialog( Shell parentShell ) {
super( parentShell );
- fAttributes = attributes;
}
/* (non-Javadoc)
@@ -65,31 +64,38 @@ public class CDebuggerTab extends AbstractCDebuggerTab {
*/
protected Control createDialogArea( Composite parent ) {
Composite composite = (Composite)super.createDialogArea( parent );
- fVarBookKeeping = new Button( composite, SWT.CHECK );
- fVarBookKeeping.setText( LaunchUIPlugin.getResourceString( "CDebuggerTab.Automatically_track_values_of_variables" ) ); //$NON-NLS-1$
+ Group group = new Group( composite, SWT.NONE );
+ group.setText( LaunchUIPlugin.getResourceString( "CDebuggerTab.Automatically_track_values_of" ) ); //$NON-NLS-1$
+ GridLayout layout = new GridLayout();
+ group.setLayout( layout );
+ group.setLayoutData( new GridData( GridData.FILL_HORIZONTAL ) );
+ fVarBookKeeping = new Button( group, SWT.CHECK );
+ fVarBookKeeping.setText( LaunchUIPlugin.getResourceString( "CDebuggerTab.Variables" ) ); //$NON-NLS-1$
+ fRegBookKeeping = new Button( group, SWT.CHECK );
+ fRegBookKeeping.setText( LaunchUIPlugin.getResourceString( "CDebuggerTab.Registers" ) ); //$NON-NLS-1$
initialize();
return composite;
}
- private Map getAttributes() {
- return fAttributes;
- }
-
protected void okPressed() {
saveValues();
super.okPressed();
}
private void initialize() {
- Map attr = getAttributes();
+ Map attr = getAdvancedAttributes();
Object varBookkeeping = attr.get( ICDTLaunchConfigurationConstants.ATTR_DEBUGGER_ENABLE_VARIABLE_BOOKKEEPING );
fVarBookKeeping.setSelection( ( varBookkeeping instanceof Boolean ) ? !((Boolean)varBookkeeping).booleanValue() : true );
+ Object regBookkeeping = attr.get( ICDTLaunchConfigurationConstants.ATTR_DEBUGGER_ENABLE_REGISTER_BOOKKEEPING );
+ fRegBookKeeping.setSelection( ( regBookkeeping instanceof Boolean ) ? !((Boolean)regBookkeeping).booleanValue() : true );
}
private void saveValues() {
- Map attr = getAttributes();
+ Map attr = getAdvancedAttributes();
Boolean varBookkeeping = ( fVarBookKeeping.getSelection() ) ? Boolean.FALSE : Boolean.TRUE;
attr.put( ICDTLaunchConfigurationConstants.ATTR_DEBUGGER_ENABLE_VARIABLE_BOOKKEEPING, varBookkeeping );
+ Boolean regBookkeeping = ( fRegBookKeeping.getSelection() ) ? Boolean.FALSE : Boolean.TRUE;
+ attr.put( ICDTLaunchConfigurationConstants.ATTR_DEBUGGER_ENABLE_REGISTER_BOOKKEEPING, regBookkeeping );
updateLaunchConfigurationDialog();
}
@@ -100,14 +106,6 @@ public class CDebuggerTab extends AbstractCDebuggerTab {
super.configureShell( newShell );
newShell.setText( LaunchUIPlugin.getResourceString( "CDebuggerTab.Advanced_Options_Dialog_Title" ) ); //$NON-NLS-1$
}
-
- /* (non-Javadoc)
- * @see org.eclipse.jface.window.Window#close()
- */
- public boolean close() {
- fAttributes.clear();
- return super.close();
- }
}
protected Combo fDCombo;
@@ -191,6 +189,7 @@ public class CDebuggerTab extends AbstractCDebuggerTab {
super.setDefaults( config );
config.setAttribute( ICDTLaunchConfigurationConstants.ATTR_DEBUGGER_STOP_AT_MAIN, ICDTLaunchConfigurationConstants.DEBUGGER_STOP_AT_MAIN_DEFAULT );
config.setAttribute( ICDTLaunchConfigurationConstants.ATTR_DEBUGGER_ENABLE_VARIABLE_BOOKKEEPING, false );
+ config.setAttribute( ICDTLaunchConfigurationConstants.ATTR_DEBUGGER_ENABLE_REGISTER_BOOKKEEPING, false );
config.setAttribute( ICDTLaunchConfigurationConstants.ATTR_DEBUGGER_START_MODE, ICDTLaunchConfigurationConstants.DEBUGGER_MODE_RUN );
}
@@ -349,7 +348,7 @@ public class CDebuggerTab extends AbstractCDebuggerTab {
fAdvancedButton.addSelectionListener( new SelectionAdapter() {
public void widgetSelected( SelectionEvent e ) {
- Dialog dialog = new AdvancedDebuggerOptionsDialog( getShell(), getAdvancedAttributes() );
+ Dialog dialog = new AdvancedDebuggerOptionsDialog( getShell() );
dialog.open();
}
} );
@@ -381,6 +380,12 @@ public class CDebuggerTab extends AbstractCDebuggerTab {
}
catch( CoreException e ) {
}
+ try {
+ Boolean regBookkeeping = ( config.getAttribute( ICDTLaunchConfigurationConstants.ATTR_DEBUGGER_ENABLE_REGISTER_BOOKKEEPING, false ) ) ? Boolean.TRUE : Boolean.FALSE;
+ attr.put( ICDTLaunchConfigurationConstants.ATTR_DEBUGGER_ENABLE_REGISTER_BOOKKEEPING, regBookkeeping );
+ }
+ catch( CoreException e ) {
+ }
}
private void applyAdvancedAttributes( ILaunchConfigurationWorkingCopy config ) {
@@ -388,6 +393,9 @@ public class CDebuggerTab extends AbstractCDebuggerTab {
Object varBookkeeping = attr.get( ICDTLaunchConfigurationConstants.ATTR_DEBUGGER_ENABLE_VARIABLE_BOOKKEEPING );
if ( varBookkeeping instanceof Boolean )
config.setAttribute( ICDTLaunchConfigurationConstants.ATTR_DEBUGGER_ENABLE_VARIABLE_BOOKKEEPING, ((Boolean)varBookkeeping).booleanValue() );
+ Object regBookkeeping = attr.get( ICDTLaunchConfigurationConstants.ATTR_DEBUGGER_ENABLE_REGISTER_BOOKKEEPING );
+ if ( regBookkeeping instanceof Boolean )
+ config.setAttribute( ICDTLaunchConfigurationConstants.ATTR_DEBUGGER_ENABLE_REGISTER_BOOKKEEPING, ((Boolean)regBookkeeping).booleanValue() );
}
protected Shell getShell() {

Back to the top