/**
   * Creates and displays command-line console for user.
   *
   * @param module module to display console for.
   * @param consoleName Console name (would be used in prompt, history etc)
   * @param commandsAndDefaultExecutor list of commands available for this console. You may pass
   *     null here, but in this case no validation nor suggestion will be available. Default
   *     executor (may be null) to be used when user executes unknwon command Whole pair be null,
   *     but no executor would be registered, so you will need to use {@link
   *     LanguageConsoleBuilder#registerExecuteAction(LanguageConsoleView, Consumer, String, String,
   *     Condition)} by yourself passing this method result as arg to enable execution, history etc.
   * @return newly created console. You do not need to do anything with this value to display
   *     console: it will be displayed automatically
   */
  @NotNull
  public static LanguageConsoleView createConsole(
      @NotNull final Module module,
      @NotNull final String consoleName,
      @Nullable final Pair<List<Command>, CommandExecutor> commandsAndDefaultExecutor) {
    final Project project = module.getProject();
    final CommandConsole console =
        CommandConsole.createConsole(module, consoleName, commandsAndDefaultExecutor);

    // Show console on "toolwindow"
    WindowWithActions.showConsoleWithProcess(
        console, console.getEditor().getComponent(), consoleName, project, null);

    ArgumentHintLayer.attach(console); // Display [arguments]
    return console;
  }