diff options
author | Uwe Stieber | 2014-05-27 08:11:38 +0000 |
---|---|---|
committer | Uwe Stieber | 2014-05-27 08:12:05 +0000 |
commit | cec947cc44e78e5a433579df83c276cef1df1d4f (patch) | |
tree | 2dbcfa8e8cfd92de5265b3b8c35b75c19b5fb79a /target_explorer/plugins | |
parent | 1f361d42a4e9d5bc4d8bb3cb58017482811530a6 (diff) | |
download | org.eclipse.tcf-cec947cc44e78e5a433579df83c276cef1df1d4f.tar.gz org.eclipse.tcf-cec947cc44e78e5a433579df83c276cef1df1d4f.tar.xz org.eclipse.tcf-cec947cc44e78e5a433579df83c276cef1df1d4f.zip |
Target Explorer: Always apply path maps to newly opened channels. Skip comparisation in that case.
Diffstat (limited to 'target_explorer/plugins')
4 files changed, 10 insertions, 8 deletions
diff --git a/target_explorer/plugins/org.eclipse.tcf.te.tcf.core/src/org/eclipse/tcf/te/tcf/core/interfaces/IPathMapService.java b/target_explorer/plugins/org.eclipse.tcf.te.tcf.core/src/org/eclipse/tcf/te/tcf/core/interfaces/IPathMapService.java index b393047e1..d9e37f259 100644 --- a/target_explorer/plugins/org.eclipse.tcf.te.tcf.core/src/org/eclipse/tcf/te/tcf/core/interfaces/IPathMapService.java +++ b/target_explorer/plugins/org.eclipse.tcf.te.tcf.core/src/org/eclipse/tcf/te/tcf/core/interfaces/IPathMapService.java @@ -74,9 +74,11 @@ public interface IPathMapService extends IService { * <b>Note:</b> This method must be called from outside the TCF event dispatch thread. * * @param context The context. Must not be <code>null</code>. + * @param force If <code>true</code> the path map will be set even if it appears not to be + * different from the path map already set. * @param callback The callback to invoke once the operation completed. Must not be <code>null</code>. */ - public void applyPathMap(Object context, ICallback callback); + public void applyPathMap(Object context, boolean force, ICallback callback); /** * Returns the current client ID used to identify path map rules handled diff --git a/target_explorer/plugins/org.eclipse.tcf.te.tcf.core/src/org/eclipse/tcf/te/tcf/core/internal/ChannelManager.java b/target_explorer/plugins/org.eclipse.tcf.te.tcf.core/src/org/eclipse/tcf/te/tcf/core/internal/ChannelManager.java index adb769657..3b9b45956 100644 --- a/target_explorer/plugins/org.eclipse.tcf.te.tcf.core/src/org/eclipse/tcf/te/tcf/core/internal/ChannelManager.java +++ b/target_explorer/plugins/org.eclipse.tcf.te.tcf.core/src/org/eclipse/tcf/te/tcf/core/internal/ChannelManager.java @@ -101,7 +101,7 @@ public final class ChannelManager extends PlatformObject implements IChannelMana Thread thread = new Thread(new Runnable() { @Override public void run() { - service.applyPathMap(peer, new Callback() { + service.applyPathMap(peer, true, new Callback() { @Override protected void internalDone(Object caller, IStatus status) { done.doneOpenChannel(error, channel); 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 bd087b096..4fe0a039e 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 @@ -159,7 +159,7 @@ public class PathMapService extends AbstractService implements IPathMapService { updateLaunchConfiguration(config, rulesList); // Apply the path map - applyPathMap(context, new Callback() { + applyPathMap(context, false, new Callback() { @Override protected void internalDone(Object caller, IStatus status) { if (status != null && Platform.inDebugMode()) { @@ -207,7 +207,7 @@ public class PathMapService extends AbstractService implements IPathMapService { updateLaunchConfiguration(config, rulesList); // Apply the path map - applyPathMap(context, new Callback() { + applyPathMap(context, false, new Callback() { @Override protected void internalDone(Object caller, IStatus status) { if (status != null && Platform.inDebugMode()) { @@ -305,10 +305,10 @@ public class PathMapService extends AbstractService implements IPathMapService { } /* (non-Javadoc) - * @see org.eclipse.tcf.te.tcf.core.interfaces.IPathMapService#applyPathMap(java.lang.Object, org.eclipse.tcf.te.runtime.interfaces.callback.ICallback) + * @see org.eclipse.tcf.te.tcf.core.interfaces.IPathMapService#applyPathMap(java.lang.Object, boolean, org.eclipse.tcf.te.runtime.interfaces.callback.ICallback) */ @Override - public void applyPathMap(final Object context, final ICallback callback) { + public void applyPathMap(final Object context, final boolean force, final ICallback callback) { Assert.isTrue(!Protocol.isDispatchThread(), "Illegal Thread Access"); //$NON-NLS-1$ Assert.isNotNull(context); Assert.isNotNull(callback); @@ -347,7 +347,7 @@ public class PathMapService extends AbstractService implements IPathMapService { List<PathMapRule> rules = mergePathMaps(getClientID(), map, configuredMap); // If the merged path map differs from the agent side path map, apply the map - if (isDifferent(rules, map)) { + if (force || isDifferent(rules, map)) { // Apply the path map set(rules, svc, new IPathMap.DoneSet() { @Override diff --git a/target_explorer/plugins/org.eclipse.tcf.te.tcf.launch.ui/src/org/eclipse/tcf/te/tcf/launch/ui/editor/PathMapEditorPage.java b/target_explorer/plugins/org.eclipse.tcf.te.tcf.launch.ui/src/org/eclipse/tcf/te/tcf/launch/ui/editor/PathMapEditorPage.java index a443bc77a..aa9f8c4bf 100644 --- a/target_explorer/plugins/org.eclipse.tcf.te.tcf.launch.ui/src/org/eclipse/tcf/te/tcf/launch/ui/editor/PathMapEditorPage.java +++ b/target_explorer/plugins/org.eclipse.tcf.te.tcf.launch.ui/src/org/eclipse/tcf/te/tcf/launch/ui/editor/PathMapEditorPage.java @@ -53,7 +53,7 @@ public class PathMapEditorPage extends AbstractTcfLaunchTabContainerEditorPage { if (peerNode != null && peerNode.getPeer() != null) { IPathMapService service = ServiceManager.getInstance().getService(peerNode.getPeer(), IPathMapService.class); if (service != null) { - service.applyPathMap(peerNode.getPeer(), new Callback() { + service.applyPathMap(peerNode.getPeer(), false, new Callback() { @Override protected void internalDone(Object caller, IStatus status) { if (status != null && status.getSeverity() == IStatus.ERROR) { |