1
0
Fork 0
mirror of https://github.com/eclipse-cdt/cdt synced 2025-06-07 09:46:02 +02:00

Bug 120509: CDebuggerTab invokes wong initialization code (in addition to right code).

This commit is contained in:
Mikhail Khodjaiants 2006-01-06 20:38:51 +00:00
parent d87a35dc00
commit 3646c58a41
3 changed files with 13 additions and 8 deletions

View file

@ -1,3 +1,8 @@
2006-01-06 Mikhail Khodjaiants
Bug 120509: CDebuggerTab invokes wong initialization code (in addition to right code).
* CDebuggerTab.java
* CoreFileDebuggerTab.java
2006-01-06 Mikhail Khodjaiants 2006-01-06 Mikhail Khodjaiants
Cleanup. Cleanup.
* CArgumentsTab.java * CArgumentsTab.java

View file

@ -101,7 +101,7 @@ public class CDebuggerTab extends AbstractCDebuggerTab {
attr.put(ICDTLaunchConfigurationConstants.ATTR_DEBUGGER_ENABLE_VARIABLE_BOOKKEEPING, varBookkeeping); attr.put(ICDTLaunchConfigurationConstants.ATTR_DEBUGGER_ENABLE_VARIABLE_BOOKKEEPING, varBookkeeping);
Boolean regBookkeeping = Boolean.valueOf( fRegBookKeeping.getSelection() ); Boolean regBookkeeping = Boolean.valueOf( fRegBookKeeping.getSelection() );
attr.put(ICDTLaunchConfigurationConstants.ATTR_DEBUGGER_ENABLE_REGISTER_BOOKKEEPING, regBookkeeping); attr.put(ICDTLaunchConfigurationConstants.ATTR_DEBUGGER_ENABLE_REGISTER_BOOKKEEPING, regBookkeeping);
updateLaunchConfigurationDialog(); update();
} }
/* /*
@ -321,8 +321,10 @@ public class CDebuggerTab extends AbstractCDebuggerTab {
/** /**
* @see org.eclipse.debug.ui.AbstractLaunchConfigurationTab#updateLaunchConfigurationDialog() * @see org.eclipse.debug.ui.AbstractLaunchConfigurationTab#updateLaunchConfigurationDialog()
*/ */
protected void updateLaunchConfigurationDialog() { protected void update() {
super.updateLaunchConfigurationDialog(); if (!isInitializing()) {
super.updateLaunchConfigurationDialog();
}
} }
protected void createOptionsComposite(Composite parent) { protected void createOptionsComposite(Composite parent) {
@ -336,9 +338,7 @@ public class CDebuggerTab extends AbstractCDebuggerTab {
fStopInMain.addSelectionListener(new SelectionAdapter() { fStopInMain.addSelectionListener(new SelectionAdapter() {
public void widgetSelected(SelectionEvent e) { public void widgetSelected(SelectionEvent e) {
if (!isInitializing()) { update();
updateLaunchConfigurationDialog();
}
} }
}); });
} }

View file

@ -79,7 +79,7 @@ public class CoreFileDebuggerTab extends AbstractCDebuggerTab {
public void initializeFrom(ILaunchConfiguration config) { public void initializeFrom(ILaunchConfiguration config) {
setInitializing(true); setInitializing(true);
super.initializeFrom(config); setLaunchConfiguration(config);
try { try {
String id = config.getAttribute(ICDTLaunchConfigurationConstants.ATTR_DEBUGGER_ID, ""); //$NON-NLS-1$ String id = config.getAttribute(ICDTLaunchConfigurationConstants.ATTR_DEBUGGER_ID, ""); //$NON-NLS-1$
loadDebuggerComboBox(config, id); loadDebuggerComboBox(config, id);
@ -138,7 +138,7 @@ public class CoreFileDebuggerTab extends AbstractCDebuggerTab {
// select first exact matching debugger for platform or // select first exact matching debugger for platform or
// requested selection // requested selection
String debuggerPlatform = debugConfigs[i].getPlatform(); String debuggerPlatform = debugConfigs[i].getPlatform();
if (defaultSelection == null && debuggerPlatform.equalsIgnoreCase(projectPlatform)) { //$NON-NLS-1$ if (defaultSelection == null && debuggerPlatform.equalsIgnoreCase(projectPlatform)) {
defaultSelection = debugConfigs[i].getID(); defaultSelection = debugConfigs[i].getID();
} }
} }