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