示例#1
0
  private void dumpProcessor(int depth, Node node, Processor processor) {
    if (log.isDebugEnabled()) {
      String indent = indent(depth);

      StringBuilder out = new StringBuilder();
      out.append(indent);
      if (processor == processorDefault) {
        out.append(" ");
      } else {
        out.append("*");
      }
      out.append(node);

      if (node instanceof HeaderNode) {
        out.append(" L:").append(((HeaderNode) node).getLevel());
      }
      if (node instanceof VerbatimNode) {
        out.append(" T:").append(((VerbatimNode) node).getType());
      }
      if (node instanceof RefImageNode) {
        RefImageNode rn = (RefImageNode) node;
        out.append(" separatorSpace: '")
            .append(rn.separatorSpace)
            .append("' refKey: '")
            .append(rn.referenceKey)
            .append("'");
      }

      log.debug(out.toString());
    }
  }
示例#2
0
 private static String indent(int level) {
   StringBuilder b = new StringBuilder();
   for (int i = 0; i < level; i++) b.append("    ");
   return b.toString();
 }