public synchronized void addNewCommand(@NotNull PydevConsoleExecuteActionHandler pydevConsoleExecuteActionHandler,
                                         @NotNull ConsoleCommunication.ConsoleCodeFragment code) {
    var console = pydevConsoleExecuteActionHandler.getConsoleCommunication();
    if (console.isWaitingForInput()) {
      execCommand(console, code);
      return;
    }
    if (!queues.containsKey(console)) {
      queues.put(console, new ConcurrentLinkedDeque<>());
      handlers.put(console, pydevConsoleExecuteActionHandler);
    }
    var queue = getQueue(console);
    if (queue == null) return;
    if (!code.getText().isBlank()) {
      queue.add(code);
      myListeners.get(console).addCommand(code);
    }

    if (queue.size() == 1) {
      execCommand(console, code);
    }

    pydevConsoleExecuteActionHandler.updateConsoleState();
  }
public synchronized void addNewCommand(@NotNull PydevConsoleExecuteActionHandler pydevConsoleExecuteActionHandler,
                                         @NotNull ConsoleCommunication.ConsoleCodeFragment code)