Skip to main content
aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJean Michel-Lemieux2002-03-15 16:10:56 +0000
committerJean Michel-Lemieux2002-03-15 16:10:56 +0000
commit3d390fff6489beda97cf85019844130f88b70a52 (patch)
tree5434edb65b036f08aeebec41a96583699aae8cd4
parent353bd9c1cc818db771854515a0ef8641f08f3020 (diff)
downloadeclipse.platform.team-3d390fff6489beda97cf85019844130f88b70a52.tar.gz
eclipse.platform.team-3d390fff6489beda97cf85019844130f88b70a52.tar.xz
eclipse.platform.team-3d390fff6489beda97cf85019844130f88b70a52.zip
Bug 11192: rename ofproject giving an internal errorsplit-project-branch
-rw-r--r--bundles/org.eclipse.team.cvs.core/src/org/eclipse/team/internal/ccvs/core/resources/EclipseSynchronizer.java30
1 files changed, 17 insertions, 13 deletions
diff --git a/bundles/org.eclipse.team.cvs.core/src/org/eclipse/team/internal/ccvs/core/resources/EclipseSynchronizer.java b/bundles/org.eclipse.team.cvs.core/src/org/eclipse/team/internal/ccvs/core/resources/EclipseSynchronizer.java
index 00ec5b04b..86f100d22 100644
--- a/bundles/org.eclipse.team.cvs.core/src/org/eclipse/team/internal/ccvs/core/resources/EclipseSynchronizer.java
+++ b/bundles/org.eclipse.team.cvs.core/src/org/eclipse/team/internal/ccvs/core/resources/EclipseSynchronizer.java
@@ -179,8 +179,19 @@ public class EclipseSynchronizer {
public IResource[] members(IContainer folder) throws CVSException {
try {
ensureChildResourceSyncLoaded(folder);
- HashMap children = (HashMap)folder.getSessionProperty(RESOURCE_SYNC_KEY);
- Set childResources = new HashSet(children.keySet() /*IResource*/);
+ Set childResources = new HashSet();
+ HashMap children = (HashMap)folder.getSessionProperty(RESOURCE_SYNC_KEY);
+ if(children!=null) {
+ for(Iterator it = children.values().iterator(); it.hasNext();) {
+ ResourceSyncInfo info = (ResourceSyncInfo)it.next();
+ IPath path = new Path(info.getName());
+ if(info.isDirectory()) {
+ childResources.add(folder.getFolder(path));
+ } else {
+ childResources.add(folder.getFile(path));
+ }
+ }
+ }
childResources.addAll(Arrays.asList(folder.members()));
return (IResource[])childResources.toArray(new IResource[childResources.size()]);
} catch (CoreException e) {
@@ -287,7 +298,7 @@ public class EclipseSynchronizer {
if(parent.exists()) {
HashMap children = (HashMap)resource.getParent().getSessionProperty(RESOURCE_SYNC_KEY);
if(children!=null) {
- return (ResourceSyncInfo)children.get(resource);
+ return (ResourceSyncInfo)children.get(resource.getName());
}
}
return null;
@@ -326,7 +337,7 @@ public class EclipseSynchronizer {
children.remove(resource);
} else {
// replace or add new resource sync
- children.put(resource, info);
+ children.put(resource.getName(), info);
}
parent.setSessionProperty(RESOURCE_SYNC_KEY, children);
}
@@ -389,15 +400,8 @@ public class EclipseSynchronizer {
if (infos != null) {
children = new HashMap(infos.length);
for (int i = 0; i < infos.length; i++) {
- ResourceSyncInfo syncInfo = infos[i];
- IResource peer;
- IPath path = new Path(syncInfo.getName());
- if (syncInfo.isDirectory()) {
- peer = folder.getFolder(path);
- } else {
- peer = folder.getFile(path);
- }
- children.put(peer, syncInfo);
+ ResourceSyncInfo syncInfo = infos[i];
+ children.put(syncInfo.getName(), syncInfo);
}
} else {
children = new HashMap(0);

Back to the top