Package org.eclipse.core.runtime
Class ProgressMonitorWrapper
java.lang.Object
org.eclipse.core.runtime.ProgressMonitorWrapper
- All Implemented Interfaces:
IProgressMonitor
,IProgressMonitorWithBlocking
- Direct Known Subclasses:
SubProgressMonitor
public abstract class ProgressMonitorWrapper
extends Object
implements IProgressMonitor, IProgressMonitorWithBlocking
An abstract wrapper around a progress monitor which, unless overridden,
forwards
IProgressMonitor
and
IProgressMonitorWithBlocking
methods to the wrapped progress
monitor.
This class can be used without OSGi running.
Clients may subclass.
-
Field Summary
Fields inherited from interface org.eclipse.core.runtime.IProgressMonitor
UNKNOWN
-
Constructor Summary
ModifierConstructorDescriptionprotected
ProgressMonitorWrapper
(IProgressMonitor monitor) Creates a new wrapper around the given monitor. -
Method Summary
Modifier and TypeMethodDescriptionvoid
This implementation of aIProgressMonitor
method forwards to the wrapped progress monitor.void
This implementation of aIProgressMonitorWithBlocking
method forwards to the wrapped progress monitor.void
done()
This implementation of aIProgressMonitor
method forwards to the wrapped progress monitor.Returns the wrapped progress monitor.void
internalWorked
(double work) This implementation of aIProgressMonitor
method forwards to the wrapped progress monitor.boolean
This implementation of aIProgressMonitor
method forwards to the wrapped progress monitor.void
setBlocked
(IStatus reason) This implementation of aIProgressMonitorWithBlocking
method forwards to the wrapped progress monitor.void
setCanceled
(boolean b) This implementation of aIProgressMonitor
method forwards to the wrapped progress monitor.void
setTaskName
(String name) This implementation of aIProgressMonitor
method forwards to the wrapped progress monitor.void
This implementation of aIProgressMonitor
method forwards to the wrapped progress monitor.void
worked
(int work) This implementation of aIProgressMonitor
method forwards to the wrapped progress monitor.Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
Methods inherited from interface org.eclipse.core.runtime.IProgressMonitor
slice
-
Constructor Details
-
ProgressMonitorWrapper
Creates a new wrapper around the given monitor.- Parameters:
monitor
- the progress monitor to forward to
-
-
Method Details
-
beginTask
This implementation of aIProgressMonitor
method forwards to the wrapped progress monitor. Clients may override this method to do additional processing.- Specified by:
beginTask
in interfaceIProgressMonitor
- Parameters:
name
- the name (or description) of the main tasktotalWork
- the total number of work units into which the main task is been subdivided. If the value isUNKNOWN
the implementation is free to indicate progress in a way which doesn't require the total number of work units in advance.- See Also:
-
clearBlocked
public void clearBlocked()This implementation of aIProgressMonitorWithBlocking
method forwards to the wrapped progress monitor. Clients may override this method to do additional processing.- Specified by:
clearBlocked
in interfaceIProgressMonitor
- Since:
- 3.0
- See Also:
-
done
public void done()This implementation of aIProgressMonitor
method forwards to the wrapped progress monitor. Clients may override this method to do additional processing.- Specified by:
done
in interfaceIProgressMonitor
- See Also:
-
getWrappedProgressMonitor
Returns the wrapped progress monitor.- Returns:
- the wrapped progress monitor
-
internalWorked
public void internalWorked(double work) This implementation of aIProgressMonitor
method forwards to the wrapped progress monitor. Clients may override this method to do additional processing.- Specified by:
internalWorked
in interfaceIProgressMonitor
- Parameters:
work
- the amount of work done- See Also:
-
isCanceled
public boolean isCanceled()This implementation of aIProgressMonitor
method forwards to the wrapped progress monitor. Clients may override this method to do additional processing.- Specified by:
isCanceled
in interfaceIProgressMonitor
- Returns:
true
if cancellation has been requested, andfalse
otherwise- See Also:
-
setBlocked
This implementation of aIProgressMonitorWithBlocking
method forwards to the wrapped progress monitor. Clients may override this method to do additional processing.- Specified by:
setBlocked
in interfaceIProgressMonitor
- Parameters:
reason
- an optional status object whose message describes the reason why this operation is blocked, ornull
if this information is not available.- Since:
- 3.0
- See Also:
-
setCanceled
public void setCanceled(boolean b) This implementation of aIProgressMonitor
method forwards to the wrapped progress monitor. Clients may override this method to do additional processing.- Specified by:
setCanceled
in interfaceIProgressMonitor
- Parameters:
b
-true
indicates that cancelation has been requested (but not necessarily acknowledged);false
clears this flag- See Also:
-
setTaskName
This implementation of aIProgressMonitor
method forwards to the wrapped progress monitor. Clients may override this method to do additional processing.- Specified by:
setTaskName
in interfaceIProgressMonitor
- Parameters:
name
- the name (or description) of the main task- See Also:
-
subTask
This implementation of aIProgressMonitor
method forwards to the wrapped progress monitor. Clients may override this method to do additional processing.- Specified by:
subTask
in interfaceIProgressMonitor
- Parameters:
name
- the name (or description) of the subtask- See Also:
-
worked
public void worked(int work) This implementation of aIProgressMonitor
method forwards to the wrapped progress monitor. Clients may override this method to do additional processing.- Specified by:
worked
in interfaceIProgressMonitor
- Parameters:
work
- a non-negative number of work units just completed- See Also:
-