boolean (@NotNull Task<?, ?> task, int attempt) { if (getApplication() == null) { task.run(); // is not interruptible in tests without application } else if (useReadAction != ThreeState.YES || isDispatchThread()) { ProgressManager.getInstance().runProcess(task, indicator(task.promise)); } else if (!runInReadActionWithWriteActionPriority(task, indicator(task.promise))) { offerRestart(task, attempt); return false; } return true; }