@Override
  public void update(@NotNull AnActionEvent event) {
    Presentation presentation = event.getPresentation();

    Editor editor = event.getData(CommonDataKeys.EDITOR);
    if (editor == null) {
      presentation.setEnabledAndVisible(false);
      return;
    }

    Project project = event.getData(CommonDataKeys.PROJECT);
    VcsSelection selection = VcsSelectionUtil.getSelection(this, event);

    presentation.setEnabled(isEnabled(project, selection));
    if (selection != null) {
      presentation.setText(selection.getActionName());
    }
  }
@Override
  public void update(@NotNull AnActionEvent event)