public void registerConsole(ConsoleView console) {
   GrepHighlightFilter lastGrepHighlightFilter =
       ServiceManager.getInstance().getLastGrepHighlightFilter();
   if (lastGrepHighlightFilter != null) {
     ServiceManager.getInstance().register(console, lastGrepHighlightFilter);
   }
 }
  @NotNull
  @Override
  public AnAction[] postProcess(@NotNull ConsoleView console, @NotNull AnAction[] actions) {
    AnsiInputFilter lastAnsi = ServiceManager.getInstance().getLastAnsi();
    if (lastAnsi != null) {
      lastAnsi.setConsole(console);
    }

    registerConsole(console);
    if (console instanceof ConsoleViewImpl) {
      StatisticsManager.createStatisticsPanels(
          (com.intellij.execution.impl.ConsoleViewImpl) console);
    }

    ArrayList<AnAction> anActions = new ArrayList<AnAction>();
    anActions.add(new OpenConsoleSettingsAction(console));
    anActions.addAll(Arrays.asList(actions));

    replaceClearAction(anActions);
    return anActions.toArray(new AnAction[anActions.size()]);
  }