Package org.eclipse.compare.internal
Class Worker
java.lang.Object
org.eclipse.compare.internal.Worker
- All Implemented Interfaces:
IRunnableWithProgress
A worker performs a set of tasks in order and accumulates any errors
that may have occurred. If the same task is queued multiple times,
the last occurrence will be run. If a task is queued while it is
running, the running task will be canceled and the task added
to the end of the work queue.
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionvoid
protected String
boolean
hasWork()
boolean
void
run
(IProgressMonitor monitor) Runs this operation.
-
Constructor Details
-
Worker
-
-
Method Details
-
run
Description copied from interface:IRunnableWithProgress
Runs this operation. Progress should be reported to the given progress monitor. This method is usually invoked by anIRunnableContext
'srun
method, which supplies the progress monitor. A request to cancel the operation should be honored and acknowledged by throwingInterruptedException
.- Specified by:
run
in interfaceIRunnableWithProgress
- Parameters:
monitor
- the progress monitor to use to display progress and receive requests for cancelation- See Also:
-
getErrors
-
getTaskName
-
add
-
isWorking
public boolean isWorking() -
hasWork
public boolean hasWork()
-