-
Notifications
You must be signed in to change notification settings - Fork 597
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
This reverts commit a19c562.
- Loading branch information
Showing
9 changed files
with
294 additions
and
306 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
84 changes: 41 additions & 43 deletions
84
src/main/java/org/broadinstitute/hellbender/utils/help/GATKDocWorkUnit.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,43 +1,41 @@ | ||
package org.broadinstitute.hellbender.utils.help; | ||
|
||
import org.broadinstitute.barclay.help.DocWorkUnit; | ||
import org.broadinstitute.barclay.help.DocWorkUnitHandler; | ||
import org.broadinstitute.barclay.help.DocumentedFeature; | ||
|
||
import org.broadinstitute.hellbender.utils.runtime.RuntimeUtils; | ||
|
||
import javax.lang.model.element.Element; | ||
|
||
/** | ||
* Custom DocWorkUnit used for generating GATK help/documentation. Overrides the defaults to provide tool | ||
* names that are annotated with a " (Picard)" suffix for Picard tools. | ||
* | ||
* NOTE: Methods in this class are intended to be called by Gradle/Javadoc only, and should not be called | ||
* by methods that are used by the GATK runtime. This class has a dependency on com.sun.javadoc classes, | ||
* which may not be present since they're not provided as part of the normal GATK runtime classpath. | ||
*/ | ||
@SuppressWarnings("removal") | ||
public class GATKDocWorkUnit extends DocWorkUnit { | ||
|
||
public GATKDocWorkUnit( | ||
final DocWorkUnitHandler workUnitHandler, | ||
final Element classElement, | ||
final Class<?> clazz, | ||
final DocumentedFeature documentedFeatureAnnotation) { | ||
super(workUnitHandler, classElement, clazz, documentedFeatureAnnotation); | ||
} | ||
|
||
@Override | ||
public String getName() { | ||
// Override getName to return a display name that annotates Picard tool names with " (Picard)" | ||
return RuntimeUtils.toolDisplayName(getClazz()); | ||
} | ||
|
||
/** | ||
* Sort in order of the name of this WorkUnit | ||
*/ | ||
@Override | ||
public int compareTo(DocWorkUnit other) { | ||
return this.getName().compareTo(other.getName()); | ||
} | ||
} | ||
//package org.broadinstitute.hellbender.utils.help; | ||
// | ||
//import org.broadinstitute.barclay.help.DocWorkUnit; | ||
//import org.broadinstitute.barclay.help.DocWorkUnitHandler; | ||
//import org.broadinstitute.barclay.help.DocumentedFeature; | ||
// | ||
//import org.broadinstitute.hellbender.utils.runtime.RuntimeUtils; | ||
// | ||
///** | ||
// * Custom DocWorkUnit used for generating GATK help/documentation. Overrides the defaults to provide tool | ||
// * names that are annotated with a " (Picard)" suffix for Picard tools. | ||
// * | ||
// * NOTE: Methods in this class are intended to be called by Gradle/Javadoc only, and should not be called | ||
// * by methods that are used by the GATK runtime. This class has a dependency on com.sun.javadoc classes, | ||
// * which may not be present since they're not provided as part of the normal GATK runtime classpath. | ||
// */ | ||
//@SuppressWarnings("removal") | ||
//public class GATKDocWorkUnit extends DocWorkUnit { | ||
// | ||
// public GATKDocWorkUnit( | ||
// final DocWorkUnitHandler workUnitHandler, | ||
// final DocumentedFeature documentedFeatureAnnotation, | ||
// final com.sun.javadoc.ClassDoc classDoc, | ||
// final Class<?> clazz) { | ||
// super(workUnitHandler, documentedFeatureAnnotation, classDoc, clazz); | ||
// } | ||
// | ||
// @Override | ||
// public String getName() { | ||
// // Override getName to return a display name that annotates Picard tool names with " (Picard)" | ||
// return RuntimeUtils.toolDisplayName(getClazz()); | ||
// } | ||
// | ||
// /** | ||
// * Sort in order of the name of this WorkUnit | ||
// */ | ||
// @Override | ||
// public int compareTo(DocWorkUnit other) { | ||
// return this.getName().compareTo(other.getName()); | ||
// } | ||
//} |
34 changes: 17 additions & 17 deletions
34
src/main/java/org/broadinstitute/hellbender/utils/help/GATKGSONWorkUnit.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,17 +1,17 @@ | ||
package org.broadinstitute.hellbender.utils.help; | ||
|
||
import org.broadinstitute.barclay.help.GSONWorkUnit; | ||
|
||
/** | ||
* Class representing a GSONWorkUnit for GATK work units. | ||
* | ||
* Adds "walkertype" to the base gson object created by Barclay. | ||
*/ | ||
public class GATKGSONWorkUnit extends GSONWorkUnit { | ||
|
||
private String walkerType; | ||
|
||
public void setWalkerType(final String walkerType){ | ||
this.walkerType = walkerType; | ||
} | ||
} | ||
//package org.broadinstitute.hellbender.utils.help; | ||
// | ||
//import org.broadinstitute.barclay.help.GSONWorkUnit; | ||
// | ||
///** | ||
// * Class representing a GSONWorkUnit for GATK work units. | ||
// * | ||
// * Adds "walkertype" to the base gson object created by Barclay. | ||
// */ | ||
//public class GATKGSONWorkUnit extends GSONWorkUnit { | ||
// | ||
// private String walkerType; | ||
// | ||
// public void setWalkerType(final String walkerType){ | ||
// this.walkerType = walkerType; | ||
// } | ||
//} |
122 changes: 61 additions & 61 deletions
122
src/main/java/org/broadinstitute/hellbender/utils/help/GATKHelpDocWorkUnitHandler.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,61 +1,61 @@ | ||
package org.broadinstitute.hellbender.utils.help; | ||
|
||
import org.broadinstitute.barclay.argparser.CommandLineProgramProperties; | ||
import org.broadinstitute.barclay.help.DefaultDocWorkUnitHandler; | ||
import org.broadinstitute.barclay.help.DocWorkUnit; | ||
|
||
import org.broadinstitute.barclay.help.HelpDoclet; | ||
|
||
/** | ||
* The GATK Documentation work unit handler class that is the companion to GATKHelpDoclet. | ||
* | ||
* NOTE: Methods in this class are intended to be called by Gradle/Javadoc only, and should not be called | ||
* by methods that are used by the GATK runtime, as this class assumes a dependency on com.sun.javadoc classes | ||
* which may not be present. | ||
*/ | ||
public class GATKHelpDocWorkUnitHandler extends DefaultDocWorkUnitHandler { | ||
|
||
private final static String GATK_JAVADOC_TAG_PREFIX = "GATK"; // prefix for custom javadoc tags used by GATK | ||
|
||
private final static String GATK_FREEMARKER_TEMPLATE_NAME = "generic.template.html"; | ||
|
||
public GATKHelpDocWorkUnitHandler(final HelpDoclet doclet) { | ||
super(doclet); | ||
} | ||
/** | ||
* @return Prefix for custom GATK tags that should be lifted from the javadoc and stored in the | ||
* FreeMarker map. These will be available in the template returned by {@link #getTemplateName}. | ||
*/ | ||
@Override | ||
protected String getTagFilterPrefix() { return GATK_JAVADOC_TAG_PREFIX; } | ||
|
||
/** | ||
* @param workUnit the classdoc object being processed | ||
* @return the name of a the freemarker template to be used for the class being documented. | ||
* Must reside in the folder passed to the Barclay Doclet via the "-settings-dir" parameter to | ||
* Javadoc. | ||
*/ | ||
@Override | ||
public String getTemplateName(final DocWorkUnit workUnit) { return GATK_FREEMARKER_TEMPLATE_NAME; } | ||
|
||
|
||
/** | ||
* Add any custom freemarker bindings discovered via custom javadoc tags. Subclasses can override this to | ||
* provide additional custom bindings. | ||
* | ||
* @param currentWorkUnit the work unit for the feature being documented | ||
*/ | ||
@Override | ||
protected void addCustomBindings(final DocWorkUnit currentWorkUnit) { | ||
super.addCustomBindings(currentWorkUnit); | ||
|
||
// Picard tools use the summary line for the long overview section, so extract that | ||
// from Picard tools only, and put it in the freemarker map. | ||
Class<?> toolClass = currentWorkUnit.getClazz(); | ||
if (picard.cmdline.CommandLineProgram.class.isAssignableFrom(toolClass)) { | ||
final CommandLineProgramProperties clpProperties = currentWorkUnit.getCommandLineProperties(); | ||
currentWorkUnit.setProperty("picardsummary", clpProperties.summary()); | ||
} | ||
} | ||
|
||
} | ||
//package org.broadinstitute.hellbender.utils.help; | ||
// | ||
//import org.broadinstitute.barclay.argparser.CommandLineProgramProperties; | ||
//import org.broadinstitute.barclay.help.DefaultDocWorkUnitHandler; | ||
//import org.broadinstitute.barclay.help.DocWorkUnit; | ||
// | ||
//import org.broadinstitute.barclay.help.HelpDoclet; | ||
// | ||
///** | ||
// * The GATK Documentation work unit handler class that is the companion to GATKHelpDoclet. | ||
// * | ||
// * NOTE: Methods in this class are intended to be called by Gradle/Javadoc only, and should not be called | ||
// * by methods that are used by the GATK runtime, as this class assumes a dependency on com.sun.javadoc classes | ||
// * which may not be present. | ||
// */ | ||
//public class GATKHelpDocWorkUnitHandler extends DefaultDocWorkUnitHandler { | ||
// | ||
// private final static String GATK_JAVADOC_TAG_PREFIX = "GATK"; // prefix for custom javadoc tags used by GATK | ||
// | ||
// private final static String GATK_FREEMARKER_TEMPLATE_NAME = "generic.template.html"; | ||
// | ||
// public GATKHelpDocWorkUnitHandler(final HelpDoclet doclet) { | ||
// super(doclet); | ||
// } | ||
// /** | ||
// * @return Prefix for custom GATK tags that should be lifted from the javadoc and stored in the | ||
// * FreeMarker map. These will be available in the template returned by {@link #getTemplateName}. | ||
// */ | ||
// @Override | ||
// protected String getTagFilterPrefix() { return GATK_JAVADOC_TAG_PREFIX; } | ||
// | ||
// /** | ||
// * @param workUnit the classdoc object being processed | ||
// * @return the name of a the freemarker template to be used for the class being documented. | ||
// * Must reside in the folder passed to the Barclay Doclet via the "-settings-dir" parameter to | ||
// * Javadoc. | ||
// */ | ||
// @Override | ||
// public String getTemplateName(final DocWorkUnit workUnit) { return GATK_FREEMARKER_TEMPLATE_NAME; } | ||
// | ||
// | ||
// /** | ||
// * Add any custom freemarker bindings discovered via custom javadoc tags. Subclasses can override this to | ||
// * provide additional custom bindings. | ||
// * | ||
// * @param currentWorkUnit the work unit for the feature being documented | ||
// */ | ||
// @Override | ||
// protected void addCustomBindings(final DocWorkUnit currentWorkUnit) { | ||
// super.addCustomBindings(currentWorkUnit); | ||
// | ||
// // Picard tools use the summary line for the long overview section, so extract that | ||
// // from Picard tools only, and put it in the freemarker map. | ||
// Class<?> toolClass = currentWorkUnit.getClazz(); | ||
// if (picard.cmdline.CommandLineProgram.class.isAssignableFrom(toolClass)) { | ||
// final CommandLineProgramProperties clpProperties = currentWorkUnit.getCommandLineProperties(); | ||
// currentWorkUnit.setProperty("picardsummary", clpProperties.summary()); | ||
// } | ||
// } | ||
// | ||
//} |
Oops, something went wrong.