@NotNull public static List<XmlTag> getElementTags(@NotNull Collection<? extends DomElement> list) { ArrayList<XmlTag> result = new ArrayList<>(list.size()); for (DomElement element : list) { XmlTag tag = element.getXmlTag(); if (tag != null) { result.add(tag); } } return result; }
public static void acceptAvailableChildren( final DomElement element, final DomElementVisitor visitor) { final XmlTag tag = element.getXmlTag(); if (tag != null) { for (XmlTag xmlTag : tag.getSubTags()) { final DomElement childElement = element.getManager().getDomElement(xmlTag); if (childElement != null) { childElement.accept(visitor); } } } }
@NotNull public static XmlTag[] getElementTags(@NotNull DomElement[] list) { XmlTag[] result = new XmlTag[list.length]; int i = 0; for (DomElement element : list) { XmlTag tag = element.getXmlTag(); if (tag != null) { result[i++] = tag; } } return result; }