debuggercdi/com.nokia.cdt.debug.launch/src/com/nokia/cdt/internal/debug/launch/newwizard/DebugRunProcessDialog.java
--- a/debuggercdi/com.nokia.cdt.debug.launch/src/com/nokia/cdt/internal/debug/launch/newwizard/DebugRunProcessDialog.java Wed Feb 10 08:00:37 2010 -0600
+++ b/debuggercdi/com.nokia.cdt.debug.launch/src/com/nokia/cdt/internal/debug/launch/newwizard/DebugRunProcessDialog.java Wed Feb 10 09:22:42 2010 -0600
@@ -156,8 +156,10 @@
attachToProcessRadioButton.setSelection(true);
break;
}
+ handleProjectExecutableRadioSelected();
+ handleRemoteExecutableRadioSelected();
+ handleAttachToProcessRadioSelected();
}
-
private void createPackageConfiguration(Composite composite) {
Label label;
@@ -421,16 +423,9 @@
projectExecutableRadioButton.addSelectionListener(new SelectionAdapter() {
@Override
public void widgetSelected(SelectionEvent e) {
- if (projectExecutableRadioButton.getSelection()) {
- projectExecutableViewer.getControl().setEnabled(true);
- data.setExeSelection(EExeSelection.USE_PROJECT_EXECUTABLE);
-
- validate();
- } else {
- projectExecutableViewer.getControl().setEnabled(false);
- // another button becomes active and sets the new launch process
- }
+ handleProjectExecutableRadioSelected();
}
+
});
projectExecutableViewer.addSelectionChangedListener(new ISelectionChangedListener() {
@@ -452,6 +447,18 @@
});
}
+ private void handleProjectExecutableRadioSelected() {
+ if (projectExecutableRadioButton.getSelection()) {
+ projectExecutableViewer.getControl().setEnabled(true);
+ data.setExeSelection(EExeSelection.USE_PROJECT_EXECUTABLE);
+
+ validate();
+ } else {
+ projectExecutableViewer.getControl().setEnabled(false);
+ // another button becomes active and sets the new launch process
+ }
+ }
+
/**
* Allow user to enter an executable path.
* @param radioGroup
@@ -471,17 +478,9 @@
remoteExecutableRadioButton.addSelectionListener(new SelectionAdapter() {
@Override
public void widgetSelected(SelectionEvent e) {
- if (remoteExecutableRadioButton.getSelection()) {
- remoteProgramEntry.setEnabled(true);
- data.setExeSelection(EExeSelection.USE_REMOTE_EXECUTABLE);
- String symbianPath = PathUtils.convertPathToWindows(remoteProgramEntry.getText());
- data.setExeSelectionPath(new Path(symbianPath));
- validate();
- } else {
- remoteProgramEntry.setEnabled(false);
- // another button becomes active and sets the new launch process
- }
+ handleRemoteExecutableRadioSelected();
}
+
});
remoteProgramEntry.addFocusListener(new FocusAdapter() {
@@ -494,6 +493,19 @@
}
+ private void handleRemoteExecutableRadioSelected() {
+ if (remoteExecutableRadioButton.getSelection()) {
+ remoteProgramEntry.setEnabled(true);
+ data.setExeSelection(EExeSelection.USE_REMOTE_EXECUTABLE);
+ String symbianPath = PathUtils.convertPathToWindows(remoteProgramEntry.getText());
+ data.setExeSelectionPath(new Path(symbianPath));
+ validate();
+ } else {
+ remoteProgramEntry.setEnabled(false);
+ // another button becomes active and sets the new launch process
+ }
+ }
+
/**
* Allow user to attach to a process.
* @param radioGroup
@@ -513,18 +525,23 @@
attachToProcessRadioButton.addSelectionListener(new SelectionAdapter() {
@Override
public void widgetSelected(SelectionEvent e) {
- if (attachToProcessRadioButton.getSelection()) {
- data.setExeSelection(EExeSelection.ATTACH_TO_PROCESS);
- data.setExeSelectionPath(null);
- validate();
- } else {
- // another button becomes active and sets the new launch process
- }
+ handleAttachToProcessRadioSelected();
}
+
});
}
+ private void handleAttachToProcessRadioSelected() {
+ if (attachToProcessRadioButton.getSelection()) {
+ data.setExeSelection(EExeSelection.ATTACH_TO_PROCESS);
+ data.setExeSelectionPath(null);
+ validate();
+ } else {
+ // another button becomes active and sets the new launch process
+ }
+ }
+
@Override
protected void validate() {
IStatus status = Status.OK_STATUS;