String (final @NotNull PsiElement element, final @NotNull ElementDescriptionLocation location) { if (!(location instanceof NonCodeSearchDescriptionLocation ncdLocation)) return null; if (ncdLocation.isNonJava()) return null; if (element instanceof XmlTag) { return ((XmlTag)element).getValue().getTrimmedText(); } else if (element instanceof XmlAttribute) { return ((XmlAttribute)element).getValue(); } else if (element instanceof XmlAttributeValue) { return ((XmlAttributeValue)element).getValue(); } return null; }