void (DebuggerCommandImpl command, ProgressWindow progressWindow) { new ProgressIndicatorListener() { @Override public void cancelled() { command.release(); } }.installToProgress(progressWindow); ApplicationManager.getApplication().executeOnPooledThread( () -> ProgressManager.getInstance().runProcess(() -> invokeAndWait(command), progressWindow)); }