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

Cosmetics.

This commit is contained in:
Sergey Prigogin 2011-05-25 22:04:52 +00:00
parent f5fb221fa2
commit 165d5a38af

View file

@ -6,10 +6,10 @@
* http://www.eclipse.org/legal/epl-v10.html * http://www.eclipse.org/legal/epl-v10.html
* *
* Contributors: * Contributors:
* QNX Software Systems - Initial API and implementation * QNX Software Systems - Initial API and implementation
* Ken Ryall (Nokia) - https://bugs.eclipse.org/bugs/show_bug.cgi?id=118894 * Ken Ryall (Nokia) - https://bugs.eclipse.org/bugs/show_bug.cgi?id=118894
* IBM Corporation * IBM Corporation
* Ericsson * Ericsson
*******************************************************************************/ *******************************************************************************/
package org.eclipse.cdt.dsf.gdb.internal.ui.launching; package org.eclipse.cdt.dsf.gdb.internal.ui.launching;
@ -54,8 +54,8 @@ import org.eclipse.swt.widgets.Text;
public class CDebuggerTab extends CLaunchConfigurationTab { public class CDebuggerTab extends CLaunchConfigurationTab {
/** /**
* Tab identifier used for ordering of tabs added using the * Tab identifier used for ordering of tabs added using
* <code>org.eclipse.debug.ui.launchConfigurationTabs</code> * the <code>org.eclipse.debug.ui.launchConfigurationTabs</code>
* extension point. * extension point.
* *
* @since 2.0 * @since 2.0
@ -218,7 +218,8 @@ public class CDebuggerTab extends CLaunchConfigurationTab {
config.setAttribute(ICDTLaunchConfigurationConstants.ATTR_DEBUGGER_ID, getDebuggerId()); config.setAttribute(ICDTLaunchConfigurationConstants.ATTR_DEBUGGER_ID, getDebuggerId());
ICDebuggerPage dynamicTab = getDynamicTab(); ICDebuggerPage dynamicTab = getDynamicTab();
if (dynamicTab == null) { if (dynamicTab == null) {
config.setAttribute(ICDTLaunchConfigurationConstants.ATTR_DEBUGGER_SPECIFIC_ATTRS_MAP, (Map<?,?>)null); config.setAttribute(ICDTLaunchConfigurationConstants.ATTR_DEBUGGER_SPECIFIC_ATTRS_MAP,
(Map<?, ?>) null);
} else { } else {
dynamicTab.performApply(config); dynamicTab.performApply(config);
} }
@ -359,10 +360,9 @@ public class CDebuggerTab extends CLaunchConfigurationTab {
ICDTLaunchConfigurationConstants.DEBUGGER_STOP_AT_MAIN_SYMBOL_DEFAULT)); ICDTLaunchConfigurationConstants.DEBUGGER_STOP_AT_MAIN_SYMBOL_DEFAULT));
fStopInMainSymbol.setEnabled(fStopInMain.getSelection()); fStopInMainSymbol.setEnabled(fStopInMain.getSelection());
} else if (fAttachMode) { } else if (fAttachMode) {
// In attach mode, figure out if we are doing a remote connect based on the currently // In attach mode, figure out if we are doing a remote connect based on
// chosen debugger // the currently chosen debugger.
if (getDebuggerId().equals(REMOTE_DEBUGGER_ID)) fRemoteMode = true; fRemoteMode = getDebuggerId().equals(REMOTE_DEBUGGER_ID);
else fRemoteMode = false;
} }
} catch (CoreException e) { } catch (CoreException e) {
} }
@ -427,11 +427,11 @@ public class CDebuggerTab extends CLaunchConfigurationTab {
} }
protected void setDynamicTab(ICDebuggerPage tab) { protected void setDynamicTab(ICDebuggerPage tab) {
if ( fDynamicTab instanceof ICDebuggerPageExtension ) if (fDynamicTab instanceof ICDebuggerPageExtension)
((ICDebuggerPageExtension)fDynamicTab).removeContentChangeListener( fContentListener ); ((ICDebuggerPageExtension) fDynamicTab).removeContentChangeListener(fContentListener);
fDynamicTab = tab; fDynamicTab = tab;
if ( fDynamicTab instanceof ICDebuggerPageExtension ) if (fDynamicTab instanceof ICDebuggerPageExtension)
((ICDebuggerPageExtension)fDynamicTab).addContentChangeListener( fContentListener ); ((ICDebuggerPageExtension) fDynamicTab).addContentChangeListener(fContentListener);
} }
protected Composite getDynamicTabHolder() { protected Composite getDynamicTabHolder() {
@ -468,7 +468,7 @@ public class CDebuggerTab extends CLaunchConfigurationTab {
@Override @Override
public String getErrorMessage() { public String getErrorMessage() {
ICDebuggerPage tab = getDynamicTab(); ICDebuggerPage tab = getDynamicTab();
if ( (super.getErrorMessage() != null) || (tab == null)) { if (super.getErrorMessage() != null || tab == null) {
return super.getErrorMessage(); return super.getErrorMessage();
} }
return tab.getErrorMessage(); return tab.getErrorMessage();
@ -483,25 +483,25 @@ public class CDebuggerTab extends CLaunchConfigurationTab {
// Always set the newly created area with defaults // Always set the newly created area with defaults
ILaunchConfigurationWorkingCopy wc = getLaunchConfigurationWorkingCopy(); ILaunchConfigurationWorkingCopy wc = getLaunchConfigurationWorkingCopy();
if (getDynamicTab() == null) { if (getDynamicTab() == null) {
// Remove any debug specific args from the config // Remove any debug-specific arguments from the configuration.
if (wc == null) { if (wc == null) {
if (getLaunchConfiguration().isWorkingCopy()) { if (getLaunchConfiguration().isWorkingCopy()) {
wc = (ILaunchConfigurationWorkingCopy)getLaunchConfiguration(); wc = (ILaunchConfigurationWorkingCopy) getLaunchConfiguration();
} }
} }
if (wc != null) { if (wc != null) {
wc.setAttribute(ICDTLaunchConfigurationConstants.ATTR_DEBUGGER_SPECIFIC_ATTRS_MAP, (Map<?,?>)null); wc.setAttribute(ICDTLaunchConfigurationConstants.ATTR_DEBUGGER_SPECIFIC_ATTRS_MAP,
(Map<?, ?>) null);
} }
} else { } else {
if (wc == null) { if (wc == null) {
try { try {
if (getLaunchConfiguration().isWorkingCopy()) { if (getLaunchConfiguration().isWorkingCopy()) {
setLaunchConfigurationWorkingCopy((ILaunchConfigurationWorkingCopy)getLaunchConfiguration()); setLaunchConfigurationWorkingCopy((ILaunchConfigurationWorkingCopy) getLaunchConfiguration());
} else { } else {
setLaunchConfigurationWorkingCopy(getLaunchConfiguration().getWorkingCopy()); setLaunchConfigurationWorkingCopy(getLaunchConfiguration().getWorkingCopy());
} }
wc = getLaunchConfigurationWorkingCopy(); wc = getLaunchConfigurationWorkingCopy();
} catch (CoreException e) { } catch (CoreException e) {
return; return;
} }