Start line:  
End line:  

Snippet Preview

Snippet HTML Code

Stack Overflow Questions
Copyright (c) 2008, 2010 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.internal.ccvs.ui.subscriber;
import  org.eclipse.swt.custom.BusyIndicator;
import  org.eclipse.swt.widgets.Display;
public class ApplyPatchAction extends CVSParticipantAction {
		super(configuration);
	}
			ISynchronizePageConfiguration configurationIDiffElement[] elements) {
		return null;
	}
	public void runOperation() {
		boolean isPatch = false;
		if (resource instanceof IFile) {
			try {
				isPatch = ApplyPatchOperation.isPatch((IFileresource);
catch (CoreException e) {
				TeamUIPlugin.log(e);
			}
		}
		if (isPatch) {
			op = new ApplyPatchOperation(
					getConfiguration().getSite().getPart(), (IFileresource,
					nullnew CompareConfiguration());
else {
			op = new ApplyPatchOperation(
					getConfiguration().getSite().getPart(), resource);
		}
		BusyIndicator.showWhile(Display.getDefault(), op);
	}
New to GrepCode? Check out our FAQ X