CommandConsole (@NotNull final Module module, @NotNull final String title, @Nullable final CommandsInfo commandsInfo) { final CommandConsole console = new CommandConsole(module, title, commandsInfo); console.setEditable(true); LanguageConsoleBuilder.registerExecuteAction(console, console, title, title, console); console.switchToCommandMode(); console.getComponent(); // For some reason console does not have component until this method is called which leads to some errros. console.getConsoleEditor().getSettings().setAdditionalLinesCount(2); // to prevent PY-15583 Disposer.register(PythonPluginDisposable.getInstance(module.getProject()), console); // To dispose console when project disposes console.addMessageFilter(new UrlFilter()); return console; }