1 /******************************************************************************* 2 * Copyright (c) 2000, 2006 IBM Corporation and others. 3 * 4 * This program and the accompanying materials 5 * are made available under the terms of the Eclipse Public License 2.0 6 * which accompanies this distribution, and is available at 7 * https://www.eclipse.org/legal/epl-2.0/ 8 * 9 * SPDX-License-Identifier: EPL-2.0 10 * 11 * Contributors: 12 * IBM Corporation - initial API and implementation 13 *******************************************************************************/ 14 package org.eclipse.team.internal.ccvs.ui.subscriber; 15 16 import org.eclipse.compare.structuremergeviewer.IDiffElement; 17 import org.eclipse.team.core.synchronize.FastSyncInfoFilter; 18 import org.eclipse.team.core.synchronize.FastSyncInfoFilter.SyncInfoDirectionFilter; 19 import org.eclipse.team.core.synchronize.SyncInfo; 20 import org.eclipse.team.ui.synchronize.ISynchronizePageConfiguration; 21 import org.eclipse.team.ui.synchronize.SynchronizeModelOperation; 22 23 /** 24 * Runs an update command that will prompt the user for overwritting local 25 * changes to files that have non-mergeable conflicts. All the prompting logic 26 * is in the super class. 27 */ 28 public class OverrideAndUpdateAction extends CVSParticipantAction { 29 OverrideAndUpdateAction(ISynchronizePageConfiguration configuration)30 public OverrideAndUpdateAction(ISynchronizePageConfiguration configuration) { 31 super(configuration); 32 } 33 34 @Override getSyncInfoFilter()35 protected FastSyncInfoFilter getSyncInfoFilter() { 36 return new SyncInfoDirectionFilter(new int[] {SyncInfo.CONFLICTING, SyncInfo.OUTGOING}); 37 } 38 39 @Override getSubscriberOperation(ISynchronizePageConfiguration configuration, IDiffElement[] elements)40 protected SynchronizeModelOperation getSubscriberOperation(ISynchronizePageConfiguration configuration, IDiffElement[] elements) { 41 return new OverrideAndUpdateSubscriberOperation(configuration, elements); 42 } 43 } 44