blob: 6b27f23f146166fb81c02298108a05fcdec65640 [file] [log] [blame]
/*******************************************************************************
* Copyright (c) 2000, 2004 IBM Corporation and others.
* All rights reserved. This program and the accompanying materials
* are made available under the terms of the Eclipse Public License v1.0
* which accompanies this distribution, and is available at
* http://www.eclipse.org/legal/epl-v10.html
*
* Contributors:
* IBM Corporation - initial API and implementation
*******************************************************************************/
package org.eclipse.team.examples.filesystem.ui;
import org.eclipse.compare.structuremergeviewer.IDiffElement;
import org.eclipse.team.core.synchronize.FastSyncInfoFilter;
import org.eclipse.team.core.synchronize.SyncInfo;
import org.eclipse.team.core.synchronize.FastSyncInfoFilter.SyncInfoDirectionFilter;
import org.eclipse.team.ui.synchronize.*;
/**
* Put action that appears in the synchronize view. It's main purpose is
* to filter the selection and delegate its execution to the put operation.
*/
public class PutSynchronizeAction extends SynchronizeModelAction {
public PutSynchronizeAction(String text, ISynchronizePageConfiguration configuration) {
super(text, configuration);
}
/* (non-Javadoc)
* @see org.eclipse.team.ui.synchronize.SynchronizeModelAction#getSyncInfoFilter()
*/
protected FastSyncInfoFilter getSyncInfoFilter() {
return new SyncInfoDirectionFilter(new int[] {SyncInfo.OUTGOING, SyncInfo.CONFLICTING});
}
/* (non-Javadoc)
* @see org.eclipse.team.ui.synchronize.SynchronizeModelAction#getSubscriberOperation(org.eclipse.team.ui.synchronize.ISynchronizePageConfiguration, org.eclipse.compare.structuremergeviewer.IDiffElement[])
*/
protected SynchronizeModelOperation getSubscriberOperation(ISynchronizePageConfiguration configuration, IDiffElement[] elements) {
return new PutSynchronizeOperation(configuration, elements);
}
}