void (@NotNull final ProgressIndicator indicator) { indicator.setText(PyBundle.message("connecting.to.console.progress")); try { if (mySdk == null) { throw new ExecutionException(PyBundle.message("pydev.console.python.interpreter.is.not.selected")); } initAndRun(mySdk); connect(getStatementsToExecute()); if (requestEditorFocus) { myConsoleView.requestFocus(); } } catch (final Exception e) { LOG.warn("Error running console", e); UIUtil.invokeAndWaitIfNeeded(() -> showErrorsInConsole(e)); } }