@Override
  public void update(@NotNull AnActionEvent event) {
    boolean toEnable = getPlace(event) != null;

    if (ActionPlaces.isPopupPlace(event.getPlace())) {
      event.getPresentation().setVisible(toEnable);
    }
    else {
      event.getPresentation().setEnabled(toEnable);
    }
  }
@Override
  public void update(@NotNull AnActionEvent event)