Skip to main content
aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorDarin Wright2010-05-12 15:41:13 -0400
committerDarin Wright2010-05-12 15:41:13 -0400
commit1bef1001ef09ff90a295d99f3a04a53775d7432d (patch)
treeb065d6d4371317bc6c0e72eedf3d6e77bece0409
parent6281ae8cce16a322e6e640cf8e28068a99989491 (diff)
downloadeclipse.platform.debug-1bef1001ef09ff90a295d99f3a04a53775d7432d.tar.gz
eclipse.platform.debug-1bef1001ef09ff90a295d99f3a04a53775d7432d.tar.xz
eclipse.platform.debug-1bef1001ef09ff90a295d99f3a04a53775d7432d.zip
Bug 312681 - Launching by hitting run from Launch Config Dialog fails
-rw-r--r--org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/launchConfigurations/LaunchConfigurationTabGroupViewer.java17
-rw-r--r--org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/launchConfigurations/LaunchConfigurationsDialog.java4
2 files changed, 11 insertions, 10 deletions
diff --git a/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/launchConfigurations/LaunchConfigurationTabGroupViewer.java b/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/launchConfigurations/LaunchConfigurationTabGroupViewer.java
index 00437544e..27b56addf 100644
--- a/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/launchConfigurations/LaunchConfigurationTabGroupViewer.java
+++ b/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/launchConfigurations/LaunchConfigurationTabGroupViewer.java
@@ -1258,16 +1258,19 @@ public class LaunchConfigurationTabGroupViewer {
}
/**
- * Notification that the 'Apply' button has been pressed
+ * Notification that the 'Apply' button has been pressed.
+ *
+ * @return the saved launch configuration or <code>null</code> if not saved
*/
- protected boolean handleApplyPressed() {
+ protected ILaunchConfiguration handleApplyPressed() {
if(fOriginal != null && fOriginal.isReadOnly()) {
IStatus status = ResourcesPlugin.getWorkspace().validateEdit(new IFile[] {fOriginal.getFile()}, fViewerControl.getShell());
if(!status.isOK()) {
- return false;
+ return null;
}
}
Exception exception = null;
+ final ILaunchConfiguration[] saved = new ILaunchConfiguration[1];
try {
// update launch config
fInitializingTabs = true;
@@ -1284,7 +1287,7 @@ public class LaunchConfigurationTabGroupViewer {
IRunnableWithProgress runnable = new IRunnableWithProgress() {
public void run(IProgressMonitor monitor) throws InvocationTargetException, InterruptedException {
try {
- ((LaunchConfigurationWorkingCopy)fWorkingCopy).doSave(monitor);
+ saved[0] = ((LaunchConfigurationWorkingCopy)fWorkingCopy).doSave(monitor);
}
catch (CoreException e) {DebugUIPlugin.log(e);}
}
@@ -1292,7 +1295,7 @@ public class LaunchConfigurationTabGroupViewer {
getLaunchConfigurationDialog().run(true, false, runnable);
}
else {
- fWorkingCopy.doSave();
+ saved[0] = fWorkingCopy.doSave();
}
}
updateButtons();
@@ -1303,9 +1306,9 @@ public class LaunchConfigurationTabGroupViewer {
catch (InterruptedException e) {exception = e;}
if(exception != null) {
DebugUIPlugin.errorDialog(getShell(), LaunchConfigurationsMessages.LaunchConfigurationDialog_Launch_Configuration_Error_46, LaunchConfigurationsMessages.LaunchConfigurationDialog_Exception_occurred_while_saving_launch_configuration_47, exception); //
- return false;
+ return null;
} else {
- return true;
+ return saved[0];
}
}
diff --git a/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/launchConfigurations/LaunchConfigurationsDialog.java b/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/launchConfigurations/LaunchConfigurationsDialog.java
index 78af17061..6963dd12d 100644
--- a/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/launchConfigurations/LaunchConfigurationsDialog.java
+++ b/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/launchConfigurations/LaunchConfigurationsDialog.java
@@ -948,9 +948,7 @@ public class LaunchConfigurationsDialog extends TitleAreaDialog implements ILaun
protected void handleLaunchPressed() {
ILaunchConfiguration config = fTabViewer.getOriginal();
if (fTabViewer.isDirty() && fTabViewer.canSave()) {
- if (fTabViewer.handleApplyPressed())
- config = fTabViewer.getOriginal();
- else config = null;
+ config = fTabViewer.handleApplyPressed();
}
if(config != null) {
close();

Back to the top