List<XmlTag> (@NotNull XmlFile file, @NotNull PsiModifierListOwner listOwner, @NotNull String annotationFQN) { final XmlDocument document = file.getDocument(); if (document == null) return List.of(); final XmlTag rootTag = document.getRootTag(); if (rootTag == null) return List.of(); final String externalName = getExternalName(listOwner); final List<XmlTag> tagsToProcess = new ArrayList<>(); for (XmlTag tag : rootTag.getSubTags()) { String nameValue = tag.getAttributeValue("name"); String className = nameValue == null ? null : StringUtil.unescapeXmlEntities(nameValue); if (!Comparing.strEqual(className, externalName)) continue; for (XmlTag annotationTag : tag.getSubTags()) { if (!Comparing.strEqual(annotationTag.getAttributeValue("name"), annotationFQN)) { continue; } tagsToProcess.add(annotationTag); } } return tagsToProcess; }