public class ThreadProgressMonitor extends Object
IProgressMonitor
s used in a thread. Allows subtasking
w/o knowing of the parent task.Constructor and Description |
---|
ThreadProgressMonitor() |
Modifier and Type | Method and Description |
---|---|
static org.eclipse.core.runtime.IProgressMonitor |
getCurrent()
Get the monitor currently associated with the thread.
|
static void |
register(org.eclipse.core.runtime.IProgressMonitor monitor)
Register a progress monitor with the current thread.
|
static void |
remove(org.eclipse.core.runtime.IProgressMonitor monitor)
Remove a progress monitor that was previously registered.
|
static void |
runWithProgressDialog(org.eclipse.jface.operation.IRunnableWithProgress op,
boolean isCancelable)
Run the given operation in a forked thread with a progress monitor dialog
or in the current thread with a sub progress monitor if possible.
|
public static org.eclipse.core.runtime.IProgressMonitor getCurrent()
null
public static void register(org.eclipse.core.runtime.IProgressMonitor monitor)
remove(IProgressMonitor)
.monitor
- the progress monitorpublic static void remove(org.eclipse.core.runtime.IProgressMonitor monitor)
monitor
- the progress monitor to removepublic static void runWithProgressDialog(org.eclipse.jface.operation.IRunnableWithProgress op, boolean isCancelable) throws Exception
op
- the operation to executeisCancelable
- if the operation can be canceledException
- if any error occurs executing the operationBuild 2013-10-07_11-27-38
Revision 99b27713a799a59a21b0b166eaaea8aaefbf125a