Package org.eclipse.core.runtime
Interface ICoreRunnable
-
- All Known Subinterfaces:
IWorkspaceRunnable
- All Known Implementing Classes:
CheckConditionsOperation
,CreateChangeOperation
,PerformChangeOperation
,PerformRefactoringHistoryOperation
,PerformRefactoringOperation
,RunToLineHandler
public interface ICoreRunnable
A functional interface for a runnable that can be cancelled and can report progress using the progress monitor passed to therun(IProgressMonitor)
method.Clients may implement this interface.
- Since:
- 3.8
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description void
run(IProgressMonitor monitor)
Executes this runnable.
-
-
-
Method Detail
-
run
void run(IProgressMonitor monitor) throws CoreException
Executes this runnable.The provided monitor can be used to report progress and respond to cancellation. If the progress monitor has been canceled, the runnable should finish its execution at the earliest convenience and throw an
OperationCanceledException
. ACoreException
with a status of severityIStatus.CANCEL
has the same effect as anOperationCanceledException
.- Parameters:
monitor
- a progress monitor, ornull
if progress reporting and cancellation are not desired. The monitor is only valid for the duration of the invocation of this method. The receiver is not responsible for callingIProgressMonitor.done()
on the given monitor, and the caller must not rely onIProgressMonitor.done()
having been called by the receiver.- Throws:
CoreException
- if this operation failsOperationCanceledException
- if this operation is canceled
-
-