1 /*******************************************************************************
2 * Copyright (C) 2010, Jens Baumgart <jens.baumgart@sap.com>
4 * All rights reserved. This program and the accompanying materials
5 * are made available under the terms of the Eclipse Public License v1.0
6 * which accompanies this distribution, and is available at
7 * http://www.eclipse.org/legal/epl-v10.html
8 *******************************************************************************/
9 package org
.eclipse
.egit
.core
.op
;
11 import org
.eclipse
.core
.resources
.IResourceRuleFactory
;
12 import org
.eclipse
.core
.runtime
.CoreException
;
13 import org
.eclipse
.core
.runtime
.IProgressMonitor
;
14 import org
.eclipse
.core
.runtime
.jobs
.ISchedulingRule
;
17 * interface for EGit operations
20 public interface IEGitOperation
{
22 * Executes the operation
25 * a progress monitor, or <code>null</code> if progress reporting
26 * and cancellation are not desired
27 * @throws CoreException
29 void execute(IProgressMonitor monitor
) throws CoreException
;
32 * @return the rule needed to execute this operation.
33 * <code>null</code> if no rule is required.
34 * A rule is required if the operation changes resources.
35 * It can also be useful to use a rule for reading resources to avoid
36 * changes on the resources by other threads while the operation is running.
37 * @see IResourceRuleFactory
39 ISchedulingRule
getSchedulingRule();