8187448: 360 doc issues in jdwp-protocol.html
authordtitov
Tue, 09 Jan 2018 09:51:10 -0800
changeset 48623 b1006bbb925a
parent 48622 a92a5a71364a
child 48624 5f86c562a39e
8187448: 360 doc issues in jdwp-protocol.html Reviewed-by: sspitsyn, amenkov
make/data/jdwp/jdwp.spec
make/jdk/src/classes/build/tools/jdwpgen/AbstractCommandNode.java
make/jdk/src/classes/build/tools/jdwpgen/AbstractNamedNode.java
make/jdk/src/classes/build/tools/jdwpgen/AbstractTypeListNode.java
make/jdk/src/classes/build/tools/jdwpgen/CommandSetNode.java
make/jdk/src/classes/build/tools/jdwpgen/ConstantSetNode.java
make/jdk/src/classes/build/tools/jdwpgen/ErrorSetNode.java
make/jdk/src/classes/build/tools/jdwpgen/RootNode.java
--- a/make/data/jdwp/jdwp.spec	Tue Jan 09 18:18:36 2018 +0300
+++ b/make/data/jdwp/jdwp.spec	Tue Jan 09 09:51:10 2018 -0800
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 1998, 2017, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 1998, 2018, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
@@ -869,7 +869,6 @@
         "section in "
         "<cite>The Java&trade; Virtual Machine Specification</cite>. "
         "Since JDWP version 1.5."
-        "<p>
         (Out
             (referenceType refType "The reference type ID.")
         )
@@ -2723,7 +2722,6 @@
         "<P>"
         "The events that are grouped in a composite event are restricted in the "
         "following ways: "
-        "<P>"
         "<UL>"
         "<LI>Only with other thread start events for the same thread:"
         "    <UL>"
--- a/make/jdk/src/classes/build/tools/jdwpgen/AbstractCommandNode.java	Tue Jan 09 18:18:36 2018 +0300
+++ b/make/jdk/src/classes/build/tools/jdwpgen/AbstractCommandNode.java	Tue Jan 09 09:51:10 2018 -0800
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 1998, 2013, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 1998, 2018, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
@@ -30,8 +30,8 @@
 class AbstractCommandNode extends AbstractNamedNode {
 
     void document(PrintWriter writer) {
-        writer.println("<h5><a name=\"" + context.whereC + "\">" + name +
-                       " Command</a> (" + nameNode.value() + ")</h5>");
+        writer.println("<h5 id=\"" + context.whereC + "\">" + name +
+                       " Command (" + nameNode.value() + ")</h5>");
         writer.println(comment());
         writer.println("<dl>");
         for (Node node : components) {
--- a/make/jdk/src/classes/build/tools/jdwpgen/AbstractNamedNode.java	Tue Jan 09 18:18:36 2018 +0300
+++ b/make/jdk/src/classes/build/tools/jdwpgen/AbstractNamedNode.java	Tue Jan 09 09:51:10 2018 -0800
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 1998, 2013, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 1998, 2018, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
@@ -62,8 +62,8 @@
     }
 
     void document(PrintWriter writer) {
-        writer.println("<h4><a name=" + name + ">" + name +
-                       " Command Set</a></h4>");
+        writer.println("<h4 id=\"" + name + "\">" + name +
+                       " Command Set</h4>");
         for (Node node : components) {
             node.document(writer);
         }
--- a/make/jdk/src/classes/build/tools/jdwpgen/AbstractTypeListNode.java	Tue Jan 09 18:18:36 2018 +0300
+++ b/make/jdk/src/classes/build/tools/jdwpgen/AbstractTypeListNode.java	Tue Jan 09 09:51:10 2018 -0800
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 1998, 2013, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 1998, 2018, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
@@ -43,11 +43,11 @@
         if (components.isEmpty()) {
             writer.println("<dd>(None)");
         } else {
-            writer.println("<dd><table border=1 cellpadding=3 cellspacing=0 width=\"90%\" summary=\"\"><tr>");
+            writer.println("<dd><table><tr>");
             for (int i = maxStructIndent; i > 0; --i) {
-                writer.print("<th width=\"4%\">");
+                writer.print("<th style=\"width: 4%\">");
             }
-            writer.println("<th width=\"15%\"><th width=\"65%\">");
+            writer.println("<th style=\"width: 15%\"><th style=\"width: 65%\">");
             writer.println("");
             for (Node node : components) {
                 node.document(writer);
--- a/make/jdk/src/classes/build/tools/jdwpgen/CommandSetNode.java	Tue Jan 09 18:18:36 2018 +0300
+++ b/make/jdk/src/classes/build/tools/jdwpgen/CommandSetNode.java	Tue Jan 09 09:51:10 2018 -0800
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 1998, 2013, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 1998, 2018, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
@@ -38,8 +38,8 @@
     }
 
     void document(PrintWriter writer) {
-        writer.println("<h4><a name=\"" + context.whereC + "\">" + name +
-                       " Command Set</a> (" +
+        writer.println("<h4 id=\"" + context.whereC + "\">" + name +
+                       " Command Set (" +
                        nameNode.value() + ")</h4>");
         writer.println(comment());
         for (Node node : components) {
@@ -51,11 +51,13 @@
         writer.print("<li><a href=\"#" + context.whereC + "\">");
         writer.println(name() + "</a> Command Set (" +
                        nameNode.value() + ")");
-        writer.println("<ul>");
-        for (Node node : components) {
-            node.documentIndex(writer);
+        if (components.size() > 0) {
+            writer.println("<ul>");
+            for (Node node : components) {
+                node.documentIndex(writer);
+            }
+            writer.println("</ul>");
         }
-        writer.println("</ul>");
     }
 
     void genJavaClassSpecifics(PrintWriter writer, int depth) {
--- a/make/jdk/src/classes/build/tools/jdwpgen/ConstantSetNode.java	Tue Jan 09 18:18:36 2018 +0300
+++ b/make/jdk/src/classes/build/tools/jdwpgen/ConstantSetNode.java	Tue Jan 09 09:51:10 2018 -0800
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 1998, 2013, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 1998, 2018, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
@@ -54,15 +54,15 @@
     }
 
     void document(PrintWriter writer) {
-        writer.println("<h4><a name=\"" + context.whereC + "\">" + name +
-                       " Constants</a></h4>");
+        writer.println("<h4 id=\"" + context.whereC + "\">" + name +
+                       " Constants</h4>");
         writer.println(comment());
-        writer.println("<dd><table border=1 cellpadding=3 cellspacing=0 width=\"90%\" summary=\"\"><tr>");
-        writer.println("<th width=\"20%\"><th width=\"5%\"><th width=\"65%\">");
+        writer.println("<table><tr>");
+        writer.println("<th style=\"width: 20%\"><th style=\"width: 5%\"><th style=\"width:  65%\">");
         ConstantNode n;
         for (Node node : components) {
             n = (ConstantNode)node;
-            writer.println("<a NAME=\"" + name + "_" + n.name + "\"></a>");
+            writer.println("<span id=\"" + name + "_" + n.name + "\"></span>");
             n.document(writer);
         }
         writer.println("</table>");
--- a/make/jdk/src/classes/build/tools/jdwpgen/ErrorSetNode.java	Tue Jan 09 18:18:36 2018 +0300
+++ b/make/jdk/src/classes/build/tools/jdwpgen/ErrorSetNode.java	Tue Jan 09 09:51:10 2018 -0800
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2001, 2013, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2001, 2018, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
@@ -43,7 +43,7 @@
         if (components.isEmpty()) {
             writer.println("<dd>(None)");
         } else {
-            writer.println("<dd><table border=1 cellpadding=3 cellspacing=0 width=\"90%\" summary=\"\">");
+            writer.println("<dd><table>");
         for (Node node : components) {
             node.document(writer);
         }
--- a/make/jdk/src/classes/build/tools/jdwpgen/RootNode.java	Tue Jan 09 18:18:36 2018 +0300
+++ b/make/jdk/src/classes/build/tools/jdwpgen/RootNode.java	Tue Jan 09 09:51:10 2018 -0800
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 1998, 2013, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 1998, 2018, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
@@ -41,11 +41,22 @@
 
     void document(PrintWriter writer) {
         writer.println("<!DOCTYPE html>");
-        writer.println("<html><head><title>" + comment() + "</title></head>");
-        writer.println("<body bgcolor=\"white\">");
+        writer.println("<html lang=\"en\">");
+        writer.println("<head>");
+        writer.println("<meta charset=\"utf-8\"/>");
+        writer.println("<title>" + comment() + "</title>");
+        writer.println("<style>");
+        writer.println("body {background-color:white;}");
+        writer.println("table {border: 1px solid grey; border-spacing:0px; border-collapse: separate; width: 90%;}");
+        writer.println("td, th {padding: 3px; border: 1px solid black;}");
+        writer.println("</style>");
+        writer.println("</head>");
+        writer.println("<body>");
+        writer.println("<ul>");
         for (Node node : components) {
             node.documentIndex(writer);
         }
+        writer.println("</ul>");
         for (Node node : components) {
             node.document(writer);
         }