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 Contributors: IBM Corporation - initial API and implementation /
import  org.eclipse.swt.custom.BusyIndicator;
import  org.eclipse.swt.widgets.Display;
public class ApplyPatchAction extends CVSParticipantAction {
			ISynchronizePageConfiguration configurationIDiffElement[] elements) {
		return null;
	public void runOperation() {
		boolean isPatch = false;
		if (resource instanceof IFile) {
			try {
				isPatch = ApplyPatchOperation.isPatch((IFileresource);
catch (CoreException 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