Implemented see also and version header
This commit is contained in:
parent
b8db0510e0
commit
c6af4efcdc
|
|
@ -479,7 +479,7 @@
|
|||
docletpathref="doclet.classpath"
|
||||
classpathref="external.dependencies"
|
||||
classpath="${java.classes}"
|
||||
additionalparam="-private -build-timestamp "${build.timestamp}" -absolute-version ${build.version} -out ${basedir}/${resource.path} -quiet -J-Xdebug -J-Xrunjdwp:transport=dt_socket,server=y,suspend=n,address=5005">
|
||||
additionalparam="-private -build-timestamp "${build.timestamp}" -absolute-version ${build.version} -quiet -J-Xdebug -J-Xrunjdwp:transport=dt_socket,server=y,suspend=n,address=5005">
|
||||
<sourcefiles>
|
||||
<union>
|
||||
<fileset refid="all.java.source.files"/>
|
||||
|
|
|
|||
|
|
@ -48,18 +48,21 @@ public class GATKDoclet extends ResourceBundleExtractorDoclet {
|
|||
|
||||
public static class DocWorkUnit implements Comparable<DocWorkUnit> {
|
||||
// known at the start
|
||||
String name, filename, group;
|
||||
DocumentedGATKFeatureHandler handler;
|
||||
ClassDoc classDoc;
|
||||
Class clazz;
|
||||
DocumentedGATKFeature annotation;
|
||||
final String name, filename, group;
|
||||
final DocumentedGATKFeatureHandler handler;
|
||||
final ClassDoc classDoc;
|
||||
final Class clazz;
|
||||
final DocumentedGATKFeature annotation;
|
||||
final String buildTimestamp, absoluteVersion;
|
||||
|
||||
// set by the handler
|
||||
String summary;
|
||||
Map<String, Object> forTemplate;
|
||||
|
||||
public DocWorkUnit(DocumentedGATKFeature annotation, String name, String filename, String group,
|
||||
DocumentedGATKFeatureHandler handler, ClassDoc classDoc, Class clazz) {
|
||||
public DocWorkUnit(String name, String filename, String group,
|
||||
DocumentedGATKFeature annotation, DocumentedGATKFeatureHandler handler,
|
||||
ClassDoc classDoc, Class clazz,
|
||||
String buildTimestamp, String absoluteVersion) {
|
||||
this.annotation = annotation;
|
||||
this.name = name;
|
||||
this.filename = filename;
|
||||
|
|
@ -67,6 +70,8 @@ public class GATKDoclet extends ResourceBundleExtractorDoclet {
|
|||
this.handler = handler;
|
||||
this.classDoc = classDoc;
|
||||
this.clazz = clazz;
|
||||
this.buildTimestamp = buildTimestamp;
|
||||
this.absoluteVersion = absoluteVersion;
|
||||
}
|
||||
|
||||
public void setHandlerContent(String summary, Map<String, Object> forTemplate) {
|
||||
|
|
@ -116,9 +121,10 @@ public class GATKDoclet extends ResourceBundleExtractorDoclet {
|
|||
DocumentedGATKFeatureHandler handler = createHandler(doc, feature);
|
||||
if ( handler != null && handler.shouldBeProcessed(doc) ) {
|
||||
String filename = handler.getDestinationFilename(doc);
|
||||
DocWorkUnit unit = new DocWorkUnit(feature,
|
||||
doc.name(), filename, feature.groupName(),
|
||||
handler, doc, clazz );
|
||||
DocWorkUnit unit = new DocWorkUnit(doc.name(),
|
||||
filename, feature.groupName(),
|
||||
feature, handler, doc, clazz,
|
||||
buildTimestamp, absoluteVersion);
|
||||
m.add(unit);
|
||||
}
|
||||
}
|
||||
|
|
@ -130,6 +136,7 @@ public class GATKDoclet extends ResourceBundleExtractorDoclet {
|
|||
protected void processDocs(RootDoc rootDoc, PrintStream ignore) {
|
||||
// setup the global access to the root
|
||||
this.rootDoc = rootDoc;
|
||||
super.loadData(rootDoc, false);
|
||||
|
||||
try {
|
||||
// basic setup
|
||||
|
|
@ -239,6 +246,8 @@ public class GATKDoclet extends ResourceBundleExtractorDoclet {
|
|||
|
||||
root.put("data", data);
|
||||
root.put("groups", groups);
|
||||
root.put("timestamp", buildTimestamp);
|
||||
root.put("version", absoluteVersion);
|
||||
|
||||
return root;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -88,6 +88,8 @@ public class GenericDocumentationHandler extends DocumentedGATKFeatureHandler {
|
|||
summaryBuilder.append(tag.text());
|
||||
root.put("summary", summaryBuilder.toString());
|
||||
root.put("description", classdoc.commentText());
|
||||
root.put("timestamp", toProcess.buildTimestamp);
|
||||
root.put("version", toProcess.absoluteVersion);
|
||||
|
||||
for(Tag tag: classdoc.tags()) {
|
||||
root.put(tag.name(), tag.text());
|
||||
|
|
|
|||
|
|
@ -4,3 +4,12 @@
|
|||
<link href="style.css" type="text/css" rel="stylesheet">
|
||||
</head>
|
||||
</#macro>
|
||||
|
||||
<#macro headerInfo>
|
||||
<p class="see-also">See also <a href="index.html">Main index</a> | <a href="http://www.broadinstitute.org/gsa/wiki/index.php/The_Genome_Analysis_Toolkit">GATK wiki</a> | <a href="http://getsatisfaction.com/gsa">GATK support forum</a></p>
|
||||
<p class="version">GATK version ${version} built at ${timestamp}.</p>
|
||||
</#macro>
|
||||
|
||||
<#macro footerInfo>
|
||||
</#macro>
|
||||
|
||||
|
|
|
|||
|
|
@ -25,9 +25,12 @@
|
|||
<@makeHeader title="GATK documentation index"/>
|
||||
<body>
|
||||
<h1>GATK documentation index</h1>
|
||||
<@headerInfo />
|
||||
<#list groups as group>
|
||||
<@emitGroup group=group/>
|
||||
</#list>
|
||||
|
||||
<@footerInfo />
|
||||
</body>
|
||||
</html>
|
||||
|
||||
|
|
|
|||
|
|
@ -45,7 +45,8 @@
|
|||
<html>
|
||||
<@makeHeader title="${name} documentation"/>
|
||||
<body>
|
||||
<h1>${name}<h1>
|
||||
<h1>${name}</h1>
|
||||
<@headerInfo />
|
||||
<h2>Brief summary</h2>
|
||||
${summary}
|
||||
<#if author??>
|
||||
|
|
@ -104,5 +105,7 @@
|
|||
<@argumentDetails arg=arg/>
|
||||
</#list>
|
||||
</#if>
|
||||
|
||||
<@footerInfo />
|
||||
</body>
|
||||
</html>
|
||||
|
|
|
|||
|
|
@ -14,6 +14,11 @@ p, ul, ol, dl, dt, dd, td
|
|||
font-size: 12pt;
|
||||
}
|
||||
|
||||
p.version, p.see-also
|
||||
{
|
||||
font-size: 6pt;
|
||||
}
|
||||
|
||||
dt
|
||||
{
|
||||
padding-bottom: 6pt;
|
||||
|
|
@ -35,7 +40,7 @@ a:visited
|
|||
h1, h2, h3
|
||||
{
|
||||
font-family: Corbel, Arial, Helvetica, Sans-Serif;
|
||||
font-weight: lighter;
|
||||
font-weight: bold;
|
||||
text-align: left;
|
||||
color: #bac8da;
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in New Issue