1 /*******************************************************************************2 * Copyright (c) 2000, 2006 IBM Corporation and others.3 * All rights reserved. This program and the accompanying materials4 * are made available under the terms of the Eclipse Public License v1.05 * which accompanies this distribution, and is available at6 * http://www.eclipse.org/legal/epl-v10.html7 *8 * Contributors:9 * IBM Corporation - initial API and implementation10 *******************************************************************************/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.AndSyncInfoFilter;17 import org.eclipse.team.core.synchronize.FastSyncInfoFilter.SyncInfoChangeTypeFilter;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 * Resets the dirty state of files whose contents match their base.24 */25 public class RefreshDirtyStateAction extends CVSParticipantAction {26 27 public RefreshDirtyStateAction(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 // Only interested in outgoing changes36 return new AndSyncInfoFilter(new FastSyncInfoFilter[] {37 new SyncInfoDirectionFilter(new int[] {SyncInfo.OUTGOING, SyncInfo.CONFLICTING }),38 new SyncInfoChangeTypeFilter(SyncInfo.CHANGE)39 });40 }41 42 /* (non-Javadoc)43 * @see org.eclipse.team.ui.synchronize.SynchronizeModelAction#getSubscriberOperation(org.eclipse.ui.IWorkbenchPart, org.eclipse.compare.structuremergeviewer.IDiffElement[])44 */45 protected SynchronizeModelOperation getSubscriberOperation(46 ISynchronizePageConfiguration configuration, IDiffElement[] elements) {47 return new RefreshDirtyStateOperation(configuration, elements);48 }49 }50