public static class ProgressMonitor.DefaultProgressMonitor extends ProgressMonitor
ProgressMonitor
abstract class.
Provides no functionality except for canceling a running command.
To cancel a running command invoke the cancel
method.ProgressMonitor.DefaultProgressMonitor
UNKNOWN_WORK_UNITS
Constructor and Description |
---|
DefaultProgressMonitor() |
Modifier and Type | Method and Description |
---|---|
boolean |
cancel()
Cancels a currently running command.
|
void |
finished()
Called by a git command when it finishes its progress.
|
boolean |
isCanceled()
Returns
true if the progress should be canceled. |
void |
notifyError(String message)
Called when an error occurs during a git command's execution that however
does not prevent it from further actions.
|
void |
notifyWarning(String message)
Called when a non-fatal warning should be delivered to a git command's
caller.
|
void |
preparationsFailed(String message)
Called when a git command fails to start.
|
void |
started(String command)
Called when a git command is started.
|
beginTask, endTask, notifyMessage, updateTaskState
public final boolean cancel()
false
if the command has already been canceled
before. Otherwise returns true
public final boolean isCanceled()
ProgressMonitor
true
if the progress should be canceled.
Git commands periodically check the result of the method and end their
progress immediately when the method returns true
isCanceled
in class ProgressMonitor
public void started(String command)
ProgressMonitor
started
in class ProgressMonitor
command
- a string representing a commandline version of the started commandpublic void finished()
ProgressMonitor
finished
in class ProgressMonitor
public void preparationsFailed(String message)
ProgressMonitor
preparationsFailed
in class ProgressMonitor
message
- error descriptionpublic void notifyError(String message)
ProgressMonitor
notifyError
in class ProgressMonitor
message
- description of the errorpublic void notifyWarning(String message)
ProgressMonitor
notifyWarning
in class ProgressMonitor
message
- description of the warning