@Override
    public boolean isCopyEnabled(@NotNull DataContext dataContext) {
      PsiElement[] elements = validate(getSelectedElements(dataContext));
      return CopyHandler.canCopy(elements) ||
             JBIterable.of(elements).filter(Conditions.instanceOf(PsiNamedElement.class)).isNotEmpty();
    }
@Override
    public boolean isCopyEnabled(@NotNull DataContext dataContext)