diff options
author | Uwe Stieber | 2015-06-18 07:08:00 +0000 |
---|---|---|
committer | Uwe Stieber | 2015-06-18 07:08:00 +0000 |
commit | d3dde2c20a00d5b2c8c098d0257255be59a69e64 (patch) | |
tree | 82e72dce12165c25474cbff4e845850ce340a4e5 /target_explorer | |
parent | 5e2351d9f4f3be717c0d4149dcf3199f7cdae196 (diff) | |
download | org.eclipse.tcf-d3dde2c20a00d5b2c8c098d0257255be59a69e64.tar.gz org.eclipse.tcf-d3dde2c20a00d5b2c8c098d0257255be59a69e64.tar.xz org.eclipse.tcf-d3dde2c20a00d5b2c8c098d0257255be59a69e64.zip |
Target Explorer: Fix OK status is logged to error log if platform is running in debug mode and path map is changed
Diffstat (limited to 'target_explorer')
-rw-r--r-- | target_explorer/plugins/org.eclipse.tcf.te.tcf.launch.core/src/org/eclipse/tcf/te/tcf/launch/core/internal/services/PathMapService.java | 15 |
1 files changed, 12 insertions, 3 deletions
diff --git a/target_explorer/plugins/org.eclipse.tcf.te.tcf.launch.core/src/org/eclipse/tcf/te/tcf/launch/core/internal/services/PathMapService.java b/target_explorer/plugins/org.eclipse.tcf.te.tcf.launch.core/src/org/eclipse/tcf/te/tcf/launch/core/internal/services/PathMapService.java index abfcc3b87..46bb5e56e 100644 --- a/target_explorer/plugins/org.eclipse.tcf.te.tcf.launch.core/src/org/eclipse/tcf/te/tcf/launch/core/internal/services/PathMapService.java +++ b/target_explorer/plugins/org.eclipse.tcf.te.tcf.launch.core/src/org/eclipse/tcf/te/tcf/launch/core/internal/services/PathMapService.java @@ -256,7 +256,7 @@ public class PathMapService extends AbstractService implements IPathMapService { applyPathMap(context, false, false, new Callback() { @Override protected void internalDone(Object caller, IStatus status) { - if (status != null && Platform.inDebugMode()) { + if (status != null && !status.isOK() && Platform.inDebugMode()) { Platform.getLog(CoreBundleActivator.getContext().getBundle()).log(status); } } @@ -295,8 +295,17 @@ public class PathMapService extends AbstractService implements IPathMapService { if (config != null) { populatePathMapRulesList(config, rulesList); + // If the original rule has an ID set, create a copy of the rule + // but without the ID property + PathMapRule r = rule; + if (r.getID() != null) { + Map<String, Object> props = new HashMap<String, Object>(r.getProperties()); + props.remove(IPathMap.PROP_ID); + r = new org.eclipse.tcf.internal.debug.launch.TCFLaunchDelegate.PathMapRule(props); + } + // Remove the given rule from the list of present - if (rulesList.remove(rule)) { + if (rulesList.remove(r)) { // Update the launch configuration updateLaunchConfiguration(config, rulesList); @@ -304,7 +313,7 @@ public class PathMapService extends AbstractService implements IPathMapService { applyPathMap(context, true, true, new Callback() { @Override protected void internalDone(Object caller, IStatus status) { - if (status != null && Platform.inDebugMode()) { + if (status != null && !status.isOK() && Platform.inDebugMode()) { Platform.getLog(CoreBundleActivator.getContext().getBundle()).log(status); } } |