debuggercdi/com.nokia.cdt.debug.launch/src/com/nokia/cdt/internal/debug/launch/ui/RunModeDebuggerTab.java
changeset 1978 9e45f0e58c6e
parent 0 fb279309251b
--- a/debuggercdi/com.nokia.cdt.debug.launch/src/com/nokia/cdt/internal/debug/launch/ui/RunModeDebuggerTab.java	Thu Sep 09 13:57:02 2010 -0500
+++ b/debuggercdi/com.nokia.cdt.debug.launch/src/com/nokia/cdt/internal/debug/launch/ui/RunModeDebuggerTab.java	Thu Sep 09 16:46:06 2010 -0500
@@ -32,12 +32,9 @@
 import org.eclipse.swt.layout.GridLayout;
 import org.eclipse.swt.widgets.Button;
 import org.eclipse.swt.widgets.Composite;
-import org.eclipse.swt.widgets.Group;
-import org.eclipse.swt.widgets.Label;
 import org.eclipse.swt.widgets.Text;
 import org.eclipse.ui.PlatformUI;
 
-import com.nokia.cdt.debug.cw.symbian.SettingsData;
 import com.nokia.cdt.internal.debug.launch.LaunchPlugin;
 
 import cwdbg.PreferenceConstants;
@@ -48,11 +45,6 @@
 	private Text mainBreakSymbol;
 	private Button viewUnframed;
 	private Button viewCommMessages;
