void (@NotNull ProgressIndicator indicator) { ApplicationManager.getApplication().invokeLater(() -> { throw new AssertionError(msg); }); // ensure previous runnable is executed during progress, not after it ApplicationManager.getApplication().invokeAndWait(EmptyRunnable.getInstance()); }