RunContentDescriptor (Project project, @Nullable ConsoleFactory consoleFactory, final @NlsContexts.TabTitle String tabTitle, String text, @Nullable Icon icon) { final TextConsoleBuilder builder = TextConsoleBuilderFactory.getInstance().createBuilder(project); builder.filters(EP_NAME.getExtensions(project)); final ConsoleView consoleView = builder.getConsole(); final DefaultActionGroup toolbarActions = new DefaultActionGroup(); JComponent consoleComponent = consoleFactory != null ? consoleFactory.createConsoleComponent(consoleView, toolbarActions) : new MyConsolePanel(consoleView, toolbarActions); final RunContentDescriptor descriptor = new RunContentDescriptor(consoleView, null, consoleComponent, tabTitle, icon) { @Override public boolean isContentReuseProhibited() { return true; } }; final Executor executor = DefaultRunExecutor.getRunExecutorInstance(); for (AnAction action: consoleView.createConsoleActions()) { toolbarActions.add(action); } final ConsoleViewImpl console = (ConsoleViewImpl)consoleView; ConsoleViewUtil.enableReplaceActionForConsoleViewEditor(console.getEditor()); console.getEditor().getSettings().setCaretRowShown(true); toolbarActions.add(ActionManager.getInstance().getAction("AnalyzeStacktraceToolbar")); RunContentManager.getInstance(project).showRunContent(executor, descriptor); consoleView.allowHeavyFilters(); if (consoleFactory == null) { printStacktrace(consoleView, text); } return descriptor; }