1 11 package org.eclipse.team.internal.ccvs.core; 12 13 import org.eclipse.core.resources.IResource; 14 import org.eclipse.core.runtime.*; 15 import org.eclipse.team.core.TeamException; 16 import org.eclipse.team.core.subscribers.*; 17 import org.eclipse.team.core.synchronize.*; 18 import org.eclipse.team.core.variants.*; 19 20 public class CVSMergeSyncInfo extends CVSSyncInfo { 21 22 public CVSMergeSyncInfo(IResource local, IResourceVariant base, IResourceVariant remote, Subscriber subscriber) { 23 super(local, base, remote, subscriber); 24 } 25 26 29 protected int handleDeletionConflicts(int kind) { 30 if(kind == (SyncInfo.CONFLICTING | SyncInfo.DELETION | SyncInfo.PSEUDO_CONFLICT)) { 32 return SyncInfo.IN_SYNC; 33 } 34 return kind; 35 } 36 37 protected int calculateKind() throws TeamException { 38 if (((CVSMergeSubscriber)getSubscriber()).isMerged(getLocal())) { 40 return IN_SYNC; 41 } 42 43 int kind = super.calculateKind(); 44 45 if((kind & DIRECTION_MASK) == OUTGOING) { 47 return IN_SYNC; 48 } 49 50 return kind; 51 } 52 53 56 public IStatus makeOutgoing(IProgressMonitor monitor) throws TeamException { 57 CVSMergeSubscriber subscriber = (CVSMergeSubscriber)getSubscriber(); 59 subscriber.merged(new IResource[] {getLocal() }); 60 return Status.OK_STATUS; 61 } 62 } 63 | Popular Tags |