-	private Label trkTimeoutLabel;
-	private Text trkTimeout;
-	private Button autoButton;
-	private Button armButton;
-	private Button thumbButton;
 
 	/* (non-Javadoc)
 	 * @see org.eclipse.debug.ui.ILaunchConfigurationTab#createControl(org.eclipse.swt.widgets.Composite)
@@ -69,65 +61,11 @@
 
 		createVerticalSpacer(comp, 2);
 		createBooleanGroup(comp, 2);
-		createVerticalSpacer(comp, 2);
-		createArmModeGroup(comp, 2);
 
 		Dialog.applyDialogFont(parent);
 		checkControlState();
 	}
 
-
-	protected void createArmModeGroup(Composite parent, int colSpan) {
-		Group group = new Group(parent, SWT.NONE);
-		GridLayout layout = new GridLayout();
-		layout.numColumns = 1;
-		group.setLayout(layout);
-		GridData gd = new GridData(GridData.FILL_HORIZONTAL);
-		gd.horizontalSpan = colSpan;
-		group.setLayoutData(gd);
-		group.setText(Messages.getString("RunModeDebuggerTab.0")); //$NON-NLS-1$
-		group.setFont(parent.getFont());
-		group.setToolTipText(Messages.getString("RunModeDebuggerTab.1")); //$NON-NLS-1$
-
-		autoButton = new Button(group, SWT.RADIO);
-		autoButton.setText(Messages.getString("RunModeDebuggerTab.17")); //$NON-NLS-1$
-		gd = new GridData();
-		gd.horizontalSpan = colSpan;
-		autoButton.setLayoutData(gd);
-		autoButton.setToolTipText(Messages.getString("RunModeDebuggerTab.1")); //$NON-NLS-1$
-		autoButton.addSelectionListener(new SelectionAdapter() {
-			public void widgetSelected(SelectionEvent e) {
-				updateLaunchConfigurationDialog();
-			}
-		});
-
-		armButton = new Button(group, SWT.RADIO);
-		armButton.setText(Messages.getString("RunModeDebuggerTab.2")); //$NON-NLS-1$
-		gd = new GridData();
-		gd.horizontalSpan = colSpan;
-		armButton.setLayoutData(gd);
-		armButton.setToolTipText(Messages.getString("RunModeDebuggerTab.1")); //$NON-NLS-1$
-		armButton.addSelectionListener(new SelectionAdapter() {
-			public void widgetSelected(SelectionEvent e) {
-				updateLaunchConfigurationDialog();
-			}
-		});
-
-		thumbButton = new Button(group, SWT.RADIO);
-		thumbButton.setText(Messages.getString("RunModeDebuggerTab.3")); //$NON-NLS-1$
-		gd = new GridData();
-		gd.horizontalSpan = colSpan;
-		thumbButton.setLayoutData(gd);
-		thumbButton.setToolTipText(Messages.getString("RunModeDebuggerTab.1")); //$NON-NLS-1$
-		thumbButton.addSelectionListener(new SelectionAdapter() {
-			public void widgetSelected(SelectionEvent e) {
-				updateLaunchConfigurationDialog();
-			}
-		});
-
-	}
-
-
 	protected void createBooleanGroup(Composite parent, int colSpan) {
 		breakAtMain = createCheckButton(parent, Messages.getString("RunModeDebuggerTab.4")); //$NON-NLS-1$
 		GridData data = new GridData(GridData.HORIZONTAL_ALIGN_FILL);
@@ -176,25 +114,6 @@
 				updateLaunchConfigurationDialog();
 			}
 		});
-
-		trkTimeoutLabel = new Label(parent, SWT.NONE);
-		trkTimeoutLabel.setText(Messages.getString("RunModeDebuggerTab.10")); //$NON-NLS-1$
-		data = new GridData();
-		data.horizontalSpan = 1;
-		trkTimeoutLabel.setLayoutData(data);
-		trkTimeoutLabel.setToolTipText(Messages.getString("RunModeDebuggerTab.11")); //$NON-NLS-1$
-
-		trkTimeout = new Text(parent, SWT.BORDER);
-		data = new GridData(GridData.HORIZONTAL_ALIGN_FILL);
-		data.horizontalSpan = 1;
-		trkTimeout.setLayoutData(data);
-		trkTimeout.setToolTipText(Messages.getString("RunModeDebuggerTab.11")); //$NON-NLS-1$
-		trkTimeout.addModifyListener(new ModifyListener() {
-			public void modifyText(ModifyEvent e) {
-				updateLaunchConfigurationDialog();
-			}
-		});
-
 	}
 
 	/* (non-Javadoc)
@@ -208,19 +127,11 @@
 	 */
 	public void initializeFrom(ILaunchConfiguration configuration) {
 		try {
-			int defaultMode = configuration.getAttribute( PreferenceConstants.J_PN_DefaultInstructionSet, PreferenceConstants.J_PV_DefaultInstructionSet_Arm);
-			autoButton.setSelection(defaultMode == PreferenceConstants.J_PV_DefaultInstructionSet_Auto);
-			armButton.setSelection(defaultMode == PreferenceConstants.J_PV_DefaultInstructionSet_Arm);
-			thumbButton.setSelection(defaultMode == PreferenceConstants.J_PV_DefaultInstructionSet_Thumb);
-
 			viewUnframed.setSelection(configuration.getAttribute( PreferenceConstants.J_PN_ViewUnframedData, true ));
 			viewCommMessages.setSelection(configuration.getAttribute( PreferenceConstants.J_PN_ViewCommMessages, false ));
 
 			breakAtMain.setSelection(configuration.getAttribute( ICDTLaunchConfigurationConstants.ATTR_DEBUGGER_STOP_AT_MAIN , true ));
 			mainBreakSymbol.setText(configuration.getAttribute( PreferenceConstants.J_PN_StopAtMainSymbol , "E32Main" )); //$NON-NLS-1$
-
-			int timeout = configuration.getAttribute( PreferenceConstants.J_PN_TRKMessageTimeout , SettingsData.J_PN_TrkTimeout_Default );
-			trkTimeout.setText(Integer.toString(timeout));
 			
 			checkControlState();
 		} catch (CoreException e) {
@@ -233,19 +144,10 @@
 	 * @see org.eclipse.debug.ui.ILaunchConfigurationTab#performApply(org.eclipse.debug.core.ILaunchConfigurationWorkingCopy)
 	 */
 	public void performApply(ILaunchConfigurationWorkingCopy configuration) {
-		if (autoButton.getSelection())
-			configuration.setAttribute( PreferenceConstants.J_PN_DefaultInstructionSet, PreferenceConstants.J_PV_DefaultInstructionSet_Auto);
-		else if (armButton.getSelection())
-			configuration.setAttribute( PreferenceConstants.J_PN_DefaultInstructionSet, PreferenceConstants.J_PV_DefaultInstructionSet_Arm);
-		else if (thumbButton.getSelection())
-			configuration.setAttribute( PreferenceConstants.J_PN_DefaultInstructionSet, PreferenceConstants.J_PV_DefaultInstructionSet_Thumb);
-
 		configuration.setAttribute( PreferenceConstants.J_PN_ViewUnframedData, viewUnframed.getSelection());
 		configuration.setAttribute( PreferenceConstants.J_PN_ViewCommMessages, viewCommMessages.getSelection());
 		configuration.setAttribute( ICDTLaunchConfigurationConstants.ATTR_DEBUGGER_STOP_AT_MAIN, breakAtMain.getSelection());
 		configuration.setAttribute( PreferenceConstants.J_PN_StopAtMainSymbol, mainBreakSymbol.getText());
-		configuration.setAttribute( PreferenceConstants.J_PN_TRKMessageTimeout, Integer.parseInt(trkTimeout.getText()));
-
 	}
 
 	/* (non-Javadoc)
@@ -281,23 +183,6 @@
 					return false;
 				}
 			}
-			
-			String timeout = trkTimeout.getText().trim();
-			if (timeout.length() < 1) {
-				setErrorMessage(Messages.getString("RunModeDebuggerTab.14")); //$NON-NLS-1$
-				result = false;
-			} else {
-				try {
-					int delay = Integer.parseInt(timeout);
-					if (delay < 100 || delay > 10000) {
-						setErrorMessage(Messages.getString("RunModeDebuggerTab.15")); //$NON-NLS-1$
-						result = false;
-					}
-				} catch (NumberFormatException e) {
-					setErrorMessage(Messages.getString("RunModeDebuggerTab.16")); //$NON-NLS-1$
-					result = false;
-				}
-			}
 		}		
 		return result;
 	}