void (@NotNull PsiFile file) { run.set(true); ProgressIndicator indicator = ProgressWrapper.unwrapAll(ProgressManager.getGlobalProgressIndicator()); if (!(indicator instanceof DaemonProgressIndicator)) { throwable.set(new IllegalStateException("expected DaemonProgressIndicator but got: " + indicator +" "+indicator.getClass())); } }