Print the usage for the command. By default, this prints the description
and available parameters.
356826
public void usage() {
    String commandName = "";
    String commandDescription = "";
    
    CLICommand commandAnnotation = this.getClass().getAnnotation(CLICommand.class);
    
    if (commandAnnotation == null) {
      Parameters commandParameters = this.getClass().getAnnotation(Parameters.class);
      if (commandParameters != null) {
        commandName = commandParameters.commandNames()[0];
        commandDescription = commandParameters.commandDescription();
      }
    } else {
      commandName = commandAnnotation.name();
      commandDescription = commandAnnotation.description();
    }
    
    Console.info("Help for ["+commandName+"].");
    if (commandDescription != null && !commandDescription.isEmpty()) {
      Console.info("Description: " + commandDescription);
    }
    
    JCommander comm = new JCommander(this);
    comm.setProgramName(commandName);

    HashMap<String, Command<T>> commandInstances = getCommands();
    for (Command<T> commandInstance : commandInstances.values()) {
      comm.addCommand(commandInstance);
    }

    comm.usage();
  }
1083613
public static void printCommandInfo(Command command, PrintWriter pw) {
    String description =
        String.format("%s: %s", command.getCommandName(), command.getDescription());
    int width = 80;
    try {
      width = TerminalFactory.get().getWidth();
    } catch (Exception e) {
      // In case the terminal factory failed to decide terminal type, use default width
    }

    HELP_FORMATTER.printWrapped(pw, width, description);
    HELP_FORMATTER.printUsage(pw, width, command.getUsage());
    if (command.getOptions().getOptions().size() > 0) {
      HELP_FORMATTER.printOptions(pw, width, command.getOptions(), HELP_FORMATTER.getLeftPadding(),
          HELP_FORMATTER.getDescPadding());
    }
  }
1373476
public void usage(PrintWriter writer, Help.ColorScheme colorScheme) {
        writer.print(usage(new StringBuilder(), getHelpFactory().create(getCommandSpec(), colorScheme)));
        writer.flush();
    }
1085423
public void printUsage(OutputStream out, boolean showHidden) {
        printUsage(new PrintWriter(new OutputStreamWriter(out, UTF_8)), showHidden);
    }
985017
def usage(self):
    """"""
    print self.programName + " [options]",
    if self.maxArgs == -1 or self.maxArgs - self.minArgs > 1:
      print "[files..]"
    elif self.maxArgs - self.minArgs == 1:
      print "[file]"
    print

    print self.shortDescription

    print "Options:"
    for o in self.options:
      print "\t", ("-" + o.short + ", --" + o.long).ljust(15), ":",
      print o.description.replace("\t", "\\t").ljust(80)
249867
public void printUsage(String cmdLineSyntax) {
        int nextLineTabStop = getSyntaxPrefix().length() + cmdLineSyntax.indexOf(' ') + 1;
        printWrapped( + nextLineTabStop, getSyntaxPrefix() + cmdLineSyntax);
    }
370319
def do_print(self,args):
        """"""
        parser = CommandArgumentParser("print")
        parser.add_argument('-r','--refresh',dest='refresh',action='store_true',help='refresh view of the current stack')
        parser.add_argument('-i','--include',dest='include',default=None,nargs='+',help='resource types to include')
        parser.add_argument(dest='filters',nargs='*',default=["*"],help='Filter stacks');
        args = vars(parser.parse_args(args))

        if args['refresh']:
            self.do_refresh('')

        self.printStack(self.wrappedStack,args['include'],args['filters'])
1277187
def print_usage_table(options={})
      fields = get_usage_fields options[:fields]
      fields, opts =  get_fields_and_options(fields, options)
      render_table(fields, opts, options)
    end
615561
private static void showUsage()
    {
	System.out.println("BatchExtractor <pdf-dir-path> <output-dir-path> <parser>");
	System.out.println("BatchExtractor <pdf-dir-path> <output-dir-path> <parser> --debug");
	System.out.println("BatchExtractor <pdf-dir-path> <output-dir-path> <parser> --small");
	System.out.println("\tparser= pdfbox | tet");
    }
