public class SilentProgressListener extends Object implements IProgressListener
IProgressListener.OperationCanceledException, IProgressListener.SeverityUNKNOWN_TOTAL_WORK| Constructor and Description |
|---|
SilentProgressListener(IProgressListener delegate) |
| Modifier and Type | Method and Description |
|---|---|
void |
beginTask(String name,
int totalWork)
Notifies that the main task is beginning.
|
void |
done()
Notifies that the work is done; that is, either the main task is
completed or the user canceled it.
|
boolean |
isCanceled()
Returns whether cancelation of current operation has been requested.
|
void |
sendUserMessage(IProgressListener.Severity severity,
String message,
Throwable exception)
Sends a message to the user.
|
void |
setCanceled(boolean value)
Sets the cancel state to the given value.
|
void |
subTask(String name)
Notifies that a subtask of the main task is beginning.
|
void |
worked(int work)
Notifies that a given number of work unit of the main task has been
completed.
|
public SilentProgressListener(IProgressListener delegate)
public void beginTask(String name, int totalWork)
IProgressListenerbeginTask in interface IProgressListenername - 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 is UNKNOWN the
implementation is free to indicate progress in a way which
doesn't require the total number of work units in advance.public void done()
IProgressListenerdone in interface IProgressListenerpublic boolean isCanceled()
IProgressListenerisCanceled in interface IProgressListenertrue if cancellation has been requested, and
false otherwiseIProgressListener.setCanceled(boolean)public void sendUserMessage(IProgressListener.Severity severity, String message, Throwable exception)
IProgressListenersendUserMessage in interface IProgressListenerseverity - Severity as defined in IProgressListener.Severitymessage - The message localized to the current locale.exception - The relevant low-level exception, or null if
none.public void setCanceled(boolean value)
IProgressListenersetCanceled in interface IProgressListenervalue - true indicates that cancelation has been
requested (but not necessarily acknowledged);
false clears this flagIProgressListener.isCanceled()public void subTask(String name)
IProgressListenersubTask in interface IProgressListenername - the name (or description) of the subtaskpublic void worked(int work)
IProgressListenerworked in interface IProgressListenerwork - the number of work units just completed