@Override
    public void update(@NotNull AnActionEvent e) {
      if (DiffUtil.isFromShortcut(e)) {
        // consume shortcut even if there are nothing to do - avoid calling some other action
        e.getPresentation().setEnabledAndVisible(true);
        return;
      }

      Presentation presentation = e.getPresentation();
      Editor editor = e.getData(CommonDataKeys.EDITOR);

      ThreeSide side = getEditorSide(editor);
      if (side == null) {
        presentation.setEnabledAndVisible(false);
        return;
      }

      if (!isVisible(side)) {
        presentation.setEnabledAndVisible(false);
        return;
      }

      presentation.setText(getText(side));

      presentation.setEnabledAndVisible(isSomeChangeSelected(side) && !isExternalOperationInProgress());
    }
@Override
    public void update(@NotNull AnActionEvent e)