@Override
  public void update(@NotNull AnActionEvent event) {
    Presentation presentation = event.getPresentation();
    TreeExpander expander = getExpander(event.getDataContext());
    presentation.setVisible(expander == null || expander.isExpandAllVisible());
    presentation.setEnabled(expander != null && expander.canExpand());
  }
@Override
  public void update(@NotNull AnActionEvent event)