Thread: [Nice-commit] Nice/src/nice/tools/doc htmlwriter.nice,1.9,1.10
Brought to you by:
bonniot
From: Francis B. <fb...@us...> - 2004-04-03 15:04:00
|
Update of /cvsroot/nice/Nice/src/nice/tools/doc In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv14106/src/nice/tools/doc Modified Files: htmlwriter.nice Log Message: htmlwriter now dumps the docString to the page for classes, methods, and global vars. However, docString doesn't seem to be working properly. Index: htmlwriter.nice =================================================================== RCS file: /cvsroot/nice/Nice/src/nice/tools/doc/htmlwriter.nice,v retrieving revision 1.9 retrieving revision 1.10 diff -C2 -d -r1.9 -r1.10 *** htmlwriter.nice 1 Apr 2004 10:58:50 -0000 1.9 --- htmlwriter.nice 3 Apr 2004 14:51:41 -0000 1.10 *************** *** 24,27 **** --- 24,32 ---- //mainPackage = mainPackage.deleteAtEnd("/").replace('/', "."); + /** + * Default implementation - does nothing + * @param d a definition to document + * @param packageName the name of the package this definition is in. + */ void write(Definition d, String packageName) { } *************** *** 47,51 **** writer.write(getHeader(c.getName().toString())); ! writer.write("<h1>Class " + c.getName() + "</h1>"); //Print hierarchy --- 52,56 ---- writer.write(getHeader(c.getName().toString())); ! writer.write("<h1>Class " + c.getName() + "</h1>\n"); //Print hierarchy *************** *** 70,86 **** hierarchy = list.get(i).getName() + "\n" + spaces + "|\n" + spaces + "+--" + hierarchy; } ! writer.write("<pre>"); writer.write(hierarchy); ! writer.write("</pre>"); //Implemented interfaces ClassDefinition.Interface[?] interfaces = c.getImplementedInterfaces(); ! if(interfaces != null) { ! writer.write("<b>Implemented interfaces:</b>"); ! writer.write("<ul>"); interfaces.foreach(ClassDefinition.Interface i => ! writer.write("<li>" + i.getName() + "</li>")); ! writer.write("</ul>"); } writer.write(getFooter()); --- 75,100 ---- hierarchy = list.get(i).getName() + "\n" + spaces + "|\n" + spaces + "+--" + hierarchy; } ! writer.write("<pre>\n"); writer.write(hierarchy); ! writer.write("</pre>\n"); //Implemented interfaces ClassDefinition.Interface[?] interfaces = c.getImplementedInterfaces(); ! if(interfaces != null && interfaces.length > 0) { ! writer.write("<b>Implemented interfaces:</b>\n"); ! writer.write("<ul>\n"); interfaces.foreach(ClassDefinition.Interface i => ! writer.write("<li>" + i.getName() + "</li>\n")); ! writer.write("</ul>\n"); } + + writer.write("<p>\n"); + String comments; + if(c.docString() != null) + comments = notNull(c.docString()); + else + comments = "null"; + writer.write(comments + "\n"); + writer.write("</p>\n"); writer.write(getFooter()); *************** *** 102,112 **** writer.write(getHeader(gv.getName().toString())); ! writer.write("<h1>Global Variable " + gv.getName() + "</h1>"); writer.write(htmlSafe(gv.toString())); ! writer.write("<p>"); ! writer.write(""); ! writer.write("</p>"); writer.write(getFooter()); --- 116,131 ---- writer.write(getHeader(gv.getName().toString())); ! writer.write("<h1>Global Variable " + gv.getName() + "</h1>\n"); writer.write(htmlSafe(gv.toString())); ! writer.write("<p>\n"); ! String comments; ! if(gv.docString() != null) ! comments = notNull(gv.docString()); ! else ! comments = "null"; ! writer.write(comments + "\n"); ! writer.write("</p>\n"); writer.write(getFooter()); *************** *** 118,122 **** //Initialise a FileWriter ! File dir = new File(outdir, packageName.replace('.',java.io.File.separator)); if(!dir.exists() && !dir.mkdirs()) { System.err.println("Error creating directory structure"); --- 137,141 ---- //Initialise a FileWriter ! File dir = new File(outdir, packageName.replace('.', java.io.File.separator)); if(!dir.exists() && !dir.mkdirs()) { System.err.println("Error creating directory structure"); *************** *** 128,137 **** writer.write(getHeader(m.getName().toString())); ! writer.write("<h1>Method " + m.getName() + "</h1>"); writer.write(htmlSafe(m.toString())); writer.write("<p>"); ! writer.write("nicedoc comments would go here..."); writer.write("</p>"); --- 147,162 ---- writer.write(getHeader(m.getName().toString())); ! writer.write("<h1>Method " + m.getName() + "</h1>\n"); writer.write(htmlSafe(m.toString())); + writer.write("<p>\n"); writer.write("<p>"); ! String comments; ! if(m.docString() != null) ! comments = notNull(m.docString()); ! else ! comments = "null"; ! writer.write(comments + "\n"); writer.write("</p>"); |