mirror of
https://github.com/eclipse-cdt/cdt
synced 2025-04-29 19:45:01 +02:00
Cosmetics.
This commit is contained in:
parent
f5fb221fa2
commit
165d5a38af
1 changed files with 43 additions and 43 deletions
|
@ -6,10 +6,10 @@
|
|||
* http://www.eclipse.org/legal/epl-v10.html
|
||||
*
|
||||
* Contributors:
|
||||
* QNX Software Systems - Initial API and implementation
|
||||
* Ken Ryall (Nokia) - https://bugs.eclipse.org/bugs/show_bug.cgi?id=118894
|
||||
* IBM Corporation
|
||||
* Ericsson
|
||||
* QNX Software Systems - Initial API and implementation
|
||||
* Ken Ryall (Nokia) - https://bugs.eclipse.org/bugs/show_bug.cgi?id=118894
|
||||
* IBM Corporation
|
||||
* Ericsson
|
||||
*******************************************************************************/
|
||||
package org.eclipse.cdt.dsf.gdb.internal.ui.launching;
|
||||
|
||||
|
@ -54,17 +54,17 @@ import org.eclipse.swt.widgets.Text;
|
|||
|
||||
public class CDebuggerTab extends CLaunchConfigurationTab {
|
||||
/**
|
||||
* Tab identifier used for ordering of tabs added using the
|
||||
* <code>org.eclipse.debug.ui.launchConfigurationTabs</code>
|
||||
* Tab identifier used for ordering of tabs added using
|
||||
* the <code>org.eclipse.debug.ui.launchConfigurationTabs</code>
|
||||
* extension point.
|
||||
*
|
||||
*
|
||||
* @since 2.0
|
||||
*/
|
||||
public static final String TAB_ID = "org.eclipse.cdt.dsf.gdb.launch.debuggerTab"; //$NON-NLS-1$
|
||||
|
||||
private final static String LOCAL_DEBUGGER_ID = "gdb";//$NON-NLS-1$
|
||||
private final static String REMOTE_DEBUGGER_ID = "gdbserver";//$NON-NLS-1$
|
||||
|
||||
|
||||
protected ILaunchConfiguration fLaunchConfiguration;
|
||||
protected ILaunchConfigurationWorkingCopy fWorkingCopy;
|
||||
protected String fDebuggerId;
|
||||
|
@ -75,14 +75,14 @@ public class CDebuggerTab extends CLaunchConfigurationTab {
|
|||
private boolean fInitDefaults;
|
||||
private Combo fDCombo;
|
||||
private boolean fIsInitializing;
|
||||
|
||||
|
||||
protected boolean fAttachMode;
|
||||
protected boolean fRemoteMode;
|
||||
protected boolean fCoreMode;
|
||||
|
||||
|
||||
protected Button fStopInMain;
|
||||
protected Text fStopInMainSymbol;
|
||||
|
||||
|
||||
private ScrolledComposite fContainer;
|
||||
|
||||
private Composite fContents;
|
||||
|
@ -92,7 +92,7 @@ public class CDebuggerTab extends CLaunchConfigurationTab {
|
|||
contentsChanged();
|
||||
}
|
||||
};
|
||||
|
||||
|
||||
public CDebuggerTab(SessionType sessionType, boolean attach) {
|
||||
if (sessionType == SessionType.REMOTE) {
|
||||
fRemoteMode = true;
|
||||
|
@ -100,7 +100,7 @@ public class CDebuggerTab extends CLaunchConfigurationTab {
|
|||
fCoreMode = true;
|
||||
}
|
||||
fAttachMode = attach;
|
||||
|
||||
|
||||
ICDebugConfiguration dc = CDebugCorePlugin.getDefault().getDefaultDefaultDebugConfiguration();
|
||||
if (dc == null) {
|
||||
CDebugCorePlugin.getDefault().getPluginPreferences().setDefault(ICDebugConstants.PREF_DEFAULT_DEBUGGER_TYPE,
|
||||
|
@ -119,7 +119,7 @@ public class CDebuggerTab extends CLaunchConfigurationTab {
|
|||
fContainer.setLayout(new FillLayout());
|
||||
fContainer.setExpandHorizontal(true);
|
||||
fContainer.setExpandVertical(true);
|
||||
|
||||
|
||||
fContents = new Composite(fContainer, SWT.NONE);
|
||||
setControl(fContainer);
|
||||
GdbUIPlugin.getDefault().getWorkbench().getHelpSystem().setHelp(getControl(),
|
||||
|
@ -133,10 +133,10 @@ public class CDebuggerTab extends CLaunchConfigurationTab {
|
|||
if (fAttachMode) {
|
||||
createDebuggerCombo(fContents);
|
||||
}
|
||||
|
||||
|
||||
createOptionsComposite(fContents);
|
||||
createDebuggerGroup(fContents, 2);
|
||||
|
||||
|
||||
fContainer.setContent(fContents);
|
||||
}
|
||||
|
||||
|
@ -166,7 +166,7 @@ public class CDebuggerTab extends CLaunchConfigurationTab {
|
|||
dynamicTab.setDefaults(config);
|
||||
setInitializeDefault(false);
|
||||
}
|
||||
|
||||
|
||||
if (fAttachMode && fRemoteMode) {
|
||||
config.setAttribute(ICDTLaunchConfigurationConstants.ATTR_DEBUGGER_START_MODE,
|
||||
IGDBLaunchConfigurationConstants.DEBUGGER_MODE_REMOTE_ATTACH);
|
||||
|
@ -188,7 +188,7 @@ public class CDebuggerTab extends CLaunchConfigurationTab {
|
|||
ICDTLaunchConfigurationConstants.DEBUGGER_MODE_RUN);
|
||||
config.setAttribute(ICDTLaunchConfigurationConstants.ATTR_DEBUGGER_ID, LOCAL_DEBUGGER_ID);
|
||||
}
|
||||
|
||||
|
||||
if (!fAttachMode && !fCoreMode) {
|
||||
config.setAttribute(ICDTLaunchConfigurationConstants.ATTR_DEBUGGER_STOP_AT_MAIN,
|
||||
ICDTLaunchConfigurationConstants.DEBUGGER_STOP_AT_MAIN_DEFAULT);
|
||||
|
@ -218,12 +218,13 @@ public class CDebuggerTab extends CLaunchConfigurationTab {
|
|||
config.setAttribute(ICDTLaunchConfigurationConstants.ATTR_DEBUGGER_ID, getDebuggerId());
|
||||
ICDebuggerPage dynamicTab = getDynamicTab();
|
||||
if (dynamicTab == null) {
|
||||
config.setAttribute(ICDTLaunchConfigurationConstants.ATTR_DEBUGGER_SPECIFIC_ATTRS_MAP, (Map<?,?>)null);
|
||||
config.setAttribute(ICDTLaunchConfigurationConstants.ATTR_DEBUGGER_SPECIFIC_ATTRS_MAP,
|
||||
(Map<?, ?>) null);
|
||||
} else {
|
||||
dynamicTab.performApply(config);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
if (fAttachMode && fRemoteMode) {
|
||||
config.setAttribute(ICDTLaunchConfigurationConstants.ATTR_DEBUGGER_START_MODE,
|
||||
IGDBLaunchConfigurationConstants.DEBUGGER_MODE_REMOTE_ATTACH);
|
||||
|
@ -243,7 +244,7 @@ public class CDebuggerTab extends CLaunchConfigurationTab {
|
|||
if (!fAttachMode && !fCoreMode) {
|
||||
config.setAttribute(ICDTLaunchConfigurationConstants.ATTR_DEBUGGER_STOP_AT_MAIN,
|
||||
fStopInMain.getSelection());
|
||||
config.setAttribute(ICDTLaunchConfigurationConstants.ATTR_DEBUGGER_STOP_AT_MAIN_SYMBOL,
|
||||
config.setAttribute(ICDTLaunchConfigurationConstants.ATTR_DEBUGGER_STOP_AT_MAIN_SYMBOL,
|
||||
fStopInMainSymbol.getText());
|
||||
}
|
||||
}
|
||||
|
@ -261,7 +262,7 @@ public class CDebuggerTab extends CLaunchConfigurationTab {
|
|||
return false;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
setErrorMessage(null);
|
||||
setMessage(null);
|
||||
if (getDebuggerId() == null) {
|
||||
|
@ -322,7 +323,7 @@ public class CDebuggerTab extends CLaunchConfigurationTab {
|
|||
}
|
||||
});
|
||||
fStopInMainSymbol.getAccessible().addAccessibleListener(
|
||||
new AccessibleAdapter() {
|
||||
new AccessibleAdapter() {
|
||||
@Override
|
||||
public void getName(AccessibleEvent e) {
|
||||
e.result = LaunchMessages.getString("CDebuggerTab.Stop_at_main_on_startup"); //$NON-NLS-1$
|
||||
|
@ -339,7 +340,7 @@ public class CDebuggerTab extends CLaunchConfigurationTab {
|
|||
|
||||
/*
|
||||
* (non-Javadoc)
|
||||
*
|
||||
*
|
||||
* @see org.eclipse.debug.ui.ILaunchConfigurationTab#dispose()
|
||||
*/
|
||||
@Override
|
||||
|
@ -359,10 +360,9 @@ public class CDebuggerTab extends CLaunchConfigurationTab {
|
|||
ICDTLaunchConfigurationConstants.DEBUGGER_STOP_AT_MAIN_SYMBOL_DEFAULT));
|
||||
fStopInMainSymbol.setEnabled(fStopInMain.getSelection());
|
||||
} else if (fAttachMode) {
|
||||
// In attach mode, figure out if we are doing a remote connect based on the currently
|
||||
// chosen debugger
|
||||
if (getDebuggerId().equals(REMOTE_DEBUGGER_ID)) fRemoteMode = true;
|
||||
else fRemoteMode = false;
|
||||
// In attach mode, figure out if we are doing a remote connect based on
|
||||
// the currently chosen debugger.
|
||||
fRemoteMode = getDebuggerId().equals(REMOTE_DEBUGGER_ID);
|
||||
}
|
||||
} catch (CoreException e) {
|
||||
}
|
||||
|
@ -371,11 +371,11 @@ public class CDebuggerTab extends CLaunchConfigurationTab {
|
|||
protected void setInitializeDefault(boolean init) {
|
||||
fInitDefaults = init;
|
||||
}
|
||||
|
||||
|
||||
protected void contentsChanged() {
|
||||
fContainer.setMinSize(fContents.computeSize(SWT.DEFAULT, SWT.DEFAULT));
|
||||
}
|
||||
|
||||
|
||||
protected void loadDynamicDebugArea() {
|
||||
Composite dynamicTabHolder = getDynamicTabHolder();
|
||||
// Dispose of any current child widgets in the tab holder area
|
||||
|
@ -413,7 +413,7 @@ public class CDebuggerTab extends CLaunchConfigurationTab {
|
|||
dynamicTabHolder.layout(true);
|
||||
contentsChanged();
|
||||
}
|
||||
|
||||
|
||||
protected void setDebuggerId(String id) {
|
||||
fDebuggerId = id;
|
||||
}
|
||||
|
@ -427,11 +427,11 @@ public class CDebuggerTab extends CLaunchConfigurationTab {
|
|||
}
|
||||
|
||||
protected void setDynamicTab(ICDebuggerPage tab) {
|
||||
if ( fDynamicTab instanceof ICDebuggerPageExtension )
|
||||
((ICDebuggerPageExtension)fDynamicTab).removeContentChangeListener( fContentListener );
|
||||
if (fDynamicTab instanceof ICDebuggerPageExtension)
|
||||
((ICDebuggerPageExtension) fDynamicTab).removeContentChangeListener(fContentListener);
|
||||
fDynamicTab = tab;
|
||||
if ( fDynamicTab instanceof ICDebuggerPageExtension )
|
||||
((ICDebuggerPageExtension)fDynamicTab).addContentChangeListener( fContentListener );
|
||||
if (fDynamicTab instanceof ICDebuggerPageExtension)
|
||||
((ICDebuggerPageExtension) fDynamicTab).addContentChangeListener(fContentListener);
|
||||
}
|
||||
|
||||
protected Composite getDynamicTabHolder() {
|
||||
|
@ -462,13 +462,13 @@ public class CDebuggerTab extends CLaunchConfigurationTab {
|
|||
/**
|
||||
* Overridden here so that any error message in the dynamic UI gets
|
||||
* returned.
|
||||
*
|
||||
*
|
||||
* @see ILaunchConfigurationTab#getErrorMessage()
|
||||
*/
|
||||
@Override
|
||||
public String getErrorMessage() {
|
||||
ICDebuggerPage tab = getDynamicTab();
|
||||
if ( (super.getErrorMessage() != null) || (tab == null)) {
|
||||
if (super.getErrorMessage() != null || tab == null) {
|
||||
return super.getErrorMessage();
|
||||
}
|
||||
return tab.getErrorMessage();
|
||||
|
@ -483,25 +483,25 @@ public class CDebuggerTab extends CLaunchConfigurationTab {
|
|||
// Always set the newly created area with defaults
|
||||
ILaunchConfigurationWorkingCopy wc = getLaunchConfigurationWorkingCopy();
|
||||
if (getDynamicTab() == null) {
|
||||
// Remove any debug specific args from the config
|
||||
// Remove any debug-specific arguments from the configuration.
|
||||
if (wc == null) {
|
||||
if (getLaunchConfiguration().isWorkingCopy()) {
|
||||
wc = (ILaunchConfigurationWorkingCopy)getLaunchConfiguration();
|
||||
wc = (ILaunchConfigurationWorkingCopy) getLaunchConfiguration();
|
||||
}
|
||||
}
|
||||
if (wc != null) {
|
||||
wc.setAttribute(ICDTLaunchConfigurationConstants.ATTR_DEBUGGER_SPECIFIC_ATTRS_MAP, (Map<?,?>)null);
|
||||
wc.setAttribute(ICDTLaunchConfigurationConstants.ATTR_DEBUGGER_SPECIFIC_ATTRS_MAP,
|
||||
(Map<?, ?>) null);
|
||||
}
|
||||
} else {
|
||||
if (wc == null) {
|
||||
try {
|
||||
if (getLaunchConfiguration().isWorkingCopy()) {
|
||||
setLaunchConfigurationWorkingCopy((ILaunchConfigurationWorkingCopy)getLaunchConfiguration());
|
||||
setLaunchConfigurationWorkingCopy((ILaunchConfigurationWorkingCopy) getLaunchConfiguration());
|
||||
} else {
|
||||
setLaunchConfigurationWorkingCopy(getLaunchConfiguration().getWorkingCopy());
|
||||
}
|
||||
wc = getLaunchConfigurationWorkingCopy();
|
||||
|
||||
} catch (CoreException e) {
|
||||
return;
|
||||
}
|
||||
|
@ -562,7 +562,7 @@ public class CDebuggerTab extends CLaunchConfigurationTab {
|
|||
if (fDCombo == null) {
|
||||
return;
|
||||
}
|
||||
|
||||
|
||||
fDCombo.removeAll();
|
||||
int select = -1;
|
||||
for (int i = 0; i < names.length; i++) {
|
||||
|
|
Loading…
Add table
Reference in a new issue