Hi Fu,

> Hi Mark,
> Just finished javax.swing.text.html.HTMLWriter, can you commit it for me?
> Thanks! ;)

The code looks good. Maybe you could fix the following points, then it
would be even better:
- Add (extensive ;-) ) comments to the class and to each method/field
etc. This makes the code more readable and allows others to better
understand what's going on, just in case somebody else needs to fix
something in there. For API comments follow these guidelines:

http://java.sun.com/products/jdk/javadoc/writingdoccomments.html
- For instance, this:
    /** Writes all the attributes in the attrSet, except for attrbutes
with keys of HTML.Tag, StyleConstants or HTML.Attribute.ENDTAG.
     */
     protected void writeAttributes(AttributeSet attrSet) throws
IOException

should be written like this:
    /**
     * Writes all the attributes in the attrSet, except for attrbutes
     * with keys of HTML.Tag, StyleConstants or HTML.Attribute.ENDTAG.
     *
     * @param attrSet <description of param>
     *
     * @throws IOException <condition for exception>
     */

- Format your code to break lines after 79 chars
- Generally, you should follow the GNU coding style:
  if (condition)
    { // <--- 2 spaces indent.
      bla(); // <-- 2 more spaces indent.
    }

etc. Refer to
http://www.gnu.org/software/classpath/docs/hacking.html#SEC6 for more
details.

That said, I haven't yet tried out the actual code. Have you used test
programs during your development? Maybe they could be added as Mauve
tests or added as a small demo (as part of our Swing demo) that
demonstrates that this class works?

Thank you, Roman



Reply via email to