@Override
  public void update(@NotNull AnActionEvent e) {
    MainVcsLogUi ui = e.getData(VcsLogInternalDataKeys.MAIN_UI);
    VcsLogUiProperties properties = e.getData(VcsLogInternalDataKeys.LOG_UI_PROPERTIES);

    boolean visible = ui != null && ui.getDataPack().getVisibleGraph().getActionController().isActionSupported(getGraphAction());
    e.getPresentation().setVisible(visible);
    e.getPresentation().setEnabled(visible && !ui.getDataPack().isEmpty());
    if (visible) {
      if (properties != null && properties.exists(MainVcsLogUiProperties.GRAPH_OPTIONS) &&
          properties.get(MainVcsLogUiProperties.GRAPH_OPTIONS) == PermanentGraph.Options.LinearBek.INSTANCE) {
        e.getPresentation().setText(myMergesAction.get());
        e.getPresentation().setDescription(myMergesDescription.get());
      }
      else {
        e.getPresentation().setText(myLinearBranchesAction.get());
        e.getPresentation().setDescription(myLinearBranchesDescription.get());
      }
    }
  }
@Override
  public void update(@NotNull AnActionEvent e)