Skip to main content
aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorUwe Stieber2013-10-26 05:11:24 -0400
committerUwe Stieber2013-10-26 05:11:24 -0400
commit46a5d070fefe9dc7aada96634d3cd2e391d9ca71 (patch)
tree7ff0a24eea76b6659f092cd843a42bef9a159f53 /target_explorer
parent584638c5d2d968b68adc69ede516cf8d19211693 (diff)
downloadorg.eclipse.tcf-46a5d070fefe9dc7aada96634d3cd2e391d9ca71.tar.gz
org.eclipse.tcf-46a5d070fefe9dc7aada96634d3cd2e391d9ca71.tar.xz
org.eclipse.tcf-46a5d070fefe9dc7aada96634d3cd2e391d9ca71.zip
Target Explorer: Improve host to target path resolver algorithm
Diffstat (limited to 'target_explorer')
-rw-r--r--target_explorer/plugins/org.eclipse.tcf.te.tcf.core/src/org/eclipse/tcf/te/tcf/core/internal/services/PathMapResolverService.java8
-rw-r--r--target_explorer/plugins/org.eclipse.tcf.te.tcf.locator/src/org/eclipse/tcf/te/tcf/locator/services/LocatorModelRefreshService.java4
2 files changed, 10 insertions, 2 deletions
diff --git a/target_explorer/plugins/org.eclipse.tcf.te.tcf.core/src/org/eclipse/tcf/te/tcf/core/internal/services/PathMapResolverService.java b/target_explorer/plugins/org.eclipse.tcf.te.tcf.core/src/org/eclipse/tcf/te/tcf/core/internal/services/PathMapResolverService.java
index f2f6f5bbd..5497bc9f4 100644
--- a/target_explorer/plugins/org.eclipse.tcf.te.tcf.core/src/org/eclipse/tcf/te/tcf/core/internal/services/PathMapResolverService.java
+++ b/target_explorer/plugins/org.eclipse.tcf.te.tcf.core/src/org/eclipse/tcf/te/tcf/core/internal/services/PathMapResolverService.java
@@ -56,6 +56,10 @@ public class PathMapResolverService extends AbstractService implements IPathMapR
Assert.isNotNull(rule);
Assert.isNotNull(fnm);
+ // Note: For reverse mapping the path map rule, rules having an
+ // absolute path in the destination field but not in the source
+ // field are ignored.
+
String dst = rule.getDestination();
if (dst == null) return null;
if (!(new Path(dst).isPrefixOf(new Path(fnm)))) return null;
@@ -65,6 +69,10 @@ public class PathMapResolverService extends AbstractService implements IPathMapR
}
String src = rule.getSource();
if (src == null || src.length() == 0) return null;
+ if (new Path(dst).isAbsolute() && !src.startsWith("/") //$NON-NLS-1$
+ && (src.indexOf(':') == -1 || src.indexOf(':') > src.indexOf('/'))) {
+ return null;
+ }
int l = dst.length();
if (src.endsWith("/") && l < fnm.length() && fnm.charAt(l) == '/') l++; //$NON-NLS-1$
return new Path(src + fnm.substring(l)).toString();
diff --git a/target_explorer/plugins/org.eclipse.tcf.te.tcf.locator/src/org/eclipse/tcf/te/tcf/locator/services/LocatorModelRefreshService.java b/target_explorer/plugins/org.eclipse.tcf.te.tcf.locator/src/org/eclipse/tcf/te/tcf/locator/services/LocatorModelRefreshService.java
index dcc686994..37871d615 100644
--- a/target_explorer/plugins/org.eclipse.tcf.te.tcf.locator/src/org/eclipse/tcf/te/tcf/locator/services/LocatorModelRefreshService.java
+++ b/target_explorer/plugins/org.eclipse.tcf.te.tcf.locator/src/org/eclipse/tcf/te/tcf/locator/services/LocatorModelRefreshService.java
@@ -526,8 +526,8 @@ public class LocatorModelRefreshService extends AbstractLocatorModelService impl
List<IPeerModel> nodesToProcess = new ArrayList<IPeerModel>(Arrays.asList(nodes != null ? nodes : model.getPeers()));
// Loop the list of static peers and try to get the agent ID
for (IPeerModel node : nodesToProcess) {
- // If not static --> ignore
- if (!node.isStatic()) continue;
+ // If not static or not complete --> ignore
+ if (!node.isStatic() || !node.isComplete()) continue;
// Refresh the agent ID
refreshAgentID(node, new AsyncCallbackCollector.SimpleCollectorCallback(collector));
}

Back to the top