Examples of printOptions()


Examples of org.apache.commons.cli.HelpFormatter.printOptions()

        for (String comm : commandsToPrint) {
            Options opts = commands.get(comm);
            String s = LEFT_PADDING + cliName + " " + comm + " ";
            if (opts.getOptions().size() > 0) {
                pw.println(s + "<OPTIONS> " + commandsHelp.get(comm));
                formatter.printOptions(pw, 100, opts, s.length(), 3);
            }
            else {
                pw.println(s + commandsHelp.get(comm));
            }
            pw.println();
View Full Code Here

Examples of org.apache.commons.cli.HelpFormatter.printOptions()

                    "Bug Reports to <users@openejb.apache.org>";


            if (!printHeader){
                pw.append(header).append("\n\n");
                formatter.printOptions(pw, 74, options, 1, 3);
            } else {
                formatter.printHelp(pw, 74, syntax, header, options, 1, 3, footer, false);
            }

            pw.flush();
View Full Code Here

Examples of org.apache.commons.cli.HelpFormatter.printOptions()

                "Bug Reports to <users@tomee.apache.org>";


            if (!printHeader) {
                pw.append(header).append("\n\n");
                formatter.printOptions(pw, 74, options, 1, 3);
            } else {
                formatter.printHelp(pw, 74, syntax, header, options, 1, 3, footer, false);
            }

            pw.flush();
View Full Code Here

Examples of org.apache.commons.cli.HelpFormatter.printOptions()

        for (String comm : commandsToPrint) {
            Options opts = commands.get(comm);
            String s = LEFT_PADDING + cliName + " " + comm + " ";
            if (opts.getOptions().size() > 0) {
                pw.println(s + "<OPTIONS> " + commandsHelp.get(comm));
                formatter.printOptions(pw, 100, opts, s.length(), 3);
            }
            else {
                pw.println(s + commandsHelp.get(comm));
            }
            pw.println();
View Full Code Here

Examples of org.apache.commons.cli.HelpFormatter.printOptions()

        HelpFormatter formatter = new HelpFormatter();
        for (Map.Entry<String, Options> entry : commands.entrySet()) {
            String s = LEFT_PADDING + cliName + " " + entry.getKey() + " ";
            if (entry.getValue().getOptions().size() > 0) {
                pw.println(s + "<OPTIONS> " + commandsHelp.get(entry.getKey()));
                formatter.printOptions(pw, 100, entry.getValue(), s.length(), 3);
            }
            else {
                pw.println(s + commandsHelp.get(entry.getKey()));
            }
            pw.println();
View Full Code Here

Examples of org.apache.commons.cli.HelpFormatter.printOptions()

                    "Bug Reports to <users@openejb.apache.org>";


            if (!printHeader){
                pw.append(header).append("\n\n");
                formatter.printOptions(pw, 74, options, 1, 3);
            } else {
                formatter.printHelp(pw, 74, syntax, header, options, 1, 3, footer, false);
            }

            pw.flush();
View Full Code Here

Examples of org.apache.commons.cli.HelpFormatter.printOptions()

                    "Bug Reports to <users@openejb.apache.org>";


            if (!printHeader){
                pw.append(header).append("\n\n");
                formatter.printOptions(pw, 74, options, 1, 3);
            } else {
                formatter.printHelp(pw, 74, syntax, header, options, 1, 3, footer, false);
            }

            pw.flush();
View Full Code Here

Examples of org.apache.commons.cli.HelpFormatter.printOptions()

        p("Options:");
        p();
        PrintWriter out = new PrintWriter(System.out);
        HelpFormatter formatter = new HelpFormatter();
        formatter.printOptions(out, 78, createOptions(), 2, 2);
        out.flush();
        p();
        p("Examples:");
        p();
        pw("  "+app+" -o build foo.jar bar.jar ", 2);
View Full Code Here

Examples of org.apache.commons.cli.HelpFormatter.printOptions()

    // print the positional args, if any, from child class
    printUsageTop(error);
    PrintWriter pw = error ? new PrintWriter(System.err) : new PrintWriter(System.out);
    pw.println("Options:\n");
    HelpFormatter formatter = new HelpFormatter();
    formatter.printOptions(pw, 100, options, 0, 10);
    pw.flush();
    pw.close();
    if (error) {
      throw new UsageException();
    }
View Full Code Here

Examples of org.apache.commons.cli.HelpFormatter.printOptions()

@SuppressWarnings("serial")
abstract public class SqoopFunction extends Options {

  public void printHelp() {
    HelpFormatter formatter = new HelpFormatter();
    formatter.printOptions(getIo().out, formatter.getWidth(), this, 0, 4);
  }

  public abstract Object executeFunction(CommandLine line);

  public Object execute(List<String> args) {
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.