public class WorkbenchRunnableAdapter
extends java.lang.Object
implements org.eclipse.jface.operation.IRunnableWithProgress
IRunnableWithProgress
that adapts and IWorkspaceRunnable
so that is can be executed inside IRunnableContext
. OperationCanceledException
thrown by the adapted runnable are caught and re-thrown as a InterruptedException
.Constructor and Description |
---|
WorkbenchRunnableAdapter(org.eclipse.core.resources.IWorkspaceRunnable runnable)
Runs a workspace runnable with the workspace lock.
|
WorkbenchRunnableAdapter(org.eclipse.core.resources.IWorkspaceRunnable runnable,
org.eclipse.core.runtime.jobs.ISchedulingRule rule)
Runs a workspace runnable with the given lock or
null to run with no lock at all. |
Modifier and Type | Method and Description |
---|---|
org.eclipse.core.runtime.jobs.ISchedulingRule |
getSchedulingRule() |
void |
run(org.eclipse.core.runtime.IProgressMonitor monitor) |
void |
runAsUserJob(java.lang.String name,
java.lang.Object jobFamiliy) |
public WorkbenchRunnableAdapter(org.eclipse.core.resources.IWorkspaceRunnable runnable)
public WorkbenchRunnableAdapter(org.eclipse.core.resources.IWorkspaceRunnable runnable, org.eclipse.core.runtime.jobs.ISchedulingRule rule)
null
to run with no lock at all.public org.eclipse.core.runtime.jobs.ISchedulingRule getSchedulingRule()
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
public void runAsUserJob(java.lang.String name, java.lang.Object jobFamiliy)