Skip to main content
aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMichael Rennie2006-11-16 17:09:24 +0000
committerMichael Rennie2006-11-16 17:09:24 +0000
commita6d8573a4ac98c999b1029a5e2206f2d1145b95f (patch)
tree21fe64c548814d5f745edd120cc858a9c7b8cb52 /org.eclipse.debug.ui/ui/org/eclipse/debug/ui/sourcelookup/SourceLookupDialog.java
parentc130146e210d0c6b4c0330c63f9629144c06f4ad (diff)
downloadeclipse.platform.debug-a6d8573a4ac98c999b1029a5e2206f2d1145b95f.tar.gz
eclipse.platform.debug-a6d8573a4ac98c999b1029a5e2206f2d1145b95f.tar.xz
eclipse.platform.debug-a6d8573a4ac98c999b1029a5e2206f2d1145b95f.zip
Bug 164682
NPE SourceLookupPanel add external archive
Diffstat (limited to 'org.eclipse.debug.ui/ui/org/eclipse/debug/ui/sourcelookup/SourceLookupDialog.java')
-rw-r--r--org.eclipse.debug.ui/ui/org/eclipse/debug/ui/sourcelookup/SourceLookupDialog.java17
1 files changed, 16 insertions, 1 deletions
diff --git a/org.eclipse.debug.ui/ui/org/eclipse/debug/ui/sourcelookup/SourceLookupDialog.java b/org.eclipse.debug.ui/ui/org/eclipse/debug/ui/sourcelookup/SourceLookupDialog.java
index 30c2fad6f..d479ad567 100644
--- a/org.eclipse.debug.ui/ui/org/eclipse/debug/ui/sourcelookup/SourceLookupDialog.java
+++ b/org.eclipse.debug.ui/ui/org/eclipse/debug/ui/sourcelookup/SourceLookupDialog.java
@@ -10,6 +10,9 @@
*******************************************************************************/
package org.eclipse.debug.ui.sourcelookup;
+import org.eclipse.core.runtime.CoreException;
+import org.eclipse.debug.core.ILaunchConfiguration;
+import org.eclipse.debug.core.ILaunchConfigurationWorkingCopy;
import org.eclipse.debug.core.sourcelookup.ISourceLookupDirector;
import org.eclipse.debug.internal.ui.DebugPluginImages;
import org.eclipse.debug.internal.ui.DebugUIPlugin;
@@ -85,6 +88,10 @@ public class SourceLookupDialog extends TitleAreaDialog {
fPanel.createControl(composite);
fPanel.initializeFrom(fDirector);
Dialog.applyDialogFont(composite);
+ ILaunchConfiguration config = fDirector.getLaunchConfiguration();
+ if(config != null && config.isReadOnly()) {
+ setErrorMessage(SourceLookupUIMessages.SourceLookupDialog_0+config.getName()+SourceLookupUIMessages.SourceLookupDialog_1);
+ }
PlatformUI.getWorkbench().getHelpSystem().setHelp(composite, IDebugHelpContextIds.EDIT_SOURCELOOKUP_DIALOG);
return composite;
@@ -94,7 +101,15 @@ public class SourceLookupDialog extends TitleAreaDialog {
* @see org.eclipse.jface.dialogs.Dialog#okPressed()
*/
protected void okPressed() {
- fPanel.performApply(null);
+ ILaunchConfiguration config = fDirector.getLaunchConfiguration();
+ ILaunchConfigurationWorkingCopy copy = null;
+ if(config != null) {
+ try {
+ copy = config.getWorkingCopy();
+ }
+ catch (CoreException e) {DebugUIPlugin.log(e);}
+ }
+ fPanel.performApply(copy);
super.okPressed();
}

Back to the top