void (final @NotNull Project project, final @NotNull ProblemDescriptor descriptor) { PsiElement parent = descriptor.getPsiElement(); while (parent != null) { if (parent instanceof XmlTag && myName.equals(StringUtil.toLowerCase(((XmlTag)parent).getLocalName()))) { break; } parent = parent.getParent(); } if (parent == null) { return; } final String name = StringUtil.toLowerCase(((XmlTag)parent).getLocalName()); XmlTag tag = (XmlTag)parent; PsiElement[] replacePsiElements = generateContainingElements(project, name); int cnt = 0; for (PsiElement element : tag.getChildren()) { if (element instanceof XmlToken token) { IElementType type = token.getTokenType(); if (type == XmlTokenType.XML_NAME) { token.replace(replacePsiElements[cnt++]); } } } }