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
24 * @throws CoreException
26 void execute(IProgressMonitor monitor
) throws CoreException
;
29 * @return the rule needed to execute this operation.
30 * <code>null</code> if no rule is required.
31 * A rule is required if the operation changes resources.
32 * It can also be useful to use a rule for reading resources to avoid
33 * changes on the resources by other threads while the operation is running.
34 * @see IResourceRuleFactory
36 ISchedulingRule
getSchedulingRule();