Пример #1
0
  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);
  }
Пример #2
0
 @Override
 public void actionPerformed(AnActionEvent e) {
   myTerminalRunner.openSession(myTerminal);
 }