diff options
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)); } |