Example usage for org.apache.commons.cli2 DisplaySetting DISPLAY_OPTIONAL_CHILD_GROUP

List of usage examples for org.apache.commons.cli2 DisplaySetting DISPLAY_OPTIONAL_CHILD_GROUP

Introduction

In this page you can find the example usage for org.apache.commons.cli2 DisplaySetting DISPLAY_OPTIONAL_CHILD_GROUP.

Prototype

DisplaySetting DISPLAY_OPTIONAL_CHILD_GROUP

To view the source code for org.apache.commons.cli2 DisplaySetting DISPLAY_OPTIONAL_CHILD_GROUP.

Click Source Link

Document

Indicates that optional child groups should be displayed in square brackets.

Usage

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  v  a 2 s .co m*/

    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: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();/*  ww  w.j  a va  2 s.c  o  m*/
}