protected List getRootHandlers()

in agent/src/jetbrains/buildServer/xmlReportPlugin/parsers/findBugs/CategoryXmlParser.java [25:53]


  protected List<XmlHandler> getRootHandlers() {
    return Arrays.asList(elementsPatternPath(new Handler() {
      public XmlReturn processElement(@NotNull final XmlElementInfo reader) {
        return reader.visitChildren(elementsPath(new Handler() {
          public XmlReturn processElement(@NotNull final XmlElementInfo reader) {
            final String category = reader.getAttribute("category");

            if (category == null) return reader.noDeep();

            myCallback.categoryFound(category);

            return reader.visitChildren(
              elementsPath(new TextHandler() {
                public void setText(@NotNull final String text) {
                  myCallback.categoryDescriptionFound(category, ParserUtils.formatText(text));
                }
              }, "Description"),

              elementsPath(new TextHandler() {
                public void setText(@NotNull final String text) {
                  myCallback.categoryDetailsFound(category, ParserUtils.formatText(text));
                }
              }, "Details")
            );
          }
        }, "BugCategory"));
      }
    }, ".*Collection"));
  }