1 11 package org.eclipse.team.internal.ccvs.ui.mappings; 12 13 import org.eclipse.core.runtime.CoreException; 14 import org.eclipse.core.runtime.IProgressMonitor; 15 import org.eclipse.team.core.diff.DiffFilter; 16 import org.eclipse.team.core.diff.IDiff; 17 import org.eclipse.team.core.mapping.ISynchronizationScopeManager; 18 import org.eclipse.team.core.mapping.provider.SynchronizationContext; 19 import org.eclipse.team.core.subscribers.Subscriber; 20 import org.eclipse.team.internal.ccvs.core.CVSCompareSubscriber; 21 import org.eclipse.team.internal.core.subscribers.ContentComparisonDiffFilter; 22 23 public class CompareSubscriberContext extends CVSSubscriberMergeContext { 24 25 public static SynchronizationContext createContext(ISynchronizationScopeManager manager, CVSCompareSubscriber subscriber) { 26 CompareSubscriberContext mergeContext = new CompareSubscriberContext(subscriber, manager); 27 mergeContext.initialize(); 28 return mergeContext; 29 } 30 31 protected CompareSubscriberContext(Subscriber subscriber, ISynchronizationScopeManager manager) { 32 super(subscriber, manager); 33 } 34 35 38 public void markAsMerged(IDiff node, boolean inSyncHint, 39 IProgressMonitor monitor) throws CoreException { 40 } 42 43 46 protected DiffFilter getDiffFilter() { 47 final DiffFilter contentsEqual = new ContentComparisonDiffFilter(false); 49 return new DiffFilter() { 50 public boolean select(IDiff diff, IProgressMonitor monitor) { 51 return !contentsEqual.select(diff, monitor); 52 } 53 }; 54 } 55 56 } 57 | Popular Tags |