mirror of
https://github.com/eclipse-cdt/cdt
synced 2025-04-23 14:42:11 +02:00
2005-07-18 Alain Magloire
New combo to choose the MIVersion. * src/org/eclipse/cdt/launch/ui/CDEbuggerTab.java
This commit is contained in:
parent
08278a1193
commit
4f55b5b210
2 changed files with 52 additions and 0 deletions
|
@ -1,3 +1,7 @@
|
||||||
|
2005-07-18 Alain Magloire
|
||||||
|
New combo to choose the MIVersion.
|
||||||
|
* src/org/eclipse/cdt/launch/ui/CDEbuggerTab.java
|
||||||
|
|
||||||
2005-07-14 Mikhail Khodjaiants
|
2005-07-14 Mikhail Khodjaiants
|
||||||
Fix PR 103207: New Icon for the TwoPaneElement in the binary search
|
Fix PR 103207: New Icon for the TwoPaneElement in the binary search
|
||||||
* src/org/eclipse/cdt/launch/ui/CMainTab.java
|
* src/org/eclipse/cdt/launch/ui/CMainTab.java
|
||||||
|
|
|
@ -45,6 +45,7 @@ import org.eclipse.swt.events.SelectionEvent;
|
||||||
import org.eclipse.swt.layout.GridData;
|
import org.eclipse.swt.layout.GridData;
|
||||||
import org.eclipse.swt.layout.GridLayout;
|
import org.eclipse.swt.layout.GridLayout;
|
||||||
import org.eclipse.swt.widgets.Button;
|
import org.eclipse.swt.widgets.Button;
|
||||||
|
import org.eclipse.swt.widgets.Combo;
|
||||||
import org.eclipse.swt.widgets.Composite;
|
import org.eclipse.swt.widgets.Composite;
|
||||||
import org.eclipse.swt.widgets.Control;
|
import org.eclipse.swt.widgets.Control;
|
||||||
import org.eclipse.swt.widgets.Group;
|
import org.eclipse.swt.widgets.Group;
|
||||||
|
@ -58,6 +59,9 @@ public class CDebuggerTab extends AbstractCDebuggerTab {
|
||||||
|
|
||||||
private Button fRegBookKeeping;
|
private Button fRegBookKeeping;
|
||||||
|
|
||||||
|
final String[] protocolItems = new String[] { "mi", "mi1", "mi2", "mi3" }; //$NON-NLS-1$//$NON-NLS-2$//$NON-NLS-3$ //$NON-NLS-4$
|
||||||
|
private Combo fPCombo;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Constructor for AdvancedDebuggerOptionsDialog.
|
* Constructor for AdvancedDebuggerOptionsDialog.
|
||||||
*/
|
*/
|
||||||
|
@ -81,10 +85,25 @@ public class CDebuggerTab extends AbstractCDebuggerTab {
|
||||||
fVarBookKeeping.setText(LaunchMessages.getString("CDebuggerTab.Variables")); //$NON-NLS-1$
|
fVarBookKeeping.setText(LaunchMessages.getString("CDebuggerTab.Variables")); //$NON-NLS-1$
|
||||||
fRegBookKeeping = new Button(group, SWT.CHECK);
|
fRegBookKeeping = new Button(group, SWT.CHECK);
|
||||||
fRegBookKeeping.setText(LaunchMessages.getString("CDebuggerTab.Registers")); //$NON-NLS-1$
|
fRegBookKeeping.setText(LaunchMessages.getString("CDebuggerTab.Registers")); //$NON-NLS-1$
|
||||||
|
createProtocolCombo(composite, 2);
|
||||||
initialize();
|
initialize();
|
||||||
return composite;
|
return composite;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
protected void createProtocolCombo(Composite parent, int colspan) {
|
||||||
|
Group comboComp = new Group(parent, SWT.NONE);
|
||||||
|
comboComp.setText("Protocol");
|
||||||
|
GridLayout layout = new GridLayout(2, false);
|
||||||
|
comboComp.setLayout(layout);
|
||||||
|
GridData gd = new GridData(GridData.FILL_HORIZONTAL);
|
||||||
|
gd.horizontalSpan = colspan;
|
||||||
|
comboComp.setLayoutData(gd);
|
||||||
|
fPCombo = new Combo(comboComp, SWT.READ_ONLY | SWT.DROP_DOWN);
|
||||||
|
fPCombo.setLayoutData(new GridData(GridData.FILL_HORIZONTAL));
|
||||||
|
fPCombo.setItems(protocolItems);
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
protected void okPressed() {
|
protected void okPressed() {
|
||||||
saveValues();
|
saveValues();
|
||||||
super.okPressed();
|
super.okPressed();
|
||||||
|
@ -96,6 +115,19 @@ public class CDebuggerTab extends AbstractCDebuggerTab {
|
||||||
fVarBookKeeping.setSelection( (varBookkeeping instanceof Boolean) ? ! ((Boolean)varBookkeeping).booleanValue() : true);
|
fVarBookKeeping.setSelection( (varBookkeeping instanceof Boolean) ? ! ((Boolean)varBookkeeping).booleanValue() : true);
|
||||||
Object regBookkeeping = attr.get(ICDTLaunchConfigurationConstants.ATTR_DEBUGGER_ENABLE_REGISTER_BOOKKEEPING);
|
Object regBookkeeping = attr.get(ICDTLaunchConfigurationConstants.ATTR_DEBUGGER_ENABLE_REGISTER_BOOKKEEPING);
|
||||||
fRegBookKeeping.setSelection( (regBookkeeping instanceof Boolean) ? ! ((Boolean)regBookkeeping).booleanValue() : true);
|
fRegBookKeeping.setSelection( (regBookkeeping instanceof Boolean) ? ! ((Boolean)regBookkeeping).booleanValue() : true);
|
||||||
|
Object protocol = attr.get(ICDTLaunchConfigurationConstants.ATTR_DEBUGGER_PROTOCOL);
|
||||||
|
int index = 0;
|
||||||
|
if (protocol instanceof String) {
|
||||||
|
String p = (String)protocol;
|
||||||
|
if (p != null && p.length() > 0) {
|
||||||
|
for (int i = 0; i < protocolItems.length; ++i) {
|
||||||
|
if (protocolItems[i].equals(p)) {
|
||||||
|
index = i;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
fPCombo.select(index);
|
||||||
}
|
}
|
||||||
|
|
||||||
private void saveValues() {
|
private void saveValues() {
|
||||||
|
@ -104,6 +136,10 @@ 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 = (fRegBookKeeping.getSelection()) ? Boolean.FALSE : Boolean.TRUE;
|
Boolean regBookkeeping = (fRegBookKeeping.getSelection()) ? Boolean.FALSE : Boolean.TRUE;
|
||||||
attr.put(ICDTLaunchConfigurationConstants.ATTR_DEBUGGER_ENABLE_REGISTER_BOOKKEEPING, regBookkeeping);
|
attr.put(ICDTLaunchConfigurationConstants.ATTR_DEBUGGER_ENABLE_REGISTER_BOOKKEEPING, regBookkeeping);
|
||||||
|
String protocol = fPCombo.getText();
|
||||||
|
if (protocol != null && protocol.length() > 0) {
|
||||||
|
attr.put(ICDTLaunchConfigurationConstants.ATTR_DEBUGGER_PROTOCOL, protocol);
|
||||||
|
}
|
||||||
updateLaunchConfigurationDialog();
|
updateLaunchConfigurationDialog();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -386,6 +422,11 @@ public class CDebuggerTab extends AbstractCDebuggerTab {
|
||||||
attr.put(ICDTLaunchConfigurationConstants.ATTR_DEBUGGER_ENABLE_REGISTER_BOOKKEEPING, regBookkeeping);
|
attr.put(ICDTLaunchConfigurationConstants.ATTR_DEBUGGER_ENABLE_REGISTER_BOOKKEEPING, regBookkeeping);
|
||||||
} catch (CoreException e) {
|
} catch (CoreException e) {
|
||||||
}
|
}
|
||||||
|
try {
|
||||||
|
String protocol = config.getAttribute(ICDTLaunchConfigurationConstants.ATTR_DEBUGGER_PROTOCOL, "mi"); //$NON-NLS-1$
|
||||||
|
attr.put(ICDTLaunchConfigurationConstants.ATTR_DEBUGGER_PROTOCOL, protocol);
|
||||||
|
} catch (CoreException e) {
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
private void applyAdvancedAttributes(ILaunchConfigurationWorkingCopy config) {
|
private void applyAdvancedAttributes(ILaunchConfigurationWorkingCopy config) {
|
||||||
|
@ -398,6 +439,13 @@ public class CDebuggerTab extends AbstractCDebuggerTab {
|
||||||
if (regBookkeeping instanceof Boolean)
|
if (regBookkeeping instanceof Boolean)
|
||||||
config.setAttribute(ICDTLaunchConfigurationConstants.ATTR_DEBUGGER_ENABLE_REGISTER_BOOKKEEPING,
|
config.setAttribute(ICDTLaunchConfigurationConstants.ATTR_DEBUGGER_ENABLE_REGISTER_BOOKKEEPING,
|
||||||
((Boolean)regBookkeeping).booleanValue());
|
((Boolean)regBookkeeping).booleanValue());
|
||||||
|
Object protocol = attr.get(ICDTLaunchConfigurationConstants.ATTR_DEBUGGER_PROTOCOL);
|
||||||
|
if (protocol instanceof String) {
|
||||||
|
String p = (String)protocol;
|
||||||
|
if (p != null && p.length() > 0) {
|
||||||
|
config.setAttribute(ICDTLaunchConfigurationConstants.ATTR_DEBUGGER_PROTOCOL, p);
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
protected Shell getShell() {
|
protected Shell getShell() {
|
||||||
|
|
Loading…
Add table
Reference in a new issue