@Override
    public void update(@NotNull AnActionEvent event) {
      T object = (T)getSelectedObject();
      event.getPresentation().setEnabled(object != null && canCopy(object));
    }
@Override
    public void update(@NotNull AnActionEvent event)