@Override
  public void actionPerformed(@NotNull AnActionEvent e) {
    final Editor editor = e.getData(CommonDataKeys.EDITOR);
    assert editor != null;
    final String selection = getSingleLineSelection(editor);
    assert selection != null;
    ShowSettingsUtil.getInstance().editConfigurable(editor.getProject(), new ConsoleConfigurable() {
      @Override
      protected boolean editFoldingsOnly() {
        return true;
      }

      @Override
      public void reset() {
        super.reset();
        UIUtil.invokeLaterIfNeeded(() -> addRule(selection));
      }
    });
    final ConsoleView consoleView = e.getData(LangDataKeys.CONSOLE_VIEW);
    if (consoleView instanceof ConsoleViewImpl) {
      ((ConsoleViewImpl)consoleView).foldImmediately();
    }
  }
@Override
  public void actionPerformed(@NotNull AnActionEvent e)