public abstract static class TaskUiUtil.RemoteFetchTask<T> extends Task.Backgroundable
Task.Backgroundable, Task.ConditionalModal, Task.Modal, Task.NotificationInfo, Task.WithResult<T,E extends java.lang.Exception>
Modifier and Type | Field and Description |
---|---|
protected java.lang.Exception |
myException |
protected T |
myResult |
myBackgroundOption
ALWAYS_BACKGROUND, DEAF
Modifier | Constructor and Description |
---|---|
protected |
RemoteFetchTask(Project project,
java.lang.String title)
Should be called only from EDT, so current modality state can be captured.
|
protected |
RemoteFetchTask(Project project,
java.lang.String title,
ModalityState modalityState) |
Modifier and Type | Method and Description |
---|---|
protected abstract T |
fetch(ProgressIndicator indicator) |
Task.NotificationInfo |
notifyFinished()
Task.onSuccess() can't be used for this purpose, because it doesn't consider current modality state
which will prevent UI updating in modal dialog (e.g. |
void |
run(ProgressIndicator indicator) |
protected abstract void |
updateUI() |
isConditionalModal, isModal, processSentToBackground, shouldStartInBackground
asBackgroundable, asModal, getCancelText, getCancelTooltipText, getNotificationInfo, getProject, getTitle, isCancellable, isHeadless, onCancel, onError, onFinished, onSuccess, onThrowable, queue, setCancelText, setCancelTooltipText, setTitle, whereToRunCallbacks
protected T myResult
protected java.lang.Exception myException
protected RemoteFetchTask(Project project, java.lang.String title)
protected RemoteFetchTask(Project project, java.lang.String title, ModalityState modalityState)
public final void run(ProgressIndicator indicator)
public final Task.NotificationInfo notifyFinished()
Task.onSuccess()
can't be used for this purpose, because it doesn't consider current modality state
which will prevent UI updating in modal dialog (e.g. in TaskRepositoryEditor
).notifyFinished
in class Task
protected abstract T fetch(ProgressIndicator indicator) throws java.lang.Exception
java.lang.Exception
protected abstract void updateUI()