Package org.eclipse.core.runtime
Class NullProgressMonitor
java.lang.Object
org.eclipse.core.runtime.NullProgressMonitor
- All Implemented Interfaces:
IProgressMonitor
A default progress monitor implementation suitable for subclassing.
This implementation supports cancelation. The default implementations of the other methods do nothing.
This class can be used without OSGi running.
-
Field Summary
Fields inherited from interface org.eclipse.core.runtime.IProgressMonitor
UNKNOWN -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidThis implementation does nothing.voiddone()This implementation does nothing.voidinternalWorked(double work) This implementation does nothing.booleanThis implementation returns the value of the internal state variable set bysetCanceled.voidsetCanceled(boolean cancelled) This implementation sets the value of an internal state variable.voidsetTaskName(String name) This implementation does nothing.voidThis implementation does nothing.voidworked(int work) This implementation does nothing.Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface org.eclipse.core.runtime.IProgressMonitor
clearBlocked, setBlocked, slice
-
Constructor Details
-
NullProgressMonitor
public NullProgressMonitor()Constructs a new progress monitor.
-
-
Method Details
-
beginTask
This implementation does nothing. Subclasses may override this method to do interesting processing when a task begins.- Specified by:
beginTaskin 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 isUNKNOWNthe implementation is free to indicate progress in a way which doesn't require the total number of work units in advance.- See Also:
-
done
public void done()This implementation does nothing. Subclasses may override this method to do interesting processing when a task is done.- Specified by:
donein interfaceIProgressMonitor- See Also:
-
internalWorked
public void internalWorked(double work) This implementation does nothing. Subclasses may override this method.- Specified by:
internalWorkedin interfaceIProgressMonitor- Parameters:
work- the amount of work done- See Also:
-
isCanceled
public boolean isCanceled()This implementation returns the value of the internal state variable set bysetCanceled. Subclasses which override this method should overridesetCanceledas well.- Specified by:
isCanceledin interfaceIProgressMonitor- Returns:
trueif cancellation has been requested, andfalseotherwise- See Also:
-
setCanceled
public void setCanceled(boolean cancelled) This implementation sets the value of an internal state variable. Subclasses which override this method should overrideisCanceledas well.- Specified by:
setCanceledin interfaceIProgressMonitor- Parameters:
cancelled-trueindicates that cancelation has been requested (but not necessarily acknowledged);falseclears this flag- See Also:
-
setTaskName
This implementation does nothing. Subclasses may override this method to do something with the name of the task.- Specified by:
setTaskNamein interfaceIProgressMonitor- Parameters:
name- the name (or description) of the main task- See Also:
-
subTask
This implementation does nothing. Subclasses may override this method to do interesting processing when a subtask begins.- Specified by:
subTaskin interfaceIProgressMonitor- Parameters:
name- the name (or description) of the subtask- See Also:
-
worked
public void worked(int work) This implementation does nothing. Subclasses may override this method to do interesting processing when some work has been completed.- Specified by:
workedin interfaceIProgressMonitor- Parameters:
work- a non-negative number of work units just completed- See Also:
-