--- a/debuggercdi/com.nokia.cdt.debug.launch/src/com/nokia/cdt/internal/debug/launch/newwizard/ConnectToDeviceSection.java Wed Feb 10 08:00:37 2010 -0600
+++ b/debuggercdi/com.nokia.cdt.debug.launch/src/com/nokia/cdt/internal/debug/launch/newwizard/ConnectToDeviceSection.java Wed Feb 10 09:22:42 2010 -0600
@@ -49,17 +49,11 @@
manager = RemoteConnectionsActivator.getConnectionsManager();
}
- /* (non-Javadoc)
- * @see com.nokia.cdt.internal.debug.launch.wizard2.IWizardSection#createComposite(org.eclipse.swt.widgets.Composite)
- */
public void createControl(Composite parent) {
createSection(parent, 0);
manager.addConnectionListener(this);
}
- /* (non-Javadoc)
- * @see com.nokia.cdt.internal.debug.launch.wizard2.AbstractLaunchWizardSection#dispose()
- */
@Override
protected void dispose() {
manager.removeConnectionListener(this);
@@ -104,16 +98,13 @@
launchOptionsPage.changed();
}
- /* (non-Javadoc)
- * @see com.nokia.cdt.internal.debug.launch.wizard2.AbstractLaunchWizardSection#createChangeSettingsDialog(org.eclipse.swt.widgets.Shell, com.nokia.cdt.internal.debug.launch.wizard2.LaunchOptionsData)
- */
@Override
protected AbstractLaunchSettingsDialog createChangeSettingsDialog(Shell shell, LaunchOptionsData dialogData) {
return new ConnectToDeviceDialog(shell, dialogData);
}
protected void refresh() {
- Display.getDefault().asyncExec(new Runnable() {
+ Display.getDefault().syncExec(new Runnable() {
public void run() {
validate();
updateUI();
--- 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;
--- a/debuggercdi/com.nokia.cdt.debug.launch/src/com/nokia/cdt/internal/debug/launch/newwizard/DebugRunProcessSection.java Wed Feb 10 08:00:37 2010 -0600
+++ b/debuggercdi/com.nokia.cdt.debug.launch/src/com/nokia/cdt/internal/debug/launch/newwizard/DebugRunProcessSection.java Wed Feb 10 09:22:42 2010 -0600
@@ -35,17 +35,11 @@
super(data, MessageFormat.format("{0} process", data.getModeLabel()));
}
- /* (non-Javadoc)
- * @see com.nokia.cdt.internal.debug.launch.wizard2.IWizardSection#createComposite(org.eclipse.swt.widgets.Composite)
- */
@Override
public void createControl(Composite parent) {
createSection(parent, 1);
}
- /* (non-Javadoc)
- * @see com.nokia.cdt.internal.debug.launch.wizard2.AbstractLaunchWizardSection#dispose()
- */
@Override
protected void dispose() {
@@ -60,26 +54,17 @@
data.setExeSelectionPath(data.getDefaultExecutable());
}
- /* (non-Javadoc)
- * @see com.nokia.cdt.internal.debug.launch.wizard2.AbstractLaunchWizardSection#createChangeSettingsDialog(org.eclipse.swt.widgets.Shell, com.nokia.cdt.internal.debug.launch.wizard2.LaunchOptionsData)
- */
@Override
protected AbstractLaunchSettingsDialog createChangeSettingsDialog(
Shell shell, LaunchOptionsData dialogData) {
return new DebugRunProcessDialog(shell, dialogData);
}
- /* (non-Javadoc)
- * @see com.nokia.cdt.internal.debug.launch.wizard2.AbstractLaunchWizardSection#refresh()
- */
@Override
protected void refresh() {
updateUI();
}
- /* (non-Javadoc)
- * @see com.nokia.cdt.internal.debug.launch.wizard2.AbstractLaunchWizardSection#validate()
- */
@Override
protected void validate() {