[trace] be able to handle multiple associated LocationDatas

This commit is contained in:
Moritz Eysholdt 2013-01-31 11:10:39 +01:00
parent 4f242d3429
commit c08a03295a

View file

@ -344,10 +344,17 @@ public abstract class AbstractTraceRegion {
return result;
}
}
if (parent != null && getAssociatedLocations().size() == 1) {
return parent.getAssociatedPath();
}
return null;
if (parent == null)
return null;
boolean uriSeen = false;
for (ILocationData associated : getAssociatedLocations())
if (associated.getPath() != null) {
if (!uriSeen)
uriSeen = true;
else
return null;
}
return parent.getAssociatedPath();
}
@Nullable