private void openSession( @NotNull ToolWindow toolWindow, @NotNull AbstractTerminalRunner terminalRunner) { if (myTerminalWidget == null) { toolWindow.getContentManager().removeAllContents(true); final Content content = createTerminalInContentPanel(terminalRunner, toolWindow); toolWindow.getContentManager().addContent(content); } else { terminalRunner.openSession(myTerminalWidget); } toolWindow.activate(() -> {}, true); }
@Override public void actionPerformed(AnActionEvent e) { myTerminalRunner.openSession(myTerminal); }