public class RunnableWithProgressAdapter
extends java.lang.Object
implements org.eclipse.jface.operation.IRunnableWithProgress
IRunnableWithProgress
adapter that can be used to wrap IWorkspaceOperation
s,
ILabeledWorkspaceRunnable
s, or IWorkspaceRunnable
s and run them as IRunnableWithProgress
in
an IRunnableContext
that provides the UI for the progress monitor and cancel button.
The RunnableWithProgressAdapter
is in principal very similar to the
WorkspaceModifyDelegatingOperation
. The main differences are that the enclosed operation can be one of
IWorkspaceOperation
, ILabeledWorkspaceRunnable
, or IWorkspaceRunnable
instead of having to be
an IRunnableWithProgress
itself, and that the ISchedulingRule
is retrieved from the enclosed
operation, in case it is an IWorkspaceOperation
, instead of providing it on the IRunnableWithProgress
adapter itself.
IRunnableWithProgress
,
IRunnableContext
,
IWorkspaceOperation
,
IWorkspaceRunnable
,
WorkspaceModifyOperation
Constructor and Description |
---|
RunnableWithProgressAdapter(ILabeledWorkspaceRunnable operation) |
RunnableWithProgressAdapter(IWorkspaceOperation operation) |
RunnableWithProgressAdapter(org.eclipse.core.resources.IWorkspaceRunnable operation) |
RunnableWithProgressAdapter(java.lang.String label,
org.eclipse.core.runtime.jobs.ISchedulingRule rule,
org.eclipse.core.resources.IWorkspaceRunnable operation) |
Modifier and Type | Method and Description |
---|---|
void |
run(org.eclipse.core.runtime.IProgressMonitor monitor) |
public RunnableWithProgressAdapter(org.eclipse.core.resources.IWorkspaceRunnable operation)
public RunnableWithProgressAdapter(ILabeledWorkspaceRunnable operation)
public RunnableWithProgressAdapter(IWorkspaceOperation operation)
public RunnableWithProgressAdapter(java.lang.String label, org.eclipse.core.runtime.jobs.ISchedulingRule rule, org.eclipse.core.resources.IWorkspaceRunnable operation)
public void run(org.eclipse.core.runtime.IProgressMonitor monitor) throws java.lang.reflect.InvocationTargetException, java.lang.InterruptedException
run
in interface org.eclipse.jface.operation.IRunnableWithProgress
java.lang.reflect.InvocationTargetException
java.lang.InterruptedException