boolean (PsiElement @NotNull [] elements) { if (elements.length != 1) return false; PsiElement element = elements[0]; return element instanceof PsiNamedElement && !(element instanceof SyntheticElement) && !PsiElementRenameHandler.isVetoed(element); }