1 11 package org.eclipse.team.internal.ccvs.ui.subscriber; 12 13 import org.eclipse.compare.structuremergeviewer.IDiffElement; 14 import org.eclipse.jface.viewers.ISelectionProvider; 15 import org.eclipse.team.core.synchronize.FastSyncInfoFilter; 16 import org.eclipse.team.core.synchronize.SyncInfo; 17 import org.eclipse.team.core.synchronize.FastSyncInfoFilter.OrSyncInfoFilter; 18 import org.eclipse.team.core.synchronize.FastSyncInfoFilter.SyncInfoDirectionFilter; 19 import org.eclipse.team.ui.synchronize.ISynchronizePageConfiguration; 20 import org.eclipse.team.ui.synchronize.SynchronizeModelOperation; 21 22 23 public class MergeUpdateAction extends CVSParticipantAction { 24 25 public MergeUpdateAction(ISynchronizePageConfiguration configuration) { 26 super(configuration); 27 } 28 29 public MergeUpdateAction(ISynchronizePageConfiguration configuration, ISelectionProvider provider, String bundleKey) { 30 super(configuration, provider, bundleKey); 31 } 32 33 private boolean promptBeforeUpdate; 34 35 38 protected FastSyncInfoFilter getSyncInfoFilter() { 39 return new OrSyncInfoFilter(new FastSyncInfoFilter[] { 41 new SyncInfoDirectionFilter(SyncInfo.INCOMING), 42 new SyncInfoDirectionFilter(SyncInfo.CONFLICTING) 43 }); 44 } 45 46 49 protected SynchronizeModelOperation getSubscriberOperation(ISynchronizePageConfiguration configuration, IDiffElement[] elements) { 50 return new MergeUpdateOperation(configuration, elements, promptBeforeUpdate); 51 } 52 53 public void setPromptBeforeUpdate(boolean prompt) { 54 promptBeforeUpdate = prompt; 55 } 56 } 57 | Popular Tags |