Skip to main content
aboutsummaryrefslogtreecommitdiffstats
path: root/tests
diff options
context:
space:
mode:
authorMichael Valenta2005-03-18 22:07:23 +0000
committerMichael Valenta2005-03-18 22:07:23 +0000
commit07168238457bbd675afb6d9cb77f169388a1ab6c (patch)
treee368d734ba42986dea078041a89c3805da9aeda7 /tests
parent217eebbd3c935b747f00197d0687c17626f23e3c (diff)
downloadeclipse.platform.team-07168238457bbd675afb6d9cb77f169388a1ab6c.tar.gz
eclipse.platform.team-07168238457bbd675afb6d9cb77f169388a1ab6c.tar.xz
eclipse.platform.team-07168238457bbd675afb6d9cb77f169388a1ab6c.zip
Adjusted Team/CVS to ResourceMappingContext change
Diffstat (limited to 'tests')
-rw-r--r--tests/org.eclipse.team.tests.cvs.core/src/org/eclipse/team/tests/ccvs/core/mappings/ResourceMapperTests.java10
-rw-r--r--tests/org.eclipse.team.tests.cvs.core/src/org/eclipse/team/tests/ccvs/core/mappings/SyncInfoSetTraveralContext.java4
2 files changed, 8 insertions, 6 deletions
diff --git a/tests/org.eclipse.team.tests.cvs.core/src/org/eclipse/team/tests/ccvs/core/mappings/ResourceMapperTests.java b/tests/org.eclipse.team.tests.cvs.core/src/org/eclipse/team/tests/ccvs/core/mappings/ResourceMapperTests.java
index 07c57b926..f28c6da4e 100644
--- a/tests/org.eclipse.team.tests.cvs.core/src/org/eclipse/team/tests/ccvs/core/mappings/ResourceMapperTests.java
+++ b/tests/org.eclipse.team.tests.cvs.core/src/org/eclipse/team/tests/ccvs/core/mappings/ResourceMapperTests.java
@@ -115,7 +115,7 @@ public class ResourceMapperTests extends EclipseTest {
private void assertAdded(ResourceMapping mapping, final SyncInfoTree set) throws CoreException {
// Assert that all resources covered by the mapping are now under version control (i.e. are in-sync)
// Remove the resources contained in the mapping from the set of unadded resources.
- visit(mapping, null, new IResourceVisitor() {
+ visit(mapping, ResourceMappingContext.LOCAL_CONTEXT, new IResourceVisitor() {
public boolean visit(IResource resource) throws CoreException {
ICVSResource cvsResource = getCVSResource(resource);
assertTrue("Resource was not added but should have been: " + resource.getFullPath(),
@@ -170,7 +170,7 @@ public class ResourceMapperTests extends EclipseTest {
private void assertTagged(ResourceMapping mapping, final CVSTag tag) throws CoreException {
final Map tagged = getTaggedRemoteFilesByPath(mapping, tag);
// Visit all the resources in the traversal and ensure that they are tagged
- visit(mapping, null, new IResourceVisitor() {
+ visit(mapping, ResourceMappingContext.LOCAL_CONTEXT, new IResourceVisitor() {
public boolean visit(IResource resource) throws CoreException {
if (resource.getType() == IResource.FILE) {
ICVSRemoteFile file = popRemote(resource, tagged);
@@ -402,8 +402,10 @@ public class ResourceMapperTests extends EclipseTest {
if (!visitor.visit(resource) || depth == IResource.DEPTH_ZERO || resource.getType() == IResource.FILE) return;
Set members = new HashSet();
members.addAll(Arrays.asList(((IContainer)resource).members(false)));
- if (context != null)
- members.addAll(Arrays.asList(context.fetchMembers((IContainer)resource, DEFAULT_MONITOR)));
+ if (context instanceof RemoteResourceMappingContext) {
+ RemoteResourceMappingContext remoteContext = (RemoteResourceMappingContext) context;
+ members.addAll(Arrays.asList(remoteContext.fetchMembers((IContainer)resource, DEFAULT_MONITOR)));
+ }
for (Iterator iter = members.iterator(); iter.hasNext();) {
IResource member = (IResource) iter.next();
visit(member, visitor, context, depth == IResource.DEPTH_ONE ? IResource.DEPTH_ZERO : IResource.DEPTH_INFINITE);
diff --git a/tests/org.eclipse.team.tests.cvs.core/src/org/eclipse/team/tests/ccvs/core/mappings/SyncInfoSetTraveralContext.java b/tests/org.eclipse.team.tests.cvs.core/src/org/eclipse/team/tests/ccvs/core/mappings/SyncInfoSetTraveralContext.java
index 87ac30489..ad14b21ed 100644
--- a/tests/org.eclipse.team.tests.cvs.core/src/org/eclipse/team/tests/ccvs/core/mappings/SyncInfoSetTraveralContext.java
+++ b/tests/org.eclipse.team.tests.cvs.core/src/org/eclipse/team/tests/ccvs/core/mappings/SyncInfoSetTraveralContext.java
@@ -13,7 +13,7 @@ package org.eclipse.team.tests.ccvs.core.mappings;
import java.util.*;
import org.eclipse.core.resources.*;
-import org.eclipse.core.resources.mapping.ResourceMappingContext;
+import org.eclipse.core.resources.mapping.RemoteResourceMappingContext;
import org.eclipse.core.resources.mapping.ResourceTraversal;
import org.eclipse.core.runtime.CoreException;
import org.eclipse.core.runtime.IProgressMonitor;
@@ -25,7 +25,7 @@ import org.eclipse.team.core.variants.IResourceVariant;
* adds resources that exist in the given sync info set but do not exist
* locally.
*/
-public class SyncInfoSetTraveralContext extends ResourceMappingContext {
+public class SyncInfoSetTraveralContext extends RemoteResourceMappingContext {
SyncInfoTree set;

Back to the top