@Override
    public void update(@NotNull AnActionEvent event) {
      Expandable expandable = getExpandable(event);
      event.getPresentation().setEnabled(expandable != null && expandable.isExpanded());
    }
@Override
    public void update(@NotNull AnActionEvent event)