Skip to main content
aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authoruwe2013-09-10 02:13:26 -0400
committeruwe2013-09-10 02:13:26 -0400
commite02f52336ddb8f9fb7e9755b95a49ee90f03b0a3 (patch)
treeeada7c3c0274a55c2ab4666f096632b6ac40b853 /target_explorer/plugins/org.eclipse.tcf.te.tcf.launch.core
parentcf901dde9b73d37af1e655e24aecb1ee0b53e6d0 (diff)
downloadorg.eclipse.tcf-e02f52336ddb8f9fb7e9755b95a49ee90f03b0a3.tar.gz
org.eclipse.tcf-e02f52336ddb8f9fb7e9755b95a49ee90f03b0a3.tar.xz
org.eclipse.tcf-e02f52336ddb8f9fb7e9755b95a49ee90f03b0a3.zip
Target Explorer: Add auto-generated path map to debugger channel setup
Diffstat (limited to 'target_explorer/plugins/org.eclipse.tcf.te.tcf.launch.core')
-rw-r--r--target_explorer/plugins/org.eclipse.tcf.te.tcf.launch.core/src/org/eclipse/tcf/te/tcf/launch/core/delegates/Launch.java23
1 files changed, 23 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 8f5aea44f..4424b0f00 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
@@ -9,7 +9,9 @@
*******************************************************************************/
package org.eclipse.tcf.te.tcf.launch.core.delegates;
+import java.util.Arrays;
import java.util.HashMap;
+import java.util.List;
import java.util.Map;
import org.eclipse.core.runtime.Assert;
@@ -18,10 +20,13 @@ import org.eclipse.debug.core.ILaunch;
import org.eclipse.debug.core.ILaunchConfiguration;
import org.eclipse.tcf.internal.debug.model.TCFLaunch;
import org.eclipse.tcf.protocol.IChannel;
+import org.eclipse.tcf.services.IPathMap.PathMapRule;
import org.eclipse.tcf.te.runtime.interfaces.properties.IPropertiesContainer;
import org.eclipse.tcf.te.runtime.properties.PropertiesContainer;
+import org.eclipse.tcf.te.runtime.services.ServiceManager;
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.locator.interfaces.nodes.IPeerModel;
/**
@@ -80,6 +85,24 @@ public final class Launch extends TCFLaunch {
}
/* (non-Javadoc)
+ * @see org.eclipse.tcf.internal.debug.model.TCFLaunch#readCustomPathMapConfiguration(org.eclipse.tcf.protocol.IChannel, org.eclipse.debug.core.ILaunchConfiguration, java.util.List)
+ */
+ @Override
+ protected void readCustomPathMapConfiguration(IChannel channel, ILaunchConfiguration cfg, List<PathMapRule> host_path_map) {
+ Assert.isNotNull(channel);
+ Assert.isNotNull(cfg);
+ Assert.isNotNull(host_path_map);
+
+ IPathMapGeneratorService generator = ServiceManager.getInstance().getService(channel.getRemotePeer(), IPathMapGeneratorService.class);
+ if (generator != null) {
+ PathMapRule[] generatedRules = generator.getPathMap(channel.getRemotePeer());
+ if (generatedRules != null && generatedRules.length > 0) {
+ host_path_map.addAll(Arrays.asList(generatedRules));
+ }
+ }
+ }
+
+ /* (non-Javadoc)
* @see org.eclipse.debug.core.Launch#getAdapter(java.lang.Class)
*/
@Override

Back to the top