@Override
  public void update(@NotNull AnActionEvent e) {
    UpdateSession session = e.getUpdateSession();
    Presentation presentation = e.getPresentation();
    SplitButton splitButton = ObjectUtils.tryCast(presentation.getClientProperty(CustomComponentAction.COMPONENT_KEY), SplitButton.class);

    Presentation groupPresentation = session.presentation(getDelegate()); // do not remove (RemDev)
    AnAction action = splitButton != null ? splitButton.selectedAction : getMainAction(e);
    if (action != null) {
      Presentation actionPresentation = session.presentation(action);
      presentation.copyFrom(actionPresentation, splitButton);
      if (!isGroupPresentationDependsOnSelectedAction()) {
        presentation.setEnabledAndVisible(true);
      }
    }
    else {
      e.getPresentation().copyFrom(groupPresentation, splitButton);
    }
    presentation.putClientProperty(FIRST_ACTION, splitButton != null ? null : action);
  }
@Override
  public void update(@NotNull AnActionEvent e)