boolean (@NotNull PsiElement element, @NotNull String name, @NotNull PsiElement context) { if (element instanceof PsiVariable && ((PsiVariable)element).isUnnamed()) return false; if (element instanceof PsiMetaOwner) { PsiMetaData data = ((PsiMetaOwner) element).getMetaData(); if (data != null) { return name.equals(data.getName(context)); } } return element instanceof PsiNamedElement && name.equals(((PsiNamedElement)element).getName()); }