langtools/src/share/classes/com/sun/tools/doclets/formats/html/TagletWriterImpl.java
--- a/langtools/src/share/classes/com/sun/tools/doclets/formats/html/TagletWriterImpl.java Tue Feb 24 17:48:53 2009 -0800
+++ b/langtools/src/share/classes/com/sun/tools/doclets/formats/html/TagletWriterImpl.java Fri Feb 27 18:57:17 2009 -0800
@@ -25,17 +25,18 @@
package com.sun.tools.doclets.formats.html;
+import com.sun.javadoc.*;
import com.sun.tools.doclets.internal.toolkit.*;
import com.sun.tools.doclets.internal.toolkit.builders.SerializedFormBuilder;
import com.sun.tools.doclets.internal.toolkit.taglets.*;
import com.sun.tools.doclets.internal.toolkit.util.*;
-import com.sun.javadoc.*;
/**
* The taglet writer that writes HTML.
*
* @since 1.5
* @author Jamie Ho
+ * @author Bhavesh Patel (Modified)
*/
public class TagletWriterImpl extends TagletWriter {
@@ -99,11 +100,12 @@
output.append(DocletConstants.NL + "<P>" +
DocletConstants.NL);
}
+ output.append("</DD>");
} else {
if (Util.isDeprecated(member.containingClass())) {
output.append("<DD><STRONG>" +
ConfigurationImpl.getInstance().
- getText("doclet.Deprecated") + "</STRONG> ");
+ getText("doclet.Deprecated") + "</STRONG> </DD>");
}
}
}
@@ -123,7 +125,7 @@
public TagletOutput getParamHeader(String header) {
StringBuffer result = new StringBuffer();
result.append("<DT>");
- result.append("<STRONG>" + header + "</STRONG>");
+ result.append("<STRONG>" + header + "</STRONG></DT>");
return new TagletOutputImpl(result.toString());
}
@@ -132,7 +134,7 @@
*/
public TagletOutput paramTagOutput(ParamTag paramTag, String paramName) {
TagletOutput result = new TagletOutputImpl("<DD><CODE>" + paramName + "</CODE>"
- + " - " + htmlWriter.commentTagsToString(paramTag, null, paramTag.inlineTags(), false));
+ + " - " + htmlWriter.commentTagsToString(paramTag, null, paramTag.inlineTags(), false) + "</DD>");
return result;
}
@@ -142,9 +144,9 @@
public TagletOutput returnTagOutput(Tag returnTag) {
TagletOutput result = new TagletOutputImpl(DocletConstants.NL + "<DT>" +
"<STRONG>" + htmlWriter.configuration.getText("doclet.Returns") +
- "</STRONG>" + "<DD>" +
+ "</STRONG>" + "</DT>" + "<DD>" +
htmlWriter.commentTagsToString(returnTag, null, returnTag.inlineTags(),
- false));
+ false) + "</DD>");
return result;
}
@@ -174,22 +176,21 @@
}
if (holder.isClass() && ((ClassDoc)holder).isSerializable()) {
//Automatically add link to serialized form page for serializable classes.
- if (!(SerializedFormBuilder.serialInclude(holder) &&
+ if ((SerializedFormBuilder.serialInclude(holder) &&
SerializedFormBuilder.serialInclude(((ClassDoc)holder).containingPackage()))) {
- return result.equals("") ? null : new TagletOutputImpl(result);
+ result = addSeeHeader(result);
+ result += htmlWriter.getHyperLink(htmlWriter.relativePath + "serialized-form.html",
+ ((ClassDoc)holder).qualifiedName(), htmlWriter.configuration.getText("doclet.Serialized_Form"), false);
}
- result = addSeeHeader(result);
- result += htmlWriter.getHyperLink(htmlWriter.relativePath + "serialized-form.html",
- ((ClassDoc)holder).qualifiedName(), htmlWriter.configuration.getText("doclet.Serialized_Form"), false);
}
- return result.equals("") ? null : new TagletOutputImpl(result);
+ return result.equals("") ? null : new TagletOutputImpl(result + "</DD>");
}
private String addSeeHeader(String result) {
if (result != null && result.length() > 0) {
return result + ", " + DocletConstants.NL;
} else {
- return "<DT><STRONG>" + htmlWriter.configuration().getText("doclet.See_Also") + "</STRONG><DD>";
+ return "<DT><STRONG>" + htmlWriter.configuration().getText("doclet.See_Also") + "</STRONG></DT><DD>";
}
}
@@ -205,7 +206,8 @@
}
result += htmlWriter.commentTagsToString(simpleTags[i], null, simpleTags[i].inlineTags(), false);
}
- return new TagletOutputImpl(result + "</DD>" + DocletConstants.NL);
+ result += "</DD>" + DocletConstants.NL;
+ return new TagletOutputImpl(result);
}
/**
@@ -222,7 +224,7 @@
*/
public TagletOutput getThrowsHeader() {
return new TagletOutputImpl(DocletConstants.NL + "<DT>" + "<STRONG>" +
- htmlWriter.configuration().getText("doclet.Throws") + "</STRONG>");
+ htmlWriter.configuration().getText("doclet.Throws") + "</STRONG></DT>");
}
/**
@@ -241,6 +243,7 @@
if (text != null && text.toString().length() > 0) {
result += " - " + text;
}
+ result += "</DD>";
return new TagletOutputImpl(result);
}
@@ -250,7 +253,7 @@
public TagletOutput throwsTagOutput(Type throwsType) {
return new TagletOutputImpl(DocletConstants.NL + "<DD>" +
htmlWriter.codeText(htmlWriter.getLink(
- new LinkInfoImpl(LinkInfoImpl.CONTEXT_MEMBER, throwsType))));
+ new LinkInfoImpl(LinkInfoImpl.CONTEXT_MEMBER, throwsType))) + "</DD>");
}
/**