Skip to main content
aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorUwe Stieber2013-08-27 11:38:05 -0400
committerUwe Stieber2013-08-27 11:38:05 -0400
commitd972a75391c527ba217e02663eeecc9f47f92549 (patch)
tree102ebbed1824b703985b41f9ed3aa4b825f583ff /target_explorer/plugins/org.eclipse.tcf.te.tcf.launch.core
parent02426d4443e31f0943c4b71ee46a1157cc8bbbc6 (diff)
downloadorg.eclipse.tcf-d972a75391c527ba217e02663eeecc9f47f92549.tar.gz
org.eclipse.tcf-d972a75391c527ba217e02663eeecc9f47f92549.tar.xz
org.eclipse.tcf-d972a75391c527ba217e02663eeecc9f47f92549.zip
Target Explorer: Further improve path map handling on open channel
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/internal/services/PathMapService.java23
1 files changed, 18 insertions, 5 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 435452816..8a2fcc88a 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
@@ -15,7 +15,7 @@ import org.eclipse.core.runtime.Assert;
import org.eclipse.core.runtime.CoreException;
import org.eclipse.core.runtime.Platform;
import org.eclipse.debug.core.ILaunchConfiguration;
-import org.eclipse.tcf.internal.debug.launch.TCFLaunchDelegate;
+import org.eclipse.tcf.services.IPathMap;
import org.eclipse.tcf.services.IPathMap.PathMapRule;
import org.eclipse.tcf.te.runtime.services.AbstractService;
import org.eclipse.tcf.te.tcf.core.interfaces.IPathMapService;
@@ -28,7 +28,7 @@ public class PathMapService extends AbstractService implements IPathMapService {
/* (non-Javadoc)
* @see org.eclipse.tcf.te.tcf.core.interfaces.IPathMapService#getPathMap(java.lang.Object)
*/
- @Override
+ @Override
public PathMapRule[] getPathMap(Object context) {
Assert.isNotNull(context);
@@ -42,9 +42,14 @@ public class PathMapService extends AbstractService implements IPathMapService {
if (config != null) {
try {
- String path_map_cfg = config.getAttribute(TCFLaunchDelegate.ATTR_PATH_MAP, ""); //$NON-NLS-1$
- ArrayList<org.eclipse.tcf.internal.debug.launch.TCFLaunchDelegate.PathMapRule> map = TCFLaunchDelegate.parsePathMapAttribute(path_map_cfg);
- if (map != null && !map.isEmpty()) {
+ String path_map_cfg = config.getAttribute(org.eclipse.tcf.internal.debug.launch.TCFLaunchDelegate.ATTR_PATH_MAP, ""); //$NON-NLS-1$
+ ArrayList<org.eclipse.tcf.internal.debug.launch.TCFLaunchDelegate.PathMapRule> map = org.eclipse.tcf.internal.debug.launch.TCFLaunchDelegate.parsePathMapAttribute(path_map_cfg);
+ path_map_cfg = config.getAttribute(ILaunchConfiguration.ATTR_SOURCE_LOCATOR_MEMENTO, ""); //$NON-NLS-1$
+ map.addAll(org.eclipse.tcf.internal.debug.launch.TCFLaunchDelegate.parseSourceLocatorMemento(path_map_cfg));
+ if (!map.isEmpty()) {
+ int cnt = 0;
+ String id = getClientID();
+ for (PathMapRule r : map) r.getProperties().put(IPathMap.PROP_ID, id + "/" + cnt++); //$NON-NLS-1$
rules = map.toArray(new PathMapRule[map.size()]);
}
} catch (CoreException e) { /* ignored on purpose */ }
@@ -53,4 +58,12 @@ public class PathMapService extends AbstractService implements IPathMapService {
return rules;
}
+ /* (non-Javadoc)
+ * @see org.eclipse.tcf.te.tcf.core.interfaces.IPathMapService#getClientID()
+ */
+ @SuppressWarnings("restriction")
+ @Override
+ public String getClientID() {
+ return org.eclipse.tcf.internal.debug.Activator.getClientID();
+ }
}

Back to the top