public class ProgressManagerImpl extends CoreProgressManager implements Disposable
CoreProgressManager.TaskContainer, CoreProgressManager.TaskRunnable
Disposable.Parent
ENABLED
Constructor and Description |
---|
ProgressManagerImpl() |
Modifier and Type | Method and Description |
---|---|
static void |
__testWhileAlwaysCheckingCanceled(java.lang.Runnable runnable) |
protected com.intellij.openapi.progress.impl.CoreProgressManager.CheckCanceledHook |
createCheckCanceledHook() |
void |
executeProcessUnderProgress(java.lang.Runnable process,
ProgressIndicator progress) |
boolean |
hasUnsafeProgressIndicator() |
void |
markProgressSafe(ProgressWindow progress)
The passes progress won't count in
hasUnsafeProgressIndicator() and won't stop from application exiting. |
protected void |
prioritizingFinished() |
protected void |
prioritizingStarted() |
boolean |
runInReadActionWithWriteActionPriority(java.lang.Runnable action,
ProgressIndicator indicator)
This method attempts to run provided action synchronously in a read action, so that, if possible, it wouldn't impact any pending,
executing or future write actions (for this to work effectively the action should invoke
ProgressManager.checkCanceled() or
ProgressIndicator.checkCanceled() often enough). |
java.util.concurrent.Future<?> |
runProcessWithProgressAsynchronously(Task.Backgroundable task) |
boolean |
runProcessWithProgressSynchronously(Task task,
javax.swing.JComponent parentComponent) |
assertUnderProgress, computeInNonCancelableSection, computePrioritized, createTaskRunnable, dispose, doCheckCanceled, executeNonCancelableSection, finishTask, getCurrentThreadProgressModality, getProgressIndicator, hasModalProgressIndicator, hasProgressIndicator, indicatorCanceled, isCanceledThread, isInNonCancelableSection, isPrioritizedThread, restorePrioritizing, run, runCheckCanceledHooks, runProcess, runProcessWithProgressAsync, runProcessWithProgressAsynchronously, runProcessWithProgressAsynchronously, runProcessWithProgressAsynchronously, runProcessWithProgressAsynchronously, runProcessWithProgressAsynchronously, runProcessWithProgressInCurrentThread, runProcessWithProgressSynchronously, runProcessWithProgressSynchronously, runProcessWithProgressSynchronously, sleepIfNeededToGivePriorityToAnotherThread, suppressPrioritizing
assertNotCircular, canceled, checkCanceled, getInstance, progress, progress, progress2, run, runProcess
getGlobalProgressIndicator, startNonCancelableSectionIfSupported
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
dispose
public boolean hasUnsafeProgressIndicator()
hasUnsafeProgressIndicator
in class CoreProgressManager
public void markProgressSafe(ProgressWindow progress)
hasUnsafeProgressIndicator()
and won't stop from application exiting.public void executeProcessUnderProgress(java.lang.Runnable process, ProgressIndicator progress) throws ProcessCanceledException
executeProcessUnderProgress
in class CoreProgressManager
progress
- an indicator to use, null
means reuse current progressProcessCanceledException
public static void __testWhileAlwaysCheckingCanceled(java.lang.Runnable runnable)
public boolean runProcessWithProgressSynchronously(Task task, javax.swing.JComponent parentComponent)
runProcessWithProgressSynchronously
in class CoreProgressManager
public java.util.concurrent.Future<?> runProcessWithProgressAsynchronously(Task.Backgroundable task)
runProcessWithProgressAsynchronously
in class CoreProgressManager
public boolean runInReadActionWithWriteActionPriority(java.lang.Runnable action, ProgressIndicator indicator)
ProgressManager
ProgressManager.checkCanceled()
or
ProgressIndicator.checkCanceled()
often enough).
It returns true
if action was executed successfully. It returns false
if the action was not
executed successfully, i.e. if:
ProcessCanceledException
when some other thread initiated
write actionrunInReadActionWithWriteActionPriority
in class CoreProgressManager
action
- the code to execute under read actionindicator
- progress indicator that should be cancelled if a write action is about to start. Can be null.protected com.intellij.openapi.progress.impl.CoreProgressManager.CheckCanceledHook createCheckCanceledHook()
createCheckCanceledHook
in class CoreProgressManager
protected void prioritizingStarted()
prioritizingStarted
in class CoreProgressManager
protected void prioritizingFinished()
prioritizingFinished
in class CoreProgressManager