refactored the templates to make use of the lovely new multi line strings with templates; they're much easier to read now in IDEA (further improvements could be done to refactor functions from printFoo() to be foo() returning the String of the result)
This commit is contained in:
-1
@@ -9,7 +9,6 @@ import org.jetbrains.kotlin.model.KModel
|
||||
|
||||
class AllClassesFrameTemplate(val model: KModel, val classAttributes: String = "") : KDocTemplate() {
|
||||
override fun render() {
|
||||
// TODO could really do with templates in multi-line strings :)
|
||||
println("""<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
|
||||
<!--NewPage-->
|
||||
<HTML>
|
||||
|
||||
@@ -16,27 +16,26 @@ open class ClassTemplate(open val model: KModel, pkg: KPackage, open val klass:
|
||||
open fun pageTitle(): String = "${klass.name} (${model.title})"
|
||||
|
||||
override fun render() {
|
||||
// TODO could really do with templates in multi-line strings :)
|
||||
println("""<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
|
||||
<!--NewPage-->
|
||||
<HTML>
|
||||
<HEAD>""")
|
||||
println("""<!-- Generated by kdoc (${model.version}) on ${Date()} -->""")
|
||||
println("""<META http-equiv="Content-Type" content="text/html; charset=UTF-8">
|
||||
<TITLE>""")
|
||||
println(pageTitle())
|
||||
println("""</TITLE>
|
||||
<HEAD>
|
||||
<!-- Generated by kdoc (${model.version}) on ${Date()} -->
|
||||
<META http-equiv="Content-Type" content="text/html; charset=UTF-8">
|
||||
<TITLE>
|
||||
${pageTitle()}
|
||||
</TITLE>
|
||||
|
||||
<META NAME="date" CONTENT="2012-01-09">
|
||||
<META NAME="date" CONTENT="2012-01-09">""")
|
||||
println("""<LINK REL="stylesheet" TYPE="text/css" HREF="${pkg.nameAsRelativePath}stylesheet.css" TITLE="Style">""")
|
||||
println("""
|
||||
<META NAME="date" CONTENT="2012-01-09">
|
||||
<LINK REL="stylesheet" TYPE="text/css" HREF="${pkg.nameAsRelativePath}stylesheet.css" TITLE="Style">
|
||||
|
||||
<SCRIPT type="text/javascript">
|
||||
function windowTitle()
|
||||
{
|
||||
if (location.href.indexOf('is-external=true') == -1) {""")
|
||||
println(""" parent.document.title="${klass.name} (${model.title})";""")
|
||||
println(""" }
|
||||
if (location.href.indexOf('is-external=true') == -1) {
|
||||
parent.document.title="${klass.name} (${model.title})";
|
||||
}
|
||||
}
|
||||
</SCRIPT>
|
||||
<NOSCRIPT>
|
||||
@@ -56,16 +55,15 @@ function windowTitle()
|
||||
<TD COLSPAN=2 BGCOLOR="#EEEEFF" CLASS="NavBarCell1">
|
||||
<A NAME="navbar_top_firstrow"><!-- --></A>
|
||||
<TABLE BORDER="0" CELLPADDING="0" CELLSPACING="3" SUMMARY="">
|
||||
<TR ALIGN="center" VALIGN="top">""")
|
||||
println(""" <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="${pkg.nameAsRelativePath}overview-summary.html"><FONT CLASS="NavBarFont1"><B>Overview</B></FONT></A> </TD>""")
|
||||
println(""" <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="package-summary.html"><FONT CLASS="NavBarFont1"><B>Package</B></FONT></A> </TD>""")
|
||||
println(""" <TD BGCOLOR="#FFFFFF" CLASS="NavBarCell1Rev"> <FONT CLASS="NavBarFont1Rev"><B>Class</B></FONT> </TD>""")
|
||||
println(""" <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="class-use/${klass.simpleName}.html"><FONT CLASS="NavBarFont1"><B>Use</B></FONT></A> </TD>""")
|
||||
println(""" <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="package-tree.html"><FONT CLASS="NavBarFont1"><B>Tree</B></FONT></A> </TD>""")
|
||||
println(""" <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="${pkg.nameAsRelativePath}deprecated-list.html"><FONT CLASS="NavBarFont1"><B>Deprecated</B></FONT></A> </TD>""")
|
||||
println(""" <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="${pkg.nameAsRelativePath}index-all.html"><FONT CLASS="NavBarFont1"><B>Index</B></FONT></A> </TD>""")
|
||||
println(""" <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="${pkg.nameAsRelativePath}help-doc.html"><FONT CLASS="NavBarFont1"><B>Help</B></FONT></A> </TD>""")
|
||||
println(""" </TR>
|
||||
<TR ALIGN="center" VALIGN="top">
|
||||
<TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="${pkg.nameAsRelativePath}overview-summary.html"><FONT CLASS="NavBarFont1"><B>Overview</B></FONT></A> </TD>
|
||||
<TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="package-summary.html"><FONT CLASS="NavBarFont1"><B>Package</B></FONT></A> </TD>\n CLASS="NavBarCell1Rev"> <FONT CLASS="NavBarFont1Rev"><B>Class</B></FONT> </TD>
|
||||
<TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="class-use/${klass.simpleName}.html"><FONT CLASS="NavBarFont1"><B>Use</B></FONT></A> </TD>
|
||||
<TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="package-tree.html"><FONT CLASS="NavBarFont1"><B>Tree</B></FONT></A> </TD>
|
||||
<TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="${pkg.nameAsRelativePath}deprecated-list.html"><FONT CLASS="NavBarFont1"><B>Deprecated</B></FONT></A> </TD>
|
||||
<TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="${pkg.nameAsRelativePath}index-all.html"><FONT CLASS="NavBarFont1"><B>Index</B></FONT></A> </TD>
|
||||
<TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="${pkg.nameAsRelativePath}help-doc.html"><FONT CLASS="NavBarFont1"><B>Help</B></FONT></A> </TD>
|
||||
</TR>
|
||||
</TABLE>
|
||||
</TD>
|
||||
<TD ALIGN="right" VALIGN="top" ROWSPAN=3><EM>
|
||||
@@ -77,19 +75,19 @@ function windowTitle()
|
||||
""")
|
||||
|
||||
printPrevNextClass()
|
||||
println("""<TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2">""")
|
||||
println(""" <A HREF="${pkg.nameAsRelativePath}index.html?${klass.nameAsPath}.html" target="_top"><B>FRAMES</B></A> """)
|
||||
println(""" <A HREF="${klass.simpleName}.html" target="_top"><B>NO FRAMES</B></A> """)
|
||||
println(""" <SCRIPT type="text/javascript">
|
||||
println("""<TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2">
|
||||
<A HREF="${pkg.nameAsRelativePath}index.html?${klass.nameAsPath}.html" target="_top"><B>FRAMES</B></A>
|
||||
<A HREF="${klass.simpleName}.html" target="_top"><B>NO FRAMES</B></A>
|
||||
<SCRIPT type="text/javascript">
|
||||
<!--
|
||||
if(window==top) {""")
|
||||
println(""" document.writeln('<A HREF="${pkg.nameAsRelativePath}allclasses-noframe.html"><B>All Classes</B></A>');""")
|
||||
println(""" }
|
||||
if(window==top) {
|
||||
document.writeln('<A HREF="${pkg.nameAsRelativePath}allclasses-noframe.html"><B>All Classes</B></A>');
|
||||
}
|
||||
//-->
|
||||
</SCRIPT>
|
||||
<NOSCRIPT>""")
|
||||
println(""" <A HREF="${pkg.nameAsRelativePath}allclasses-noframe.html"><B>All Classes</B></A>""")
|
||||
println("""</NOSCRIPT>
|
||||
<NOSCRIPT>
|
||||
<A HREF="${pkg.nameAsRelativePath}allclasses-noframe.html"><B>All Classes</B></A>
|
||||
</NOSCRIPT>
|
||||
|
||||
|
||||
</FONT></TD>
|
||||
@@ -115,18 +113,16 @@ DETAIL: FIELD | CONSTR | <A HREF="#method_detail">METHO
|
||||
<TD COLSPAN=2 BGCOLOR="#EEEEFF" CLASS="NavBarCell1">
|
||||
<A NAME="navbar_bottom_firstrow"><!-- --></A>
|
||||
<TABLE BORDER="0" CELLPADDING="0" CELLSPACING="3" SUMMARY="">
|
||||
<TR ALIGN="center" VALIGN="top">""")
|
||||
|
||||
println(""" <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="${pkg.nameAsRelativePath}overview-summary.html"><FONT CLASS="NavBarFont1"><B>Overview</B></FONT></A> </TD>""")
|
||||
println(""" <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="package-summary.html"><FONT CLASS="NavBarFont1"><B>Package</B></FONT></A> </TD>""")
|
||||
println(""" <TD BGCOLOR="#FFFFFF" CLASS="NavBarCell1Rev"> <FONT CLASS="NavBarFont1Rev"><B>Class</B></FONT> </TD>""")
|
||||
println(""" <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="class-use/${klass.simpleName}.html"><FONT CLASS="NavBarFont1"><B>Use</B></FONT></A> </TD>""")
|
||||
println(""" <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="package-tree.html"><FONT CLASS="NavBarFont1"><B>Tree</B></FONT></A> </TD>""")
|
||||
println(""" <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="${pkg.nameAsRelativePath}deprecated-list.html"><FONT CLASS="NavBarFont1"><B>Deprecated</B></FONT></A> </TD>""")
|
||||
println(""" <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="${pkg.nameAsRelativePath}index-all.html"><FONT CLASS="NavBarFont1"><B>Index</B></FONT></A> </TD>""")
|
||||
println(""" <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="${pkg.nameAsRelativePath}help-doc.html"><FONT CLASS="NavBarFont1"><B>Help</B></FONT></A> </TD>""")
|
||||
|
||||
println(""" </TR>
|
||||
<TR ALIGN="center" VALIGN="top">
|
||||
<TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="${pkg.nameAsRelativePath}overview-summary.html"><FONT CLASS="NavBarFont1"><B>Overview</B></FONT></A> </TD>
|
||||
<TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="package-summary.html"><FONT CLASS="NavBarFont1"><B>Package</B></FONT></A> </TD>
|
||||
<TD BGCOLOR="#FFFFFF" CLASS="NavBarCell1Rev"> <FONT CLASS="NavBarFont1Rev"><B>Class</B></FONT> </TD>
|
||||
<TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="class-use/${klass.simpleName}.html"><FONT CLASS="NavBarFont1"><B>Use</B></FONT></A> </TD>
|
||||
<TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="package-tree.html"><FONT CLASS="NavBarFont1"><B>Tree</B></FONT></A> </TD>
|
||||
<TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="${pkg.nameAsRelativePath}deprecated-list.html"><FONT CLASS="NavBarFont1"><B>Deprecated</B></FONT></A> </TD>
|
||||
<TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="${pkg.nameAsRelativePath}index-all.html"><FONT CLASS="NavBarFont1"><B>Index</B></FONT></A> </TD>
|
||||
<TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="${pkg.nameAsRelativePath}help-doc.html"><FONT CLASS="NavBarFont1"><B>Help</B></FONT></A> </TD>
|
||||
</TR>
|
||||
</TABLE>
|
||||
</TD>
|
||||
<TD ALIGN="right" VALIGN="top" ROWSPAN=3><EM>
|
||||
@@ -136,19 +132,18 @@ DETAIL: FIELD | CONSTR | <A HREF="#method_detail">METHO
|
||||
|
||||
<TR>""")
|
||||
printPrevNextClass()
|
||||
println("""<TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2">""")
|
||||
println(""" <A HREF="${pkg.nameAsRelativePath}index.html?${klass.nameAsPath}.html" target="_top"><B>FRAMES</B></A> """)
|
||||
println(""" <A HREF="${klass.simpleName}.html" target="_top"><B>NO FRAMES</B></A> """)
|
||||
println(""" <SCRIPT type="text/javascript">
|
||||
println("""<TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2">
|
||||
<A HREF="${pkg.nameAsRelativePath}index.html?${klass.nameAsPath}.html" target="_top"><B>FRAMES</B></A>
|
||||
<A HREF="${klass.simpleName}.html" target="_top"><B>NO FRAMES</B></A>
|
||||
<SCRIPT type="text/javascript">
|
||||
<!--
|
||||
if(window==top) {""")
|
||||
println(""" document.writeln('<A HREF="${pkg.nameAsRelativePath}allclasses-noframe.html"><B>All Classes</B></A>');""")
|
||||
println(""" }
|
||||
if(window==top) {
|
||||
document.writeln('<A HREF="${pkg.nameAsRelativePath}allclasses-noframe.html"><B>All Classes</B></A>');
|
||||
}
|
||||
//-->
|
||||
</SCRIPT>
|
||||
<NOSCRIPT>""")
|
||||
println(""" <A HREF="${pkg.nameAsRelativePath}allclasses-noframe.html"><B>All Classes</B></A>""")
|
||||
println("""</NOSCRIPT>
|
||||
<NOSCRIPT>\nPath}allclasses-noframe.html"><B>All Classes</B></A>
|
||||
</NOSCRIPT>
|
||||
|
||||
|
||||
</FONT></TD>
|
||||
@@ -173,20 +168,20 @@ DETAIL: FIELD | CONSTR | <A HREF="#method_detail">METHO
|
||||
println("""<HR>
|
||||
<!-- ======== START OF CLASS DATA ======== -->
|
||||
<H2>
|
||||
<FONT SIZE="-1">""")
|
||||
println("""${pkg.name}</FONT>""")
|
||||
println("""<BR>""")
|
||||
println("""Class ${klass.simpleName}</H2>""")
|
||||
println("""<PRE>""")
|
||||
<FONT SIZE="-1">
|
||||
${pkg.name}</FONT>
|
||||
<BR>
|
||||
Class ${klass.simpleName}</H2>
|
||||
<PRE>""")
|
||||
|
||||
for (bc in klass.baseClasses) {
|
||||
println(link(bc, true))
|
||||
}
|
||||
println(""" <IMG SRC="${pkg.nameAsRelativePath}resources/inherit.gif" ALT="extended by "><B>${klass.name}</B>""")
|
||||
println("""</PRE>
|
||||
println(""" <IMG SRC="${pkg.nameAsRelativePath}resources/inherit.gif" ALT="extended by "><B>${klass.name}</B>
|
||||
</PRE>
|
||||
<HR>
|
||||
<DL>""")
|
||||
print("""<DT><PRE><FONT SIZE="-1">""")
|
||||
<DL>
|
||||
<DT><PRE><FONT SIZE="-1">""")
|
||||
printAnnotations(klass.annotations)
|
||||
print("""</FONT>public class <A HREF="${pkg.nameAsRelativePath}src-html/${klass.nameAsPath}.html#line.${klass.sourceLine}"><B>${klass.simpleName}</B></A><DT>""")
|
||||
if (!klass.baseClasses.isEmpty()) {
|
||||
@@ -195,21 +190,21 @@ DETAIL: FIELD | CONSTR | <A HREF="#method_detail">METHO
|
||||
println(link(bc))
|
||||
}
|
||||
}
|
||||
println("""</DL>""")
|
||||
println("""</PRE>
|
||||
println("""</DL>
|
||||
</PRE>
|
||||
|
||||
<P>""")
|
||||
println(klass.detailedDescription)
|
||||
if (klass.since.size > 0 || klass.authors.size > 0) {
|
||||
println("""<P>""")
|
||||
println("""<DL>""")
|
||||
println("""<P>
|
||||
<DL>""")
|
||||
if (klass.since.size > 0) {
|
||||
println("""<DT><B>Since:</B></DT>""")
|
||||
println(""" <DD>${klass.since}</DD>""")
|
||||
println("""<DT><B>Since:</B></DT>
|
||||
<DD>${klass.since}</DD>""")
|
||||
}
|
||||
for (author in klass.authors) {
|
||||
println("""<DT><B>Author:</B></DT>""")
|
||||
println(""" <DD>${author}</DD>""")
|
||||
println("""<DT><B>Author:</B></DT>
|
||||
<DD>${author}</DD>""")
|
||||
}
|
||||
println("""</DL>""")
|
||||
}
|
||||
@@ -230,11 +225,11 @@ DETAIL: FIELD | CONSTR | <A HREF="#method_detail">METHO
|
||||
for (nc in nestedClasses) {
|
||||
println("""<TR BGCOLOR="white" CLASS="TableRowColor">
|
||||
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
|
||||
<CODE>static class</CODE></FONT></TD>""")
|
||||
println("""<TD><CODE><B><A HREF="${pkg.nameAsRelativePath}${nc.nameAsPath}.html" title="class in ${nc.packageName}">${klass.simpleName}.${nc.simpleName}</A></B></CODE>""")
|
||||
println("""<BR>""")
|
||||
println(""" ${nc.description}""")
|
||||
println("""</TD>""")
|
||||
<CODE>static class</CODE></FONT></TD>
|
||||
<TD><CODE><B><A HREF="${pkg.nameAsRelativePath}${nc.nameAsPath}.html" title="class in ${nc.packageName}">${klass.simpleName}.${nc.simpleName}</A></B></CODE>
|
||||
<BR>
|
||||
${nc.description}
|
||||
</TD>""")
|
||||
}
|
||||
println("""</TR>
|
||||
</TABLE>
|
||||
|
||||
@@ -15,9 +15,9 @@ class HelpDocTemplate(val model: KModel) : KDocTemplate() {
|
||||
<HEAD>
|
||||
<!-- Generated by javadoc on Mon Jan 09 13:32:00 EST 2012-->
|
||||
<META http-equiv="Content-Type" content="text/html; charset=UTF-8">
|
||||
<TITLE>""")
|
||||
println("""API Help (${model.title})""")
|
||||
println("""</TITLE>
|
||||
<TITLE>
|
||||
API Help (${model.title})
|
||||
</TITLE>
|
||||
|
||||
<META NAME="date" CONTENT="2012-01-09">
|
||||
|
||||
@@ -26,9 +26,9 @@ class HelpDocTemplate(val model: KModel) : KDocTemplate() {
|
||||
<SCRIPT type="text/javascript">
|
||||
function windowTitle()
|
||||
{
|
||||
if (location.href.indexOf('is-external=true') == -1) {""")
|
||||
println(""" parent.document.title="API Help (${model.title})";""")
|
||||
println(""" }
|
||||
if (location.href.indexOf('is-external=true') == -1) {
|
||||
parent.document.title="API Help (${model.title})";
|
||||
}
|
||||
}
|
||||
</SCRIPT>
|
||||
<NOSCRIPT>
|
||||
|
||||
@@ -16,9 +16,7 @@ class IndexTemplate(val model: KModel) : KDocTemplate() {
|
||||
<!-- Generated by javadoc on Mon Jan 09 13:32:00 EST 2012-->
|
||||
<META http-equiv="Content-Type" content="text/html; charset=UTF-8">
|
||||
<TITLE>
|
||||
""")
|
||||
print(model.title)
|
||||
print("""
|
||||
${model.title}
|
||||
</TITLE>
|
||||
<SCRIPT type="text/javascript">
|
||||
targetPage = "" + window.location.search;
|
||||
|
||||
+8
-9
@@ -9,16 +9,15 @@ import org.jetbrains.kotlin.model.KModel
|
||||
|
||||
class OverviewFrameTemplate(val model: KModel) : KDocTemplate() {
|
||||
override fun render() {
|
||||
// TODO could really do with templates in multi-line strings :)
|
||||
println("""<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
|
||||
<!--NewPage-->
|
||||
<HTML>
|
||||
<HEAD>""")
|
||||
println("""<!-- Generated by kdoc (${model.version}) on ${Date()} -->""")
|
||||
println("""<META http-equiv="Content-Type" content="text/html; charset=UTF-8">
|
||||
<TITLE>""")
|
||||
println("""Overview List (${model.title})""")
|
||||
print("""</TITLE>
|
||||
<HEAD>
|
||||
<!-- Generated by kdoc (${model.version}) on ${Date()} -->
|
||||
<META http-equiv="Content-Type" content="text/html; charset=UTF-8">
|
||||
<TITLE>
|
||||
Overview List (${model.title})
|
||||
</TITLE>
|
||||
|
||||
<META NAME="date" CONTENT="2012-01-09">
|
||||
<LINK REL ="stylesheet" TYPE="text/css" HREF="stylesheet.css" TITLE="Style">
|
||||
@@ -41,8 +40,8 @@ class OverviewFrameTemplate(val model: KModel) : KDocTemplate() {
|
||||
Packages</FONT>
|
||||
<BR>""")
|
||||
for (p in model.packages) {
|
||||
println("""<FONT CLASS="FrameItemFont"><A HREF="${p.nameAsPath}/package-frame.html" target="packageFrame">${p.name}</A></FONT>""")
|
||||
println("""<BR>""")
|
||||
println("""<FONT CLASS="FrameItemFont"><A HREF="${p.nameAsPath}/package-frame.html" target="packageFrame">${p.name}</A></FONT>
|
||||
<BR>""")
|
||||
}
|
||||
println("""</TD>
|
||||
</TR>
|
||||
|
||||
+13
-13
@@ -15,9 +15,9 @@ class OverviewSummaryTemplate(val model: KModel) : KDocTemplate() {
|
||||
<HEAD>
|
||||
<!-- Generated by javadoc on Mon Jan 09 13:32:00 EST 2012-->
|
||||
<META http-equiv="Content-Type" content="text/html; charset=UTF-8">
|
||||
<TITLE>""")
|
||||
println("""Overview (${model.title})""")
|
||||
println("""</TITLE>
|
||||
<TITLE>
|
||||
Overview (${model.title})
|
||||
</TITLE>
|
||||
|
||||
<META NAME="date" CONTENT="2012-01-09">
|
||||
|
||||
@@ -26,9 +26,9 @@ class OverviewSummaryTemplate(val model: KModel) : KDocTemplate() {
|
||||
<SCRIPT type="text/javascript">
|
||||
function windowTitle()
|
||||
{
|
||||
if (location.href.indexOf('is-external=true') == -1) {""")
|
||||
println(""" parent.document.title="Overview (${model.title})";""")
|
||||
println(""" }
|
||||
if (location.href.indexOf('is-external=true') == -1) {
|
||||
parent.document.title="Overview (${model.title})";
|
||||
}
|
||||
}
|
||||
</SCRIPT>
|
||||
<NOSCRIPT>
|
||||
@@ -92,9 +92,9 @@ function windowTitle()
|
||||
|
||||
<HR>
|
||||
<CENTER>
|
||||
<H1>""")
|
||||
println(model.title)
|
||||
println("""</H1>
|
||||
<H1>
|
||||
${model.title}
|
||||
</H1>
|
||||
</CENTER>
|
||||
|
||||
<TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY="">
|
||||
@@ -103,10 +103,10 @@ function windowTitle()
|
||||
<B>Packages</B></FONT></TH>
|
||||
</TR>""")
|
||||
for (p in model.packages) {
|
||||
println("""<TR BGCOLOR="white" CLASS="TableRowColor">""")
|
||||
println("""<TD WIDTH="20%"><B><A HREF="${p.nameAsPath}/package-summary.html">${p.nameAsPath}</A></B></TD>""")
|
||||
println("""<TD>${p.description}</TD>""")
|
||||
println("""</TR>""")
|
||||
println("""<TR BGCOLOR="white" CLASS="TableRowColor">
|
||||
<TD WIDTH="20%"><B><A HREF="${p.nameAsPath}/package-summary.html">${p.nameAsPath}</A></B></TD>
|
||||
<TD>${p.description}</TD>
|
||||
</TR>""")
|
||||
}
|
||||
println("""</TABLE>
|
||||
|
||||
|
||||
+10
-11
@@ -15,9 +15,9 @@ class OverviewTreeTemplate(val model: KModel) : KDocTemplate() {
|
||||
<HEAD>
|
||||
<!-- Generated by javadoc on Mon Jan 09 13:32:00 EST 2012-->
|
||||
<META http-equiv="Content-Type" content="text/html; charset=UTF-8">
|
||||
<TITLE>""")
|
||||
println("""Class Hierarchy (${model.title})""")
|
||||
println("""</TITLE>
|
||||
<TITLE>
|
||||
Class Hierarchy (${model.title})
|
||||
</TITLE>
|
||||
|
||||
<META NAME="date" CONTENT="2012-01-09">
|
||||
|
||||
@@ -26,9 +26,9 @@ class OverviewTreeTemplate(val model: KModel) : KDocTemplate() {
|
||||
<SCRIPT type="text/javascript">
|
||||
function windowTitle()
|
||||
{
|
||||
if (location.href.indexOf('is-external=true') == -1) {""")
|
||||
println(""" parent.document.title="Class Hierarchy (${model.title})";""")
|
||||
println(""" }
|
||||
if (location.href.indexOf('is-external=true') == -1) {
|
||||
parent.document.title="Class Hierarchy (${model.title})";
|
||||
}
|
||||
}
|
||||
</SCRIPT>
|
||||
<NOSCRIPT>
|
||||
@@ -103,8 +103,8 @@ Hierarchy For All Packages</H2>
|
||||
if (first) {
|
||||
first = false
|
||||
} else {
|
||||
print(""", """)
|
||||
print("""<A HREF="${p.nameAsPath}/package-tree.html">${p.nameAsPath}</A>""")
|
||||
print(""",
|
||||
<A HREF="${p.nameAsPath}/package-tree.html">${p.nameAsPath}</A>""")
|
||||
}
|
||||
}
|
||||
println("""</DL>
|
||||
@@ -132,9 +132,8 @@ Annotation Type Hierarchy
|
||||
// TODO
|
||||
println("""<H2>
|
||||
Enum Hierarchy
|
||||
</H2>""")
|
||||
|
||||
println("""<HR>
|
||||
</H2>
|
||||
<HR>
|
||||
|
||||
|
||||
<!-- ======= START OF BOTTOM NAVBAR ====== -->
|
||||
|
||||
+17
-18
@@ -13,25 +13,24 @@ import org.jetbrains.kotlin.model.extensionFunctions
|
||||
|
||||
class PackageFrameTemplate(val model: KModel, p: KPackage) : PackageTemplateSupport(p) {
|
||||
override fun render() {
|
||||
// TODO could really do with templates in multi-line strings :)
|
||||
println("""<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
|
||||
<!--NewPage-->
|
||||
<HTML>
|
||||
<HEAD>""")
|
||||
println("""<!-- Generated by kdoc (${model.version}) on ${Date()} -->""")
|
||||
println("""<META http-equiv="Content-Type" content="text/html; charset=UTF-8">
|
||||
<TITLE>""")
|
||||
println("""${pkg.name} (${model.title})""")
|
||||
println("""</TITLE>
|
||||
<HEAD>
|
||||
<!-- Generated by kdoc (${model.version}) on ${Date()} -->
|
||||
<META http-equiv="Content-Type" content="text/html; charset=UTF-8">
|
||||
<TITLE>
|
||||
${pkg.name} (${model.title})
|
||||
</TITLE>
|
||||
|
||||
<META NAME="date" CONTENT="2012-01-09">
|
||||
<LINK REL ="stylesheet" TYPE="text/css" HREF="${pkg.nameAsRelativePath}stylesheet.css" TITLE="Style">
|
||||
|
||||
<META NAME="date" CONTENT="2012-01-09">""")
|
||||
println("""<LINK REL ="stylesheet" TYPE="text/css" HREF="${pkg.nameAsRelativePath}stylesheet.css" TITLE="Style">""")
|
||||
println("""
|
||||
</HEAD>
|
||||
|
||||
<BODY BGCOLOR="white">
|
||||
<FONT size="+1" CLASS="FrameTitleFont">""")
|
||||
println("""<A HREF="${pkg.nameAsRelativePath}${pkg.nameAsPath}/package-summary.html" target="classFrame">${pkg.name}</A></FONT>""")
|
||||
<FONT size="+1" CLASS="FrameTitleFont">
|
||||
<A HREF="${pkg.nameAsRelativePath}${pkg.nameAsPath}/package-summary.html" target="classFrame">${pkg.name}</A></FONT>""")
|
||||
|
||||
printClasses("interface", "Interfaces")
|
||||
printClasses("class", "Classes")
|
||||
@@ -57,8 +56,8 @@ class PackageFrameTemplate(val model: KModel, p: KPackage) : PackageTemplateSupp
|
||||
<BR>""")
|
||||
for (c in classes) {
|
||||
val formatted = if (kind == "interface") "<I>${c.simpleName}</I>" else c.simpleName
|
||||
println("""<A HREF="${c.simpleName}.html" title="$kind in ${pkg.name}" target="classFrame">$formatted</A>""")
|
||||
println("""<BR>""")
|
||||
println("""<A HREF="${c.simpleName}.html" title="$kind in ${pkg.name}" target="classFrame">$formatted</A>
|
||||
<BR>""")
|
||||
}
|
||||
println("""</TR>
|
||||
</TABLE>""")
|
||||
@@ -74,8 +73,8 @@ class PackageFrameTemplate(val model: KModel, p: KPackage) : PackageTemplateSupp
|
||||
<FONT CLASS="FrameItemFont">
|
||||
<BR>""")
|
||||
for (c in functions) {
|
||||
println("""<A HREF="${href(c)}" title="function in ${pkg.name}" target="classFrame"><I>${c.name}</I></A>""")
|
||||
println("""<BR>""")
|
||||
println("""<A HREF="${href(c)}" title="function in ${pkg.name}" target="classFrame"><I>${c.name}</I></A>
|
||||
<BR>""")
|
||||
}
|
||||
println("""</TR>
|
||||
</TABLE>""")
|
||||
@@ -93,8 +92,8 @@ class PackageFrameTemplate(val model: KModel, p: KPackage) : PackageTemplateSupp
|
||||
for (e in map.entrySet()) {
|
||||
val c = e?.getKey()
|
||||
if (c != null) {
|
||||
println("""<A HREF="${extensionsHref(pkg, c)}" title="extensions functions on class ${c.name} from ${pkg.name}" target="classFrame"><I>${c.name}</I></A>""")
|
||||
println("""<BR>""")
|
||||
println("""<A HREF="${extensionsHref(pkg, c)}" title="extensions functions on class ${c.name} from ${pkg.name}" target="classFrame"><I>${c.name}</I></A>
|
||||
<BR>""")
|
||||
}
|
||||
}
|
||||
println("""</TR>
|
||||
|
||||
+61
-67
@@ -12,27 +12,26 @@ import org.jetbrains.kotlin.model.extensionFunctions
|
||||
|
||||
class PackageSummaryTemplate(val model: KModel, pkg: KPackage) : PackageTemplateSupport(pkg) {
|
||||
override fun render() {
|
||||
// TODO could really do with templates in multi-line strings :)
|
||||
println("""<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
|
||||
<!--NewPage-->
|
||||
<HTML>
|
||||
<HEAD>""")
|
||||
println("""<!-- Generated by kdoc (${model.version}) on ${Date()} -->""")
|
||||
println("""<META http-equiv="Content-Type" content="text/html; charset=UTF-8">
|
||||
<TITLE>""")
|
||||
println("""${pkg.name} (${model.title})""")
|
||||
println("""</TITLE>
|
||||
<HEAD>
|
||||
<!-- Generated by kdoc (${model.version}) on ${Date()} -->
|
||||
<META http-equiv="Content-Type" content="text/html; charset=UTF-8">
|
||||
<TITLE>
|
||||
${pkg.name} (${model.title})
|
||||
</TITLE>
|
||||
|
||||
<META NAME="date" CONTENT="2012-01-09">
|
||||
<META NAME="date" CONTENT="2012-01-09">""")
|
||||
println("""<LINK REL="stylesheet" TYPE="text/css" HREF="${pkg.nameAsRelativePath}stylesheet.css" TITLE="Style">""")
|
||||
println("""
|
||||
<META NAME="date" CONTENT="2012-01-09">
|
||||
<LINK REL="stylesheet" TYPE="text/css" HREF="${pkg.nameAsRelativePath}stylesheet.css" TITLE="Style">
|
||||
|
||||
<SCRIPT type="text/javascript">
|
||||
function windowTitle()
|
||||
{
|
||||
if (location.href.indexOf('is-external=true') == -1) {""")
|
||||
println(""" parent.document.title="${pkg.name} (${model.title})";""")
|
||||
println(""" }
|
||||
if (location.href.indexOf('is-external=true') == -1) {
|
||||
parent.document.title="${pkg.name} (${model.title})";
|
||||
}
|
||||
}
|
||||
</SCRIPT>
|
||||
<NOSCRIPT>
|
||||
@@ -52,18 +51,16 @@ function windowTitle()
|
||||
<TD COLSPAN=2 BGCOLOR="#EEEEFF" CLASS="NavBarCell1">
|
||||
<A NAME="navbar_top_firstrow"><!-- --></A>
|
||||
<TABLE BORDER="0" CELLPADDING="0" CELLSPACING="3" SUMMARY="">
|
||||
<TR ALIGN="center" VALIGN="top">""")
|
||||
|
||||
println("""<TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="${pkg.nameAsRelativePath}overview-summary.html"><FONT CLASS="NavBarFont1"><B>Overview</B></FONT></A> </TD>""")
|
||||
println("""<TD BGCOLOR="#FFFFFF" CLASS="NavBarCell1Rev"> <FONT CLASS="NavBarFont1Rev"><B>Package</B></FONT> </TD>
|
||||
<TR ALIGN="center" VALIGN="top">
|
||||
<TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="${pkg.nameAsRelativePath}overview-summary.html"><FONT CLASS="NavBarFont1"><B>Overview</B></FONT></A> </TD>
|
||||
<TD BGCOLOR="#FFFFFF" CLASS="NavBarCell1Rev"> <FONT CLASS="NavBarFont1Rev"><B>Package</B></FONT> </TD>
|
||||
<TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <FONT CLASS="NavBarFont1">Class</FONT> </TD>
|
||||
<TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="package-use.html"><FONT CLASS="NavBarFont1"><B>Use</B></FONT></A> </TD>
|
||||
<TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="package-tree.html"><FONT CLASS="NavBarFont1"><B>Tree</B></FONT></A> </TD>""")
|
||||
|
||||
println("""<TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="${pkg.nameAsRelativePath}deprecated-list.html"><FONT CLASS="NavBarFont1"><B>Deprecated</B></FONT></A> </TD>""")
|
||||
println("""<TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="${pkg.nameAsRelativePath}index-all.html"><FONT CLASS="NavBarFont1"><B>Index</B></FONT></A> </TD>""")
|
||||
println("""<TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="${pkg.nameAsRelativePath}help-doc.html"><FONT CLASS="NavBarFont1"><B>Help</B></FONT></A> </TD>""")
|
||||
println(""" </TR>
|
||||
<TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="package-tree.html"><FONT CLASS="NavBarFont1"><B>Tree</B></FONT></A> </TD>
|
||||
<TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="${pkg.nameAsRelativePath}deprecated-list.html"><FONT CLASS="NavBarFont1"><B>Deprecated</B></FONT></A> </TD>
|
||||
<TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="${pkg.nameAsRelativePath}index-all.html"><FONT CLASS="NavBarFont1"><B>Index</B></FONT></A> </TD>
|
||||
<TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="${pkg.nameAsRelativePath}help-doc.html"><FONT CLASS="NavBarFont1"><B>Help</B></FONT></A> </TD>
|
||||
</TR>
|
||||
</TABLE>
|
||||
</TD>
|
||||
<TD ALIGN="right" VALIGN="top" ROWSPAN=3><EM>
|
||||
@@ -74,19 +71,19 @@ function windowTitle()
|
||||
<TR>""")
|
||||
|
||||
printNextPrevPackages()
|
||||
println("""<TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2">""")
|
||||
println(""" <A HREF="${pkg.nameAsRelativePath}index.html?${pkg.nameAsPath}/package-summary.html" target="_top"><B>FRAMES</B></A> """)
|
||||
println(""" <A HREF="package-summary.html" target="_top"><B>NO FRAMES</B></A>
|
||||
println("""<TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2">
|
||||
<A HREF="${pkg.nameAsRelativePath}index.html?${pkg.nameAsPath}/package-summary.html" target="_top"><B>FRAMES</B></A>
|
||||
<A HREF="package-summary.html" target="_top"><B>NO FRAMES</B></A>
|
||||
<SCRIPT type="text/javascript">
|
||||
<!--
|
||||
if(window==top) {""")
|
||||
println(""" document.writeln('<A HREF="${pkg.nameAsRelativePath}allclasses-noframe.html"><B>All Classes</B></A>');""")
|
||||
println(""" }
|
||||
if(window==top) {
|
||||
document.writeln('<A HREF="${pkg.nameAsRelativePath}allclasses-noframe.html"><B>All Classes</B></A>');
|
||||
}
|
||||
//-->
|
||||
</SCRIPT>
|
||||
<NOSCRIPT>""")
|
||||
println(""" <A HREF="${pkg.nameAsRelativePath}allclasses-noframe.html"><B>All Classes</B></A>""")
|
||||
println("""</NOSCRIPT>
|
||||
<NOSCRIPT>
|
||||
<A HREF="${pkg.nameAsRelativePath}allclasses-noframe.html"><B>All Classes</B></A>
|
||||
</NOSCRIPT>
|
||||
|
||||
|
||||
</FONT></TD>
|
||||
@@ -104,11 +101,11 @@ function windowTitle()
|
||||
println("""<A HREF="$url?is-external=true" title="class or interface in ${a.packageName}">@${a.simpleName}</A>""")
|
||||
}
|
||||
}
|
||||
println("""</FONT><H2>""")
|
||||
println("""Package ${pkg.name}""")
|
||||
println("""</H2>""")
|
||||
println(pkg.description)
|
||||
println("""<P>
|
||||
println("""</FONT><H2>
|
||||
Package ${pkg.name}
|
||||
</H2>
|
||||
${pkg.description}
|
||||
<P>
|
||||
<B>See:</B>
|
||||
<BR>
|
||||
<A HREF="#package_description"><B>Description</B></A>
|
||||
@@ -124,16 +121,14 @@ function windowTitle()
|
||||
printFunctions()
|
||||
printExtensionFunctions()
|
||||
|
||||
println("""<A NAME="package_description"><!-- --></A><H2>""")
|
||||
println("""Package ${pkg.name} Description""")
|
||||
println("""</H2>
|
||||
println("""<A NAME="package_description"><!-- --></A><H2>
|
||||
Package ${pkg.name} Description
|
||||
</H2>
|
||||
|
||||
<P>""")
|
||||
<P>
|
||||
${pkg.detailedDescription}
|
||||
|
||||
println(pkg.detailedDescription)
|
||||
println("""
|
||||
|
||||
<h2>Contents</h2>
|
||||
<h2>Contents</h2>
|
||||
|
||||
""")
|
||||
|
||||
@@ -142,8 +137,8 @@ function windowTitle()
|
||||
val group = e?.getKey() ?: "Other"
|
||||
val list = e?.getValue()
|
||||
if (list != null) {
|
||||
println(""" <h3>$group</h3>""")
|
||||
println("""
|
||||
println(""" <h3>$group</h3>
|
||||
|
||||
<ul>""")
|
||||
for (c in list) {
|
||||
println(""" <li><A HREF="${pkg.nameAsRelativePath}${c.nameAsPath}.html" title="class in ${pkg.name}"><CODE>${c.simpleName}</CODE></A>""")
|
||||
@@ -193,9 +188,9 @@ function windowTitle()
|
||||
|
||||
printNextPrevPackages()
|
||||
|
||||
println("""<TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2">""")
|
||||
println(""") <A HREF="${pkg.nameAsRelativePath}index.html?${pkg.nameAsPath}/package-summary.html" target="_top"><B>FRAMES</B></A> """)
|
||||
println(""" <A HREF="package-summary.html" target="_top"><B>NO FRAMES</B></A>
|
||||
println("""<TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2">
|
||||
) <A HREF="${pkg.nameAsRelativePath}index.html?${pkg.nameAsPath}/package-summary.html" target="_top"><B>FRAMES</B></A>
|
||||
<A HREF="package-summary.html" target="_top"><B>NO FRAMES</B></A>
|
||||
<SCRIPT type="text/javascript">
|
||||
<!--
|
||||
if(window==top) {
|
||||
@@ -226,16 +221,15 @@ Copyright © 2010-2012. All Rights Reserved.
|
||||
if (! classes.isEmpty()) {
|
||||
print("""<TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY="">
|
||||
<TR BGCOLOR="#CCCCFF" CLASS="TableHeadingColor">
|
||||
<TH ALIGN="left" COLSPAN="2"><FONT SIZE="+2">""")
|
||||
|
||||
println("""<B>$description Summary</B></FONT></TH>""")
|
||||
println("""</TR>""")
|
||||
<TH ALIGN="left" COLSPAN="2"><FONT SIZE="+2">
|
||||
<B>$description Summary</B></FONT></TH>
|
||||
</TR>""")
|
||||
|
||||
for (c in classes) {
|
||||
println("""<TR BGCOLOR="white" CLASS="TableRowColor">""")
|
||||
println("""<TD WIDTH="15%"><B><A HREF="${pkg.nameAsRelativePath}${c.nameAsPath}.html" title="$kind in ${pkg.name}">${c.simpleName}</A></B></TD>""")
|
||||
println("""<TD>${c.description}</TD>""")
|
||||
println("""</TR>""")
|
||||
println("""<TR BGCOLOR="white" CLASS="TableRowColor">
|
||||
<TD WIDTH="15%"><B><A HREF="${pkg.nameAsRelativePath}${c.nameAsPath}.html" title="$kind in ${pkg.name}">${c.simpleName}</A></B></TD>
|
||||
<TD>${c.description}</TD>
|
||||
</TR>""")
|
||||
}
|
||||
println("""</TABLE>
|
||||
|
||||
@@ -255,10 +249,10 @@ Copyright © 2010-2012. All Rights Reserved.
|
||||
</TR>""")
|
||||
|
||||
for (f in functions) {
|
||||
println("""<TR BGCOLOR="white" CLASS="TableRowColor">""")
|
||||
println("""<TD WIDTH="15%"><B><A HREF="${href(f)}" title="function in ${pkg.name}">${f.name}</A></B></TD>""")
|
||||
println("""<TD>${f.description}</TD>""")
|
||||
println("""</TR>""")
|
||||
println("""<TR BGCOLOR="white" CLASS="TableRowColor">
|
||||
<TD WIDTH="15%"><B><A HREF="${href(f)}" title="function in ${pkg.name}">${f.name}</A></B></TD>
|
||||
<TD>${f.description}</TD>
|
||||
</TR>""")
|
||||
}
|
||||
println("""</TABLE>
|
||||
|
||||
@@ -280,17 +274,17 @@ Copyright © 2010-2012. All Rights Reserved.
|
||||
for (e in map.entrySet()) {
|
||||
val c = e?.getKey()
|
||||
if (c != null) {
|
||||
println("""<TR BGCOLOR="white" CLASS="TableRowColor">""")
|
||||
println("""<TD WIDTH="15%"><B><A HREF="${pkg.nameAsRelativePath}${c.name}.html" title="extensions on ${pkg.name}">${c.name}</A></B></TD>""")
|
||||
print("""<TD>""")
|
||||
println("""<TR BGCOLOR="white" CLASS="TableRowColor">
|
||||
<TD WIDTH="15%"><B><A HREF="${pkg.nameAsRelativePath}${c.name}.html" title="extensions on ${pkg.name}">${c.name}</A></B></TD>
|
||||
<TD>""")
|
||||
val list = e?.getValue()
|
||||
if (list != null) {
|
||||
for (f in list) {
|
||||
println("""<A HREF="${extensionsHref(pkg, c, f)}">${f.name}<A> """)
|
||||
}
|
||||
}
|
||||
println("""</TD>""")
|
||||
println("""</TR>""")
|
||||
println("""</TD>
|
||||
</TR>""")
|
||||
}
|
||||
}
|
||||
println("""</TABLE>
|
||||
|
||||
Reference in New Issue
Block a user