KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > org > eclipse > team > internal > ccvs > ui > subscriber > OverrideAndUpdateAction


1 /*******************************************************************************
2  * Copyright (c) 2000, 2006 IBM Corporation and others.
3  * All rights reserved. This program and the accompanying materials
4  * are made available under the terms of the Eclipse Public License v1.0
5  * which accompanies this distribution, and is available at
6  * http://www.eclipse.org/legal/epl-v10.html
7  *
8  * Contributors:
9  * IBM Corporation - initial API and implementation
10  *******************************************************************************/

11 package org.eclipse.team.internal.ccvs.ui.subscriber;
12
13 import org.eclipse.compare.structuremergeviewer.IDiffElement;
14 import org.eclipse.team.core.synchronize.FastSyncInfoFilter;
15 import org.eclipse.team.core.synchronize.SyncInfo;
16 import org.eclipse.team.core.synchronize.FastSyncInfoFilter.SyncInfoDirectionFilter;
17 import org.eclipse.team.ui.synchronize.ISynchronizePageConfiguration;
18 import org.eclipse.team.ui.synchronize.SynchronizeModelOperation;
19
20 /**
21  * Runs an update command that will prompt the user for overwritting local
22  * changes to files that have non-mergeable conflicts. All the prompting logic
23  * is in the super class.
24  */

25 public class OverrideAndUpdateAction extends CVSParticipantAction {
26     
27     public OverrideAndUpdateAction(ISynchronizePageConfiguration configuration) {
28         super(configuration);
29     }
30
31     /* (non-Javadoc)
32      * @see org.eclipse.team.ui.sync.SubscriberAction#getSyncInfoFilter()
33      */

34     protected FastSyncInfoFilter getSyncInfoFilter() {
35         return new SyncInfoDirectionFilter(new int[] {SyncInfo.CONFLICTING, SyncInfo.OUTGOING});
36     }
37     
38     protected SynchronizeModelOperation getSubscriberOperation(ISynchronizePageConfiguration configuration, IDiffElement[] elements) {
39         return new OverrideAndUpdateSubscriberOperation(configuration, elements);
40     }
41 }
42
Popular Tags