From 83996f7951920d161de4143764323f06b235685f Mon Sep 17 00:00:00 2001 From: Mark DePristo Date: Sun, 24 Jul 2011 18:14:21 -0400 Subject: [PATCH] Enumerated types are working. --- .../sting/gatk/phonehome/GATKRunReport.java | 4 ++ .../help/GenericDocumentationHandler.java | 6 +- settings/helpTemplates/generic.template.html | 6 +- settings/helpTemplates/style.css | 70 +++++++------------ 4 files changed, 35 insertions(+), 51 deletions(-) diff --git a/public/java/src/org/broadinstitute/sting/gatk/phonehome/GATKRunReport.java b/public/java/src/org/broadinstitute/sting/gatk/phonehome/GATKRunReport.java index 69c0b3e0a..acee1a6a3 100644 --- a/public/java/src/org/broadinstitute/sting/gatk/phonehome/GATKRunReport.java +++ b/public/java/src/org/broadinstitute/sting/gatk/phonehome/GATKRunReport.java @@ -154,9 +154,13 @@ public class GATKRunReport { private long nReads; public enum PhoneHomeOption { + /** Disable phone home */ NO_ET, + /** Standard option. Writes to local repository if it can be found, or S3 otherwise */ STANDARD, + /** Force output to STDOUT. For debugging only */ STDOUT, + /** Force output to S3. For debugging only */ AWS_S3 // todo -- remove me -- really just for testing purposes } diff --git a/public/java/src/org/broadinstitute/sting/utils/help/GenericDocumentationHandler.java b/public/java/src/org/broadinstitute/sting/utils/help/GenericDocumentationHandler.java index ff54a115c..5fd6f27d9 100644 --- a/public/java/src/org/broadinstitute/sting/utils/help/GenericDocumentationHandler.java +++ b/public/java/src/org/broadinstitute/sting/utils/help/GenericDocumentationHandler.java @@ -221,10 +221,10 @@ public class GenericDocumentationHandler extends DocumentedGATKFeatureHandler { protected Map docForArgument(FieldDoc fieldDoc, ArgumentSource source, ArgumentDefinition def) { Map root = new HashMap(); - root.put("name", def.fullName != null ? "--" + def.fullName : "-" + def.shortName); + root.put("name", def.shortName != null ? "-" + def.shortName : "--" + def.fullName ); - if ( def.fullName != null && def.shortName != null) - root.put("synonyms", def.fullName != null ? "--" + def.fullName : "-" + def.shortName); + if ( def.shortName != null && def.fullName != null ) + root.put("synonyms", "--" + def.fullName); root.put("required", def.required ? "yes" : "no"); root.put("type", def.argumentType.getSimpleName()); diff --git a/settings/helpTemplates/generic.template.html b/settings/helpTemplates/generic.template.html index cea7d0631..d2468214c 100644 --- a/settings/helpTemplates/generic.template.html +++ b/settings/helpTemplates/generic.template.html @@ -2,11 +2,10 @@ <#macro argumentlist name myargs> <#if myargs?size != 0> - ${name} + ${name} <#list myargs as arg> ${arg.name} - ${arg.synonyms!""} ${arg.type} ${arg.summary} @@ -22,7 +21,7 @@ (<#if arg.attributes??>${arg.attributes} ${arg.type}) ${arg.summary}. ${arg.fulltext}
<#if arg.options??> -

The ${arg.name} argument can have one of the following values:

+

The ${arg.name} argument is an enumerated type (${arg.type}), which can have one of the following values:

<#list arg.options as option>
${option.name} @@ -70,7 +69,6 @@ Name - Synonyms Type Summary diff --git a/settings/helpTemplates/style.css b/settings/helpTemplates/style.css index 18c9fe521..79f409f55 100644 --- a/settings/helpTemplates/style.css +++ b/settings/helpTemplates/style.css @@ -19,47 +19,12 @@ p.version, p.see-also font-size: 8pt; } -dl.enum -{ - margin: 0em 0; - padding: 0; -} - -.enum dt -{ - position: relative; - left: 0; - top: 1.1em; - width: 5em; - font-weight: bold; -} - -.enum dd -{ - border-left: 1px solid #000; - margin: 0 0 0 6em; - padding: 0 0 .5em .5em; -} - -/* -a -{ - color: #546188; - text-decoration: none; -} - -a:visited -{ - color: #546188; -} -*/ - h1, h2, h3 { font-family: Corbel, Arial, Helvetica, Sans-Serif; font-weight: bold; text-align: left; - color: #bac8da; + color: #669; } h1 @@ -74,16 +39,27 @@ h3 font-weight: normal; } -table.indextable tr td -{ - margin-right: 1em; -} - -/* - Blue Dream - Written by Teylor Feliz http://www.admixweb.com +/* + * enum DT layout */ +dl { + border: 1px solid #ccc; +} + +dt { + font-weight: bold; + text-decoration: underline; +} + +dd { + margin: 0; + padding: 0 0 0.5em 0; +} + +/* + * clean table layouts +*/ #hor-minimalist-b { font-family: "Lucida Sans Unicode", "Lucida Grande", Sans-Serif; @@ -111,4 +87,10 @@ table.indextable tr td #hor-minimalist-b tbody tr:hover td { color: #009; +} + +th#row-divider +{ + font-weight: bolder; + font-size: larger; } \ No newline at end of file