Skip to main content
aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAlain Magloire2005-07-19 00:29:23 +0000
committerAlain Magloire2005-07-19 00:29:23 +0000
commit4f55b5b2101b35b76c839e05a8d6f63f618c13af (patch)
treed0c06c5b625a6425cb38dca69d9e5a473ad6f373 /launch/org.eclipse.cdt.launch
parent08278a1193e64316b3425edcc8617e756acc95a2 (diff)
downloadorg.eclipse.cdt-4f55b5b2101b35b76c839e05a8d6f63f618c13af.tar.gz
org.eclipse.cdt-4f55b5b2101b35b76c839e05a8d6f63f618c13af.tar.xz
org.eclipse.cdt-4f55b5b2101b35b76c839e05a8d6f63f618c13af.zip
2005-07-18 Alain Magloire
New combo to choose the MIVersion. * src/org/eclipse/cdt/launch/ui/CDEbuggerTab.java
Diffstat (limited to 'launch/org.eclipse.cdt.launch')
-rw-r--r--launch/org.eclipse.cdt.launch/ChangeLog4
-rw-r--r--launch/org.eclipse.cdt.launch/src/org/eclipse/cdt/launch/ui/CDebuggerTab.java48
2 files changed, 52 insertions, 0 deletions
diff --git a/launch/org.eclipse.cdt.launch/ChangeLog b/launch/org.eclipse.cdt.launch/ChangeLog
index 5514f0f671f..b57c05a31f6 100644
--- a/launch/org.eclipse.cdt.launch/ChangeLog
+++ b/launch/org.eclipse.cdt.launch/ChangeLog
@@ -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
Fix PR 103207: New Icon for the TwoPaneElement in the binary search
* src/org/eclipse/cdt/launch/ui/CMainTab.java
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 078a89a2dd8..feb7a3b9156 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
@@ -45,6 +45,7 @@ import org.eclipse.swt.events.SelectionEvent;
import org.eclipse.swt.layout.GridData;
import org.eclipse.swt.layout.GridLayout;
import org.eclipse.swt.widgets.Button;
+import org.eclipse.swt.widgets.Combo;
import org.eclipse.swt.widgets.Composite;
import org.eclipse.swt.widgets.Control;
import org.eclipse.swt.widgets.Group;
@@ -58,6 +59,9 @@ public class CDebuggerTab extends AbstractCDebuggerTab {
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.
*/
@@ -81,10 +85,25 @@ public class CDebuggerTab extends AbstractCDebuggerTab {
fVarBookKeeping.setText(LaunchMessages.getString("CDebuggerTab.Variables")); //$NON-NLS-1$
fRegBookKeeping = new Button(group, SWT.CHECK);
fRegBookKeeping.setText(LaunchMessages.getString("CDebuggerTab.Registers")); //$NON-NLS-1$
+ createProtocolCombo(composite, 2);
initialize();
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() {
saveValues();
super.okPressed();
@@ -96,6 +115,19 @@ public class CDebuggerTab extends AbstractCDebuggerTab {
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);
+ 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() {
@@ -104,6 +136,10 @@ public class CDebuggerTab extends AbstractCDebuggerTab {
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);
+ String protocol = fPCombo.getText();
+ if (protocol != null && protocol.length() > 0) {
+ attr.put(ICDTLaunchConfigurationConstants.ATTR_DEBUGGER_PROTOCOL, protocol);
+ }
updateLaunchConfigurationDialog();
}
@@ -386,6 +422,11 @@ public class CDebuggerTab extends AbstractCDebuggerTab {
attr.put(ICDTLaunchConfigurationConstants.ATTR_DEBUGGER_ENABLE_REGISTER_BOOKKEEPING, regBookkeeping);
} 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) {
@@ -398,6 +439,13 @@ public class CDebuggerTab extends AbstractCDebuggerTab {
if (regBookkeeping instanceof Boolean)
config.setAttribute(ICDTLaunchConfigurationConstants.ATTR_DEBUGGER_ENABLE_REGISTER_BOOKKEEPING,
((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() {

Back to the top