public static boolean hasRunningCommands(@NotNull TtyConnector connector) throws IllegalStateException {
    if (!connector.isConnected()) return false;
    ProcessTtyConnector processTtyConnector = ShellTerminalWidget.getProcessTtyConnector(connector);
    if (processTtyConnector == null) return true;
    return hasRunningCommands(processTtyConnector.getProcess());
  }
public static boolean hasRunningCommands(@NotNull TtyConnector connector)