942030
def cmd_example(self, args):
        ''''''
        if len(args) == 0:
            print(self.usage())
        elif args[0] == "status":
            print(self.status())
        elif args[0] == "set":
            self.example_settings.command(args[1:])
        else:
            print(self.usage())
810652
def _report_disabled_command_usage(self, *args, message_to_print: str, **kwargs) -> None:
        
        self.decolorized_write(sys.stderr, "{}\n".format(message_to_print))
1327015
def print_rconf_parameters(self):
        
        if self.use_sys:
            self.print_info(u"Available runtime configuration parameters:")
            self.print_generic(u"\n" + u"\n".join(self.RCONF_PARAMETERS) + u"\n")
        return self.exit(self.HELP_EXIT_CODE)
1277550
private void printConfig() {
        logger.debug("-----Configuration parameters:");
        for (String paramName : m_params.keySet()) {
            Object paramValue = m_params.get(paramName);
            printParam(paramName, paramValue, "");
        }
    }
807830
public final void usage(String commandName) {
        StringBuilder sb = new StringBuilder();
        usage(commandName, sb);
        commander.getConsole().println(sb.toString());
    }
681384
def get_usage(self, program_name=None):
        """"""
        program_name = os.path.relpath(program_name or sys.argv[0] or 'Dummy',
                                       self.base_dir)
        commands = OrderedDict(self.gather_commands())
        options = gather_command_line_options()
        long_usage = format_usage(program_name, self.doc, commands, options)
        # internal usage is a workaround because docopt cannot handle spaces
        # in program names. So for parsing we use 'dummy' as the program name.
        # for printing help etc. we want to use the actual program name.
        internal_usage = format_usage('dummy', self.doc, commands, options)
        short_usage = printable_usage(long_usage)
        return short_usage, long_usage, internal_usage
1199145
private static void printUsage() {
        final StringBuilder msg = new StringBuilder();
        msg.append("Usage: dita -i <file> -f <name> [options]\n");
        msg.append("   or: dita --project=<file> [options]\n");
        msg.append("   or: dita --propertyfile=<file> [options]\n");
        msg.append("   or: dita --install [=<file> | <url> | <id>]\n");
        msg.append("   or: dita --uninstall <id>\n");
        msg.append("   or: dita --plugins\n");
        msg.append("   or: dita --transtypes\n");
        msg.append("   or: dita --deliverables\n");
        msg.append("   or: dita --help\n");
        msg.append("   or: dita --version\n");
        msg.append("Arguments: \n");
        msg.append("  -i <file>, --input=<file>   input file\n");
        msg.append("  -f <name>, --format=<name>  output format (transformation type)\n");
        msg.append("  -p <name>, --project=<name> run project file\n");
        msg.append("  --install [<file>]          install plug-in from a local ZIP file\n");
        msg.append("  --install [<url>]           install plug-in from a URL\n");
        msg.append("  --install [<id>]            install plug-in from plugin registry\n");
        msg.append("  --install                   reload plug-ins\n");
        msg.append("  --uninstall <id>            uninstall plug-in with the ID\n");
        msg.append("  --plugins                   print list of installed plug-ins\n");
        msg.append("  --transtypes                print list of installed transtypes\n");
        msg.append("  --deliverables              print list of deliverables in project\n");
        msg.append("  -h, --help                  print this message\n");
        msg.append("  --version                   print version information and exit\n");
        msg.append("Options: \n");
        msg.append("  -o, --output=<dir>          output directory\n");
        // msg.append("  -diagnostics           print information that might be helpful to"
        // + lSep);
        // msg.append("                         diagnose or report problems." +
        // lSep);
        // msg.append("  -quiet, -q             be extra quiet" + lSep);
        msg.append("  --filter=<files>            filter and flagging files\n");
        msg.append("  --force                     force install plug-in\n");
        msg.append("  -t, --temp=<dir>            temporary directory\n");
        msg.append("  -v, --verbose               verbose logging\n");
        msg.append("  -d, --debug                 print debugging information\n");
        // msg.append("  -emacs, -e             produce logging information without adornments"
        // + lSep);
        // msg.append("  -lib <path>            specifies a path to search for jars and classes"
        // + lSep);
        msg.append("  -l, --logfile=<file>        use given file for log\n");
        // msg.append("  -logger <classname>    the class which is to perform logging"
        // + lSep);
        // msg.append("  -listener <classname>  add an instance of class as a project listener"
        // + lSep);
        // msg.append("  -noinput               do not allow interactive input"
        // + lSep);
        // msg.append("  -buildfile <file>      use given buildfile" + lSep);
        // msg.append("    -file    <file>              ''" + lSep);
        // msg.append("    -f       <file>              ''" + lSep);
        msg.append("  --<property>=<value>        use value for given property\n");
        msg.append("  --propertyfile=<name>       load all properties from file\n");
        // msg.append("  -keep-going, -k        execute all targets that do not depend"
        // + lSep);
        // msg.append("                         on failed target(s)" + lSep);
        // msg.append("  -inputhandler <class>  the class which will handle input requests"
        // + lSep);
        // msg.append("  -nice  number          A niceness value for the main thread:"
        // + lSep
        // +
        // "                         1 (lowest) to 10 (highest); 5 is the default"
        // + lSep);
        // msg.append("  -nouserlib             Run ant without using the jar files from"
        // + lSep
        // + "                         ${user.home}/.ant/lib" + lSep);
        // msg.append("  -noclasspath           Run ant without using CLASSPATH"
        // + lSep);
        // msg.append("  -autoproxy             Java1.5+: use the OS proxy settings"
        // + lSep);
        // msg.append("  -main <class>          override Ant's normal entry point");
        System.out.println(msg.toString());
    }
619028
@Override
    public String usage(final boolean printCommon, final boolean printHidden) {
        final StringBuilder sb = new StringBuilder();

        if (!printHidden) {
            logger.warn("Hidden arguments are always printed in LegacyCommandLineArgumentParser");
        }

        if (prefix.isEmpty()) {
            final String preamble = htmlUnescape(convertFromHtml(getStandardUsagePreamble(callerOptions.getClass()) + getUsagePreamble()));
            checkForNonASCII(preamble, "Tool description");
            sb.append(Utils.wrapParagraph(preamble,OPTION_COLUMN_WIDTH + DESCRIPTION_COLUMN_WIDTH));
            sb.append("\nVersion: " + getVersion());
            sb.append("\n");
            sb.append("\n\nOptions:\n\n");

            for (final String[] optionDoc : FRAMEWORK_OPTION_DOC) {
                printOptionParamUsage(sb, optionDoc[0], optionDoc[1], null, optionDoc[2]);
            }
        }

        if (!optionDefinitions.isEmpty()) {
            optionDefinitions.stream().filter(optionDefinition -> printCommon || !optionDefinition.isCommon).forEach(optionDefinition -> printOptionUsage(sb, optionDefinition));
        }

        if (printCommon) {
            final Field fileField;
            try {
                //Temp class OPTIONS_FILE
                class OptionFileContainerForUsage { public File optionFileContainer;}
                fileField = OptionFileContainerForUsage.class.getField("optionFileContainer");
            } catch (final NoSuchFieldException e) {
                throw new CommandLineException("Should never happen", e);
            }
            final OptionDefinition optionsFileOptionDefinition =
                    new OptionDefinition(fileField, null, OPTIONS_FILE, "",
                            "File of OPTION_NAME=value pairs.  No positional parameters allowed.  Unlike command-line options, " +
                                    "unrecognized options are ignored.  " + "A single-valued option set in an options file may be overridden " +
                                    "by a subsequent command-line option.  " +
                                    "A line starting with '#' is considered a comment.",
                            false, false, 0, Integer.MAX_VALUE, null, true, new String[0]);
            printOptionUsage(sb, optionsFileOptionDefinition);
        }
        return sb.toString();
    }