String (final PsiElement element) { if (element instanceof XmlTag tag) { String s = tag.getAttributeValue(IdReferenceProvider.ID_ATTR_NAME); if (!myIdAttrsOnly) { if (s == null) s = tag.getAttributeValue(IdReferenceProvider.NAME_ATTR_NAME); if (s == null) s = tag.getAttributeValue(IdReferenceProvider.STYLE_ID_ATTR_NAME); } return s != null ? s: getImplicitIdRefValue(tag); } else if (element instanceof PsiComment) { return getImplicitIdValue((PsiComment) element); } return null; }