Only show extra walker help if the user didn't specify a walker or specified

an invalid walker.


git-svn-id: file:///humgen/gsa-scr1/gsa-engineering/svn_contents/trunk@2309 348d0f76-0448-11de-a6fe-93d51630548a
This commit is contained in:
hanna 2009-12-10 16:43:06 +00:00
parent e6f541fdca
commit 74b8055b6a
1 changed files with 15 additions and 4 deletions

View File

@ -109,24 +109,35 @@ public class CommandLineGATK extends CommandLineExecutable {
/**
* Retrieves additional information about GATK walkers.
* TODO: This functionality is very similar to that employed by the HelpFormatter. Generalize
* the code in HelpFormatter and supply it as a helper to this method.
*
* @return A string summarizing the walkers available in this distribution.
*/
private String getAdditionalHelp() {
String additionalHelp = "";
//HelpFormatter.LINE_WIDTH;
// If no analysis name is present, fill in extra help on the walkers.
String analysisName = getAnalysisName();
if(analysisName == null || !GATKEngine.getWalkerManager().exists(getAnalysisName()))
additionalHelp = getWalkerHelp();
return additionalHelp;
}
/**
* Load in additional help information about all available walkers.
* @return A string representation of the additional help.
*/
private String getWalkerHelp() {
final int PACKAGE_INDENT = 1;
final int WALKER_INDENT = 3;
final String FIELD_SEPARATOR = " | ";
final String FIELD_SEPARATOR = " ";
// Construct a help string to output available walkers.
StringBuilder additionalHelp = new StringBuilder();
Formatter formatter = new Formatter(additionalHelp);
formatter.format("Available analyses:%n%n");
formatter.format("Available analyses:%n");
// Get the list of walker names from the walker manager.
WalkerManager walkerManager = GATKEngine.getWalkerManager();