1 11 package org.eclipse.team.internal.ccvs.ui.operations; 12 13 import org.eclipse.core.resources.mapping.ResourceMapping; 14 import org.eclipse.core.runtime.NullProgressMonitor; 15 import org.eclipse.team.core.TeamException; 16 import org.eclipse.team.core.diff.IThreeWayDiff; 17 import org.eclipse.team.core.history.IFileRevision; 18 import org.eclipse.team.core.mapping.IResourceDiff; 19 import org.eclipse.team.core.mapping.IResourceDiffTree; 20 import org.eclipse.team.internal.ccvs.core.*; 21 import org.eclipse.ui.IWorkbenchPart; 22 23 27 public class CacheRemoteContentsOperation extends CacheTreeContentsOperation { 28 29 public CacheRemoteContentsOperation(IWorkbenchPart part, ResourceMapping[] mappers, IResourceDiffTree tree) { 30 super(part, mappers, tree); 31 } 32 33 36 protected IFileRevision getRemoteFileState(IThreeWayDiff twd) { 37 IResourceDiff diff = (IResourceDiff)twd.getRemoteChange(); 38 if (diff == null) 39 return null; 40 return diff.getAfterState(); 41 } 42 43 46 protected boolean isEnabledForDirection(int direction) { 47 return direction == IThreeWayDiff.CONFLICTING || 48 direction == IThreeWayDiff.INCOMING; 49 } 50 53 protected ICVSRemoteResource buildTree(CVSTeamProvider provider) throws TeamException { 54 return CVSProviderPlugin.getPlugin().getCVSWorkspaceSubscriber().buildRemoteTree(provider.getProject(), true, new NullProgressMonitor()); 55 } 56 57 } 58 | Popular Tags |