Skip to main content
aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorDarin Wright2009-10-28 10:51:30 -0400
committerDarin Wright2009-10-28 10:51:30 -0400
commite09fd1e6cb632a2cbcd0f96c9becd315573327c8 (patch)
treef92623dd2e60554990b0d5bc0f12d60ed7d2e1d7
parent32012b2bef00ac8d800ffc5b9211f5dd73f04349 (diff)
downloadeclipse.platform.debug-e09fd1e6cb632a2cbcd0f96c9becd315573327c8.tar.gz
eclipse.platform.debug-e09fd1e6cb632a2cbcd0f96c9becd315573327c8.tar.xz
eclipse.platform.debug-e09fd1e6cb632a2cbcd0f96c9becd315573327c8.zip
[r352] Bug 291339 - validateEdit not called for launch configuration stored locally
-rw-r--r--org.eclipse.debug.ui/META-INF/MANIFEST.MF2
-rw-r--r--org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/launchConfigurations/LaunchConfigurationTabGroupViewer.java24
-rw-r--r--org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/launchConfigurations/LaunchConfigurationsDialog.java7
-rw-r--r--org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/launchConfigurations/LaunchConfigurationsMessages.java1
-rw-r--r--org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/launchConfigurations/LaunchConfigurationsMessages.properties1
5 files changed, 17 insertions, 18 deletions
diff --git a/org.eclipse.debug.ui/META-INF/MANIFEST.MF b/org.eclipse.debug.ui/META-INF/MANIFEST.MF
index d817253fe..ccb28b201 100644
--- a/org.eclipse.debug.ui/META-INF/MANIFEST.MF
+++ b/org.eclipse.debug.ui/META-INF/MANIFEST.MF
@@ -2,7 +2,7 @@ Manifest-Version: 1.0
Bundle-ManifestVersion: 2
Bundle-Name: %pluginName
Bundle-SymbolicName: org.eclipse.debug.ui; singleton:=true
-Bundle-Version: 3.5.1.qualifier
+Bundle-Version: 3.5.2.qualifier
Bundle-Activator: org.eclipse.debug.internal.ui.DebugUIPlugin
Bundle-Vendor: %providerName
Bundle-Localization: plugin
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 5a7a055d3..7ce280ef0 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
@@ -16,6 +16,8 @@ import java.util.HashSet;
import java.util.List;
import java.util.Set;
+import org.eclipse.core.resources.IFile;
+import org.eclipse.core.resources.ResourcesPlugin;
import org.eclipse.core.runtime.CoreException;
import org.eclipse.core.runtime.IProgressMonitor;
import org.eclipse.core.runtime.IStatus;
@@ -499,10 +501,6 @@ public class LaunchConfigurationTabGroupViewer {
if (fInitializingTabs) {
return;
}
- if(fOriginal != null && fOriginal.isReadOnly()) {
- updateButtons();
- return;
- }
ILaunchConfigurationTab[] tabs = getTabs();
if (tabs != null) {
// update the working copy from the active tab
@@ -1046,9 +1044,6 @@ public class LaunchConfigurationTabGroupViewer {
return false;
}
}
- if(getWorkingCopy() != null) {
- return !getWorkingCopy().isReadOnly();
- }
return true;
}
@@ -1190,9 +1185,6 @@ public class LaunchConfigurationTabGroupViewer {
return temp.toString();
}
}
- if(getWorkingCopy().isReadOnly()) {
- return LaunchConfigurationsMessages.LaunchConfigurationTabGroupViewer_9;
- }
if(!canLaunchWithModes()) {
Set modes = getCurrentModeSet();
List names = LaunchConfigurationPresentationManager.getDefault().getLaunchModeNames(modes);
@@ -1337,7 +1329,13 @@ public class LaunchConfigurationTabGroupViewer {
/**
* Notification that the 'Apply' button has been pressed
*/
- protected void handleApplyPressed() {
+ protected boolean handleApplyPressed() {
+ if(fOriginal != null && fOriginal.isReadOnly()) {
+ IStatus status = ResourcesPlugin.getWorkspace().validateEdit(new IFile[] {fOriginal.getFile()}, fViewerControl.getShell());
+ if(!status.isOK()) {
+ return false;
+ }
+ }
Exception exception = null;
try {
// update launch config
@@ -1374,7 +1372,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;
+ return false;
+ } else {
+ return true;
}
}
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 7b513af40..336ecdd6c 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
@@ -931,11 +931,12 @@ public class LaunchConfigurationsDialog extends TitleAreaDialog implements ILaun
protected void handleLaunchPressed() {
ILaunchConfiguration config = fTabViewer.getOriginal();
if (fTabViewer.isDirty() && fTabViewer.canSave()) {
- fTabViewer.handleApplyPressed();
- config = fTabViewer.getOriginal();
+ if (fTabViewer.handleApplyPressed())
+ config = fTabViewer.getOriginal();
+ else config = null;
}
- close();
if(config != null) {
+ close();
DebugUITools.launch(config, getMode());
}
}
diff --git a/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/launchConfigurations/LaunchConfigurationsMessages.java b/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/launchConfigurations/LaunchConfigurationsMessages.java
index 0d085d410..14d19110f 100644
--- a/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/launchConfigurations/LaunchConfigurationsMessages.java
+++ b/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/launchConfigurations/LaunchConfigurationsMessages.java
@@ -96,7 +96,6 @@ public class LaunchConfigurationsMessages extends NLS {
public static String LaunchConfigurationTabGroupViewer_17;
public static String LaunchConfigurationTabGroupViewer_18;
- public static String LaunchConfigurationTabGroupViewer_9;
public static String LaunchConfigurationTabGroupViewer_13;
public static String LaunchConfigurationTabGroupViewer_19;
diff --git a/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/launchConfigurations/LaunchConfigurationsMessages.properties b/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/launchConfigurations/LaunchConfigurationsMessages.properties
index 71b4daddc..900779b47 100644
--- a/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/launchConfigurations/LaunchConfigurationsMessages.properties
+++ b/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/launchConfigurations/LaunchConfigurationsMessages.properties
@@ -55,7 +55,6 @@ LaunchConfigurationTabGroupViewer_4=- Press the 'Delete' button to remove the se
LaunchConfigurationTabGroupViewer_6=- Press the 'Duplicate' button to copy the selected configuration.
LaunchConfigurationTabGroupViewer_5=Configure launch perspective settings from the <a>Perspectives</a> preference page.
LaunchConfigurationTabGroupViewer_8=- Press the 'Filter' button to configure filtering options.
-LaunchConfigurationTabGroupViewer_9=The file associated with this launch configuration is read-only and cannot be modified.\n
LaunchConfigurationTabGroupViewer_13=Select a supported <a>launch mode</a>.
LaunchConfigurationTabGroupViewer_14=Mixed launch mode not supported: {0}
LaunchConfigurationTabGroupViewer_15=More than one launcher available - <a>Select other...</a>

Back to the top