langtools/test/tools/javac/doctree/DocCommentTester.java
changeset 34567 c74f68484156
parent 33424 e6bd5406e2cf
child 37009 476d8d615222
equal deleted inserted replaced
34566:071e47e4ae75 34567:c74f68484156
   442             public Void visitIdentifier(IdentifierTree node, Void p) {
   442             public Void visitIdentifier(IdentifierTree node, Void p) {
   443                 header(node, compress(node.getName().toString()));
   443                 header(node, compress(node.getName().toString()));
   444                 return null;
   444                 return null;
   445             }
   445             }
   446 
   446 
       
   447             @Override
       
   448             public Void visitIndex(IndexTree node, Void p) {
       
   449                 header(node);
       
   450                 indent(+1);
       
   451                 print("term", node.getSearchTerm());
       
   452                 print("description", node.getDescription());
       
   453                 indent(-1);
       
   454                 indent();
       
   455                 out.println("]");
       
   456                 return null;
       
   457             }
       
   458 
   447             public Void visitInheritDoc(InheritDocTree node, Void p) {
   459             public Void visitInheritDoc(InheritDocTree node, Void p) {
   448                 header(node, "");
   460                 header(node, "");
   449                 return null;
   461                 return null;
   450             }
   462             }
   451 
   463 
   617 
   629 
   618             public Void visitOther(DocTree node, Void p) {
   630             public Void visitOther(DocTree node, Void p) {
   619                 throw new UnsupportedOperationException("Not supported yet.");
   631                 throw new UnsupportedOperationException("Not supported yet.");
   620             }
   632             }
   621 
   633 
       
   634             /*
       
   635              * Use this method to start printing a multi-line representation of a
       
   636              * DocTree node. The representation should be termintated by calling
       
   637              * out.println("]").
       
   638              */
   622             void header(DocTree node) {
   639             void header(DocTree node) {
   623                 indent();
   640                 indent();
   624                 out.println(simpleClassName(node) + "[" + node.getKind() + ", pos:" + ((DCTree) node).pos);
   641                 out.println(simpleClassName(node) + "[" + node.getKind() + ", pos:" + ((DCTree) node).pos);
   625             }
   642             }
   626 
   643 
       
   644             /*
       
   645              * Use this method to print a single-line representation of a DocTree node.
       
   646              */
   627             void header(DocTree node, String rest) {
   647             void header(DocTree node, String rest) {
   628                 indent();
   648                 indent();
   629                 out.println(simpleClassName(node) + "[" + node.getKind() + ", pos:" + ((DCTree) node).pos
   649                 out.println(simpleClassName(node) + "[" + node.getKind() + ", pos:" + ((DCTree) node).pos
   630                         + (rest.isEmpty() ? "" : ", " + rest)
   650                         + (rest.isEmpty() ? "" : ", " + rest)
   631                         + "]");
   651                         + "]");