List of usage examples for org.apache.commons.cli2.util HelpFormatter setFooter
public void setFooter(String footer)
From source file:egat.cli.Main.java
protected static void printHelp(Group options) { HelpFormatter hf = new HelpFormatter(); hf.setShellCommand("egat"); hf.setGroup(options);//w w w . j a va 2s . c om hf.getFullUsageSettings().add(DisplaySetting.DISPLAY_GROUP_NAME); hf.getFullUsageSettings().remove(DisplaySetting.DISPLAY_GROUP_ARGUMENT); hf.getFullUsageSettings().remove(DisplaySetting.DISPLAY_GROUP_EXPANDED); hf.getFullUsageSettings().remove(DisplaySetting.DISPLAY_OPTIONAL_CHILD_GROUP); hf.setFooter("egat is developed by Patrick R. Jordan (prjordan@umich.edu)."); hf.print(); }
From source file:it.geosolutions.utils.db.BaseArgumentsManager.java
private void finishOptInitialization() { // ///////////////////////////////////////////////////////////////////// //// w w w.j a v a 2 s . c om // Help Formatter // // ///////////////////////////////////////////////////////////////////// final HelpFormatter cmdHlp = new HelpFormatter("| ", " ", " |", 75); cmdHlp.setShellCommand(getToolName()); cmdHlp.setHeader("Help"); cmdHlp.setFooter(new StringBuffer(getToolName() + " - GeoSolutions S.a.s (C) 2009-2013 - v ") .append(getVersion()).toString()); cmdHlp.setDivider("|-------------------------------------------------------------------------|"); // ///////////////////////////////////////////////////////////////////// // // Close Parser // // ///////////////////////////////////////////////////////////////////// optionsGroup = new GroupImpl(cmdOpts, "Options", "All the options", 1, cmdOpts.size()); cmdParser.setGroup(optionsGroup); cmdParser.setHelpOption(helpOpt); cmdParser.setHelpFormatter(cmdHlp); }
From source file:egat.cli.AbstractGameCommandHandler.java
protected void printHelp() { HelpFormatter hf = new HelpFormatter(); hf.setShellCommand("egat " + getCommandName()); hf.setGroup(getCommand().getChildren()); hf.getFullUsageSettings().add(DisplaySetting.DISPLAY_GROUP_NAME); hf.getFullUsageSettings().remove(DisplaySetting.DISPLAY_GROUP_ARGUMENT); hf.getFullUsageSettings().remove(DisplaySetting.DISPLAY_GROUP_EXPANDED); hf.getFullUsageSettings().remove(DisplaySetting.DISPLAY_OPTIONAL_CHILD_GROUP); hf.setFooter("egat is developed by Patrick R. Jordan (prjordan@umich.edu)."); hf.print();//from w ww . ja v a2 s . c om }
From source file:org.apache.mahout.common.CommandLineUtil.java
/** * Print the options supported by {@code GenericOptionsParser}. * In addition to the options supported by the job, passed in as the * group parameter.//from w w w. j a va 2 s.c o m * * @param group job-specific command-line options. */ public static void printHelpWithGenericOptions(Group group) throws IOException { new GenericOptionsParser(new Configuration(), new org.apache.commons.cli.Options(), new String[0]); PrintWriter pw = new PrintWriter(new OutputStreamWriter(System.out, Charsets.UTF_8), true); HelpFormatter formatter = new HelpFormatter(); formatter.setGroup(group); formatter.setPrintWriter(pw); formatter.setFooter( "Specify HDFS directories while running on hadoop; else specify local file system directories"); formatter.print(); }
From source file:org.geotools.utils.progress.BaseArgumentsManager.java
protected void finishInitialization() { // ///////////////////////////////////////////////////////////////////// ////from w w w .j a va2s . co m // Help Formatter // // ///////////////////////////////////////////////////////////////////// final HelpFormatter cmdHlp = new HelpFormatter("| ", " ", " |", 75); cmdHlp.setShellCommand(getToolName()); cmdHlp.setHeader("Help"); cmdHlp.setFooter(new StringBuffer(getToolName() + " - GeoSolutions S.a.s (C) 2006 - v ") .append(getVersion()).toString()); cmdHlp.setDivider("|-------------------------------------------------------------------------|"); // ///////////////////////////////////////////////////////////////////// // // Close Parser // // ///////////////////////////////////////////////////////////////////// optionsGroup = new GroupImpl(cmdOpts, "Options", "All the options", 1, cmdOpts.size()); cmdParser.setGroup(optionsGroup); cmdParser.setHelpOption(helpOpt); cmdParser.setHelpFormatter(cmdHlp); }
From source file:org.opencloudengine.flamingo.mapreduce.util.CommandLineUtil.java
public static void printHelpWithGenericOptions(Group group) throws IOException { Options ops = new Options(); new GenericOptionsParser(new Configuration(), ops, new String[0]); org.apache.commons.cli.HelpFormatter fmt = new org.apache.commons.cli.HelpFormatter(); fmt.printHelp("<command> [Generic Options] [Job-Specific Options]", "Generic Options:", ops, ""); PrintWriter pw = new PrintWriter(System.out, true); HelpFormatter formatter = new HelpFormatter(); formatter.setGroup(group);/* w w w . jav a2 s . c o m*/ formatter.setPrintWriter(pw); formatter.printHelp(); formatter.setFooter( "Hadoop Job? ? HDFS ? ? ."); formatter.printFooter(); pw.flush(); }