Skip to main content
aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorPablo Torregrosa Paez2016-03-08 02:38:01 -0500
committerPablo Torregrosa Paez2016-03-08 02:38:01 -0500
commit3a79934f54879337ae17e9d309ef29980cb61891 (patch)
treeda7e7a6da333369999a239e4cfc1fb58954ea155
parent6a9c67c8263eedddf88c88bbcf9089edd1c6c12f (diff)
downloadorg.eclipse.tcf-1.4_WR_20160318_4.7.0_bugfix.tar.gz
org.eclipse.tcf-1.4_WR_20160318_4.7.0_bugfix.tar.xz
org.eclipse.tcf-1.4_WR_20160318_4.7.0_bugfix.zip
Target Explorer: Launch Config change applies the PathMaps1.4_WR_20160318_4.7.01.4_WR_20160318_4.7.0_bugfix
Change-Id: I66095ba7f6e8b9d1a2117d0163c1841930794a96 Signed-off-by: Pablo Torregrosa Paez <pablo.torregrosa@windriver.com>
-rw-r--r--target_explorer/plugins/org.eclipse.tcf.te.tcf.launch.core/src/org/eclipse/tcf/te/tcf/launch/core/delegates/Launch.java37
1 files changed, 37 insertions, 0 deletions
diff --git a/target_explorer/plugins/org.eclipse.tcf.te.tcf.launch.core/src/org/eclipse/tcf/te/tcf/launch/core/delegates/Launch.java b/target_explorer/plugins/org.eclipse.tcf.te.tcf.launch.core/src/org/eclipse/tcf/te/tcf/launch/core/delegates/Launch.java
index e6fd71a06..95ba70ec3 100644
--- a/target_explorer/plugins/org.eclipse.tcf.te.tcf.launch.core/src/org/eclipse/tcf/te/tcf/launch/core/delegates/Launch.java
+++ b/target_explorer/plugins/org.eclipse.tcf.te.tcf.launch.core/src/org/eclipse/tcf/te/tcf/launch/core/delegates/Launch.java
@@ -16,6 +16,7 @@ import java.util.List;
import java.util.Map;
import org.eclipse.core.runtime.Assert;
+import org.eclipse.core.runtime.IStatus;
import org.eclipse.core.runtime.Platform;
import org.eclipse.core.runtime.Status;
import org.eclipse.debug.core.DebugException;
@@ -28,6 +29,8 @@ import org.eclipse.tcf.protocol.IToken;
import org.eclipse.tcf.protocol.Protocol;
import org.eclipse.tcf.services.IPathMap;
import org.eclipse.tcf.services.IPathMap.PathMapRule;
+import org.eclipse.tcf.te.runtime.callback.Callback;
+import org.eclipse.tcf.te.runtime.concurrent.util.ExecutorsUtil;
import org.eclipse.tcf.te.runtime.interfaces.callback.ICallback;
import org.eclipse.tcf.te.runtime.interfaces.properties.IPropertiesContainer;
import org.eclipse.tcf.te.runtime.properties.PropertiesContainer;
@@ -36,6 +39,7 @@ import org.eclipse.tcf.te.runtime.utils.StatusHelper;
import org.eclipse.tcf.te.tcf.core.Tcf;
import org.eclipse.tcf.te.tcf.core.interfaces.IChannelManager;
import org.eclipse.tcf.te.tcf.core.interfaces.IPathMapGeneratorService;
+import org.eclipse.tcf.te.tcf.core.interfaces.IPathMapService;
import org.eclipse.tcf.te.tcf.launch.core.internal.services.PathMapService;
import org.eclipse.tcf.te.tcf.locator.interfaces.nodes.IPeerNode;
@@ -241,4 +245,37 @@ public final class Launch extends TCFLaunch {
return super.getAdapter(adapter);
}
+
+ /* (non-Javadoc)
+ * @see org.eclipse.tcf.internal.debug.model.TCFLaunch#launchConfigurationChanged(org.eclipse.debug.core.ILaunchConfiguration)
+ */
+ @Override
+ public void launchConfigurationChanged(ILaunchConfiguration cfg) {
+ super.launchConfigurationChanged(cfg);
+
+ // Apply Path Map changes
+ Protocol.invokeLater(new Runnable() {
+ @Override
+ public void run() {
+ if (getChannel() != null) {
+ final IPeer peer = getPeer();
+ if (peer != null) {
+ final IPathMapService service = ServiceManager.getInstance().getService(peer, IPathMapService.class);
+ if (service != null) {
+ ExecutorsUtil.execute(new Runnable() {
+ @Override
+ public void run() {
+ service.applyPathMap(peer, false, true, new Callback() {
+ @Override
+ protected void internalDone(Object caller, IStatus status) {
+ }
+ });
+ }
+ });
+ }
+ }
+ }
+ }
+ });
+ }
}

Back to the top