String (@NotNull PsiElement element, boolean useFullName) { if (element instanceof XmlTag xmlTag) { final PsiMetaData metaData = xmlTag.getMetaData(); final String name = metaData != null ? DescriptiveNameUtil.getMetaDataName(metaData) : xmlTag.getName(); String presentableName = metaData == null ? "<" + name + ">" : name; return XmlPsiBundle.message("xml.find.usages.presentable.name.of.containing.file", presentableName, xmlTag.getContainingFile().getName()); } if (element instanceof XmlAttributeValue) { return ((XmlAttributeValue)element).getValue(); } if (element instanceof PsiNamedElement) { return ((PsiNamedElement)element).getName(); } return element.getText(); }