Hidden variables are hidden by default. Settable by command line option
DiffObjectsWalker test arguments removed. Minor refactoring of GATKDoclet
This commit is contained in:
parent
1c1f1da349
commit
c43b5981f2
|
|
@ -182,21 +182,6 @@ public class DiffObjectsWalker extends RodWalker<Integer, Integer> {
|
||||||
@Argument(fullName="showItemizedDifferences", shortName="SID", doc="Should we enumerate all differences between the files?", required=false)
|
@Argument(fullName="showItemizedDifferences", shortName="SID", doc="Should we enumerate all differences between the files?", required=false)
|
||||||
boolean showItemizedDifferences = false;
|
boolean showItemizedDifferences = false;
|
||||||
|
|
||||||
@Hidden
|
|
||||||
@Argument(fullName="testEnum", doc="X", required=false)
|
|
||||||
TestEnum testEnum = TestEnum.ONE;
|
|
||||||
|
|
||||||
@Deprecated
|
|
||||||
@Argument(fullName="testDepreciates", doc="Y", required=false)
|
|
||||||
int dontUseMe = 1;
|
|
||||||
|
|
||||||
public enum TestEnum {
|
|
||||||
/** Docs for ONE */
|
|
||||||
ONE,
|
|
||||||
/** Docs for TWO */
|
|
||||||
TWO
|
|
||||||
};
|
|
||||||
|
|
||||||
final DiffEngine diffEngine = new DiffEngine();
|
final DiffEngine diffEngine = new DiffEngine();
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
|
|
|
||||||
|
|
@ -44,6 +44,10 @@ public abstract class DocumentedGATKFeatureHandler {
|
||||||
this.doclet = doclet;
|
this.doclet = doclet;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public GATKDoclet getDoclet() {
|
||||||
|
return doclet;
|
||||||
|
}
|
||||||
|
|
||||||
public boolean shouldBeProcessed(ClassDoc doc) { return true; }
|
public boolean shouldBeProcessed(ClassDoc doc) { return true; }
|
||||||
|
|
||||||
public String getDestinationFilename(ClassDoc doc) {
|
public String getDestinationFilename(ClassDoc doc) {
|
||||||
|
|
|
||||||
|
|
@ -45,6 +45,7 @@ public class GATKDoclet {
|
||||||
final protected static File DESTINATION_DIR = new File("gatkdocs");
|
final protected static File DESTINATION_DIR = new File("gatkdocs");
|
||||||
final protected static Logger logger = Logger.getLogger(GATKDoclet.class);
|
final protected static Logger logger = Logger.getLogger(GATKDoclet.class);
|
||||||
protected static String buildTimestamp = null, absoluteVersion = null;
|
protected static String buildTimestamp = null, absoluteVersion = null;
|
||||||
|
protected static boolean showHiddenFeatures = false;
|
||||||
|
|
||||||
RootDoc rootDoc;
|
RootDoc rootDoc;
|
||||||
|
|
||||||
|
|
@ -61,6 +62,8 @@ public class GATKDoclet {
|
||||||
buildTimestamp = options[1];
|
buildTimestamp = options[1];
|
||||||
if (options[0].equals("-absolute-version"))
|
if (options[0].equals("-absolute-version"))
|
||||||
absoluteVersion = options[1];
|
absoluteVersion = options[1];
|
||||||
|
if (options[0].equals("-include-hidden"))
|
||||||
|
showHiddenFeatures = true;
|
||||||
}
|
}
|
||||||
|
|
||||||
GATKDoclet doclet = new GATKDoclet();
|
GATKDoclet doclet = new GATKDoclet();
|
||||||
|
|
@ -74,12 +77,16 @@ public class GATKDoclet {
|
||||||
* @return Number of potential parameters; 0 if not supported.
|
* @return Number of potential parameters; 0 if not supported.
|
||||||
*/
|
*/
|
||||||
public static int optionLength(String option) {
|
public static int optionLength(String option) {
|
||||||
if(option.equals("-build-timestamp") || option.equals("-absolute-version") ) {
|
if(option.equals("-build-timestamp") || option.equals("-absolute-version") || option.equals("-include-hidden")) {
|
||||||
return 2;
|
return 2;
|
||||||
}
|
}
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public boolean showHiddenFeatures() {
|
||||||
|
return showHiddenFeatures;
|
||||||
|
}
|
||||||
|
|
||||||
public Set<GATKDocWorkUnit> workUnits() {
|
public Set<GATKDocWorkUnit> workUnits() {
|
||||||
TreeSet<GATKDocWorkUnit> m = new TreeSet<GATKDocWorkUnit>();
|
TreeSet<GATKDocWorkUnit> m = new TreeSet<GATKDocWorkUnit>();
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -113,13 +113,17 @@ public class GenericDocumentationHandler extends DocumentedGATKFeatureHandler {
|
||||||
ArgumentDefinition argDef = argumentSource.createArgumentDefinitions().get(0);
|
ArgumentDefinition argDef = argumentSource.createArgumentDefinitions().get(0);
|
||||||
FieldDoc fieldDoc = getFieldDoc(classdoc, argumentSource.field.getName());
|
FieldDoc fieldDoc = getFieldDoc(classdoc, argumentSource.field.getName());
|
||||||
Map<String, Object> argBindings = docForArgument(fieldDoc, argumentSource, argDef); // todo -- why can you have multiple ones?
|
Map<String, Object> argBindings = docForArgument(fieldDoc, argumentSource, argDef); // todo -- why can you have multiple ones?
|
||||||
String kind = "optional";
|
if ( ! argumentSource.isHidden() || getDoclet().showHiddenFeatures() ) {
|
||||||
if ( argumentSource.isRequired() ) kind = "required";
|
System.out.printf("Processing %s%n", argumentSource);
|
||||||
else if ( argumentSource.isHidden() ) kind = "hidden";
|
String kind = "optional";
|
||||||
else if ( argumentSource.isDeprecated() ) kind = "depreciated";
|
if ( argumentSource.isRequired() ) kind = "required";
|
||||||
args.get(kind).add(argBindings);
|
else if ( argumentSource.isHidden() ) kind = "hidden";
|
||||||
args.get("all").add(argBindings);
|
else if ( argumentSource.isDeprecated() ) kind = "depreciated";
|
||||||
System.out.printf("Processing %s%n", argumentSource);
|
args.get(kind).add(argBindings);
|
||||||
|
args.get("all").add(argBindings);
|
||||||
|
} else {
|
||||||
|
System.out.printf("Skipping hidden feature %s%n", argumentSource);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
} catch ( ClassNotFoundException e ) {
|
} catch ( ClassNotFoundException e ) {
|
||||||
throw new RuntimeException(e);
|
throw new RuntimeException(e);
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue