Skip to main content
aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMichael Valenta2006-01-27 16:40:22 +0000
committerMichael Valenta2006-01-27 16:40:22 +0000
commit5b78ff214489d64637d80127b2978a1368052f9c (patch)
tree7583f684e7666c0869fdcd94910dc2700898b18d
parent8a34c56d18e95add05c78278299fb3c7aa6f22ae (diff)
downloadeclipse.platform.team-5b78ff214489d64637d80127b2978a1368052f9c.tar.gz
eclipse.platform.team-5b78ff214489d64637d80127b2978a1368052f9c.tar.xz
eclipse.platform.team-5b78ff214489d64637d80127b2978a1368052f9c.zip
Fixed parent of in-scope mapping handling
-rw-r--r--bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/mapping/ResourceTeamAwareContentProvider.java20
1 files changed, 12 insertions, 8 deletions
diff --git a/bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/mapping/ResourceTeamAwareContentProvider.java b/bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/mapping/ResourceTeamAwareContentProvider.java
index 454784690..c8f268a0c 100644
--- a/bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/mapping/ResourceTeamAwareContentProvider.java
+++ b/bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/mapping/ResourceTeamAwareContentProvider.java
@@ -181,15 +181,19 @@ public class ResourceTeamAwareContentProvider extends SynchronizationContentProv
return (ResourceTraversal[]) result.toArray(new ResourceTraversal[result.size()]);
} else {
// The resource is a parent of an in-scope resource
- IResource[] roots = scope.getRoots();
+ // TODO: fails due to se of roots
+ ResourceMapping[] mappings = scope.getMappings(ModelProvider.RESOURCE_MODEL_PROVIDER_ID);
List result = new ArrayList();
- for (int i = 0; i < roots.length; i++) {
- IResource root = roots[i];
- if (resource.getFullPath().isPrefixOf(root.getFullPath())) {
- mapping = scope.getMapping(root);
- if (mapping != null) {
- ResourceTraversal[] traversals = scope.getTraversals(mapping);
- result.addAll(Arrays.asList(traversals));
+ for (int i = 0; i < mappings.length; i++) {
+ ResourceMapping resourceMapping = mappings[i];
+ if (resourceMapping.getModelObject() instanceof IResource) {
+ IResource root = (IResource) resourceMapping.getModelObject();
+ if (resource.getFullPath().isPrefixOf(root.getFullPath())) {
+ mapping = scope.getMapping(root);
+ if (mapping != null) {
+ ResourceTraversal[] traversals = scope.getTraversals(mapping);
+ result.addAll(Arrays.asList(traversals));
+ }
}
}
}

Back to the top