equal
deleted
inserted
replaced
1 /* |
1 /* |
2 * Copyright (c) 1998, 2013, Oracle and/or its affiliates. All rights reserved. |
2 * Copyright (c) 1998, 2018, Oracle and/or its affiliates. All rights reserved. |
3 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. |
3 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. |
4 * |
4 * |
5 * This code is free software; you can redistribute it and/or modify it |
5 * This code is free software; you can redistribute it and/or modify it |
6 * under the terms of the GNU General Public License version 2 only, as |
6 * under the terms of the GNU General Public License version 2 only, as |
7 * published by the Free Software Foundation. Oracle designates this |
7 * published by the Free Software Foundation. Oracle designates this |
36 error("Expected 'Command' item, got: " + node); |
36 error("Expected 'Command' item, got: " + node); |
37 } |
37 } |
38 } |
38 } |
39 |
39 |
40 void document(PrintWriter writer) { |
40 void document(PrintWriter writer) { |
41 writer.println("<h4><a name=\"" + context.whereC + "\">" + name + |
41 writer.println("<h4 id=\"" + context.whereC + "\">" + name + |
42 " Command Set</a> (" + |
42 " Command Set (" + |
43 nameNode.value() + ")</h4>"); |
43 nameNode.value() + ")</h4>"); |
44 writer.println(comment()); |
44 writer.println(comment()); |
45 for (Node node : components) { |
45 for (Node node : components) { |
46 node.document(writer); |
46 node.document(writer); |
47 } |
47 } |
49 |
49 |
50 void documentIndex(PrintWriter writer) { |
50 void documentIndex(PrintWriter writer) { |
51 writer.print("<li><a href=\"#" + context.whereC + "\">"); |
51 writer.print("<li><a href=\"#" + context.whereC + "\">"); |
52 writer.println(name() + "</a> Command Set (" + |
52 writer.println(name() + "</a> Command Set (" + |
53 nameNode.value() + ")"); |
53 nameNode.value() + ")"); |
54 writer.println("<ul>"); |
54 if (components.size() > 0) { |
55 for (Node node : components) { |
55 writer.println("<ul>"); |
56 node.documentIndex(writer); |
56 for (Node node : components) { |
|
57 node.documentIndex(writer); |
|
58 } |
|
59 writer.println("</ul>"); |
57 } |
60 } |
58 writer.println("</ul>"); |
|
59 } |
61 } |
60 |
62 |
61 void genJavaClassSpecifics(PrintWriter writer, int depth) { |
63 void genJavaClassSpecifics(PrintWriter writer, int depth) { |
62 indent(writer, depth); |
64 indent(writer, depth); |
63 writer.println("static final int COMMAND_SET = " + nameNode.value() + ";"); |
65 writer.println("static final int COMMAND_SET = " + nameNode.value() + ";"); |