@Override
  public void update(@NotNull AnActionEvent e) {
    Project project = e.getProject();
    if (project == null) {
      e.getPresentation().setEnabledAndVisible(false);
      return;
    }

    if (ActionPlaces.isPopupPlace(e.getPlace())) {
      VirtualFile file = e.getData(CommonDataKeys.VIRTUAL_FILE);
      if (file == null || !(file.isInLocalFileSystem() || VersionManagingFileSystem.isEnforcedNonLocal(file))) {
        e.getPresentation().setEnabledAndVisible(false);
        return;
      }
    }

    super.update(e);
  }
@Override
  public void update(@NotNull AnActionEvent e)