Skip to main content
summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMichael Rennie2006-11-21 17:32:10 +0000
committerMichael Rennie2006-11-21 17:32:10 +0000
commit8145c42ec44301a302d4286060096bb29a9b6efb (patch)
treeedb94c209d9c322123db9f970a692f344f3e112e /org.eclipse.debug.ui
parent76a79f701b0d71fd8b144d429dc74868c5bfa580 (diff)
downloadeclipse.platform.debug-8145c42ec44301a302d4286060096bb29a9b6efb.tar.gz
eclipse.platform.debug-8145c42ec44301a302d4286060096bb29a9b6efb.tar.xz
eclipse.platform.debug-8145c42ec44301a302d4286060096bb29a9b6efb.zip
Bug 165348
[source lookup] source lookup panel is not saving changes to source lookup path
Diffstat (limited to 'org.eclipse.debug.ui')
-rw-r--r--org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/sourcelookup/SourceLookupPanel.java9
1 files changed, 3 insertions, 6 deletions
diff --git a/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/sourcelookup/SourceLookupPanel.java b/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/sourcelookup/SourceLookupPanel.java
index 277bb84de..6e90eaeae 100644
--- a/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/sourcelookup/SourceLookupPanel.java
+++ b/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/sourcelookup/SourceLookupPanel.java
@@ -316,8 +316,6 @@ public class SourceLookupPanel extends AbstractLaunchConfigurationTab implements
* Saving the configuration will result in a change event, which will be picked up by the director
* and used to refresh its internal list.
*
- * @param containers the list of containers entered by the user
- * @param duplicates true if the user checked the duplicates check box, false otherwise
* @param workingCopy the working copy of the configuration that these values should be stored in, may be null.
* If null, will be written into a working copy of the configuration referenced by the director.
*/
@@ -352,17 +350,16 @@ public class SourceLookupPanel extends AbstractLaunchConfigurationTab implements
//writing to the file will cause a change event and the listeners will be updated
try {
- if (isDefault(workingCopy)) {
+ if (isDefault()) {
workingCopy.setAttribute(ILaunchConfiguration.ATTR_SOURCE_LOCATOR_MEMENTO, (String)null);
workingCopy.setAttribute(ILaunchConfiguration.ATTR_SOURCE_LOCATOR_ID, (String)null);
} else {
workingCopy.setAttribute(ILaunchConfiguration.ATTR_SOURCE_LOCATOR_MEMENTO, fLocator.getMemento());
workingCopy.setAttribute(ILaunchConfiguration.ATTR_SOURCE_LOCATOR_ID, fLocator.getId());
}
- if(configuration == null) {
+ if(!workingCopy.isReadOnly()) {
workingCopy.doSave();
}
- setDirty(false);
}
catch(CoreException e) {
DebugUIPlugin.log(e);
@@ -377,7 +374,7 @@ public class SourceLookupPanel extends AbstractLaunchConfigurationTab implements
* @param configuration
* @return
*/
- protected boolean isDefault(ILaunchConfiguration configuration) {
+ protected boolean isDefault() {
ISourceContainer[] current = getEntries();
return !fDuplicatesButton.getSelection() && current.length == 1 && current[0] instanceof DefaultSourceContainer;
}

Back to the top