< prev index next >

make/jdk/src/classes/build/tools/jdwpgen/Node.java

Print this page




  71     void constrain(Context ctx) {
  72         context = ctx;
  73         for (Node node : components) {
  74             constrainComponent(ctx, node);
  75         }
  76     }
  77 
  78     void constrainComponent(Context ctx, Node node) {
  79         node.constrain(ctx);
  80     }
  81 
  82     void indent(PrintWriter writer, int depth) {
  83         for (int i = 0; i < depth; i++) {
  84             writer.print("    ");
  85         }
  86     }
  87 
  88     void documentIndex(PrintWriter writer) {
  89     }
  90 
  91     String indentElement(int depth, String content) {
  92         return depth > 0
  93                 ? "<div class=\"indent" + depth + "\">" + content + "</div>"
  94                 : content;

  95     }
  96 
  97     String comment() {
  98         StringBuffer comment = new StringBuffer();
  99         for (String st : commentList) {
 100             comment.append(st);
 101         }
 102         return comment.toString();
 103     }
 104 
 105     void genJavaComment(PrintWriter writer, int depth) {
 106         if (commentList.size() > 0) {
 107             indent(writer, depth);
 108             writer.println("/**");
 109             for (String comment : commentList) {
 110                 indent(writer, depth);
 111                 writer.println(" * " + comment);
 112             }
 113             indent(writer, depth);
 114             writer.println(" */");




  71     void constrain(Context ctx) {
  72         context = ctx;
  73         for (Node node : components) {
  74             constrainComponent(ctx, node);
  75         }
  76     }
  77 
  78     void constrainComponent(Context ctx, Node node) {
  79         node.constrain(ctx);
  80     }
  81 
  82     void indent(PrintWriter writer, int depth) {
  83         for (int i = 0; i < depth; i++) {
  84             writer.print("    ");
  85         }
  86     }
  87 
  88     void documentIndex(PrintWriter writer) {
  89     }
  90 
  91     void docRowStart(PrintWriter writer) {
  92         writer.println("<tr>");
  93         if (structIndent > 0) {
  94             writer.println("<td colspan=" + structIndent + ">");
  95         }
  96     }
  97 
  98     String comment() {
  99         StringBuffer comment = new StringBuffer();
 100         for (String st : commentList) {
 101             comment.append(st);
 102         }
 103         return comment.toString();
 104     }
 105 
 106     void genJavaComment(PrintWriter writer, int depth) {
 107         if (commentList.size() > 0) {
 108             indent(writer, depth);
 109             writer.println("/**");
 110             for (String comment : commentList) {
 111                 indent(writer, depth);
 112                 writer.println(" * " + comment);
 113             }
 114             indent(writer, depth);
 115             writer.println(" */");


< prev index next >