void (@NotNull ModalityState modalityState) { ReadAction.nonBlocking(() -> { try { canRun(); return null; } catch (ConfigurationException e) { return e; } }).finishOnUiThread(modalityState, e -> { setErrorHtml(e == null ? null : e.getMessageHtml()); getPreviewAction().setEnabled(e == null); getRefactorAction().setEnabled(e == null); }) .coalesceBy(myProject, getClass()) .submit(AppExecutorUtil.getAppExecutorService()); }