@Override
  public void update(@NotNull AnActionEvent e) {
    boolean enabled = e.getProject() != null &&
                      getSelectedView(e) != null &&
                      !getSelectedItems(e).isEmpty();
    e.getPresentation().setEnabled(enabled);
    e.getPresentation().setVisible(enabled || !ActionPlaces.isPopupPlace(e.getPlace()));
  }
@Override
  public void update(@NotNull AnActionEvent e)