Esempio n. 1
0
 @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;
 }
Esempio n. 2
0
 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);
       }
     }
   }
 }
Esempio n. 3
0
 @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;
 }