@Override
  public void update(@NotNull final AnActionEvent e) {
    super.update(e);

    Presentation presentation = e.getPresentation();

    if (isLibraryFrameFilterSupported(e, presentation)) {
      presentation.setVisible(true);
      // Change the tooltip of a button in a toolbar and don't change anything for a context menu.
      if (e.isFromActionToolbar()) {
        final boolean shouldShow = !isSelected(e);
        presentation.setText(XDebuggerBundle.message(shouldShow
                                                     ? "hide.library.frames.tooltip"
                                                     : "show.all.frames.tooltip"));
      }
    }
    else {
      presentation.setVisible(false);
    }
  }
@Override
  public void update(@NotNull final AnActionEvent e)