Examples of printOptions()


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

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

  private static final ResourceBundle clientResource =
      ResourceBundle.getBundle(Constants.RESOURCE_NAME);

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

  protected  ResourceBundle getResource() {
    return clientResource;
  }
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()

  private void printOptions(boolean 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()

                    "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()

                "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()

        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()

    pw.println("Usage:" +
        "\n\t " + TOOL_NAME + " view [ <option> ... ]" +
        "\n\t " + TOOL_NAME + " invalidate --host <name> --transaction <id>");
    pw.println("\nOptions:\n");
    HelpFormatter formatter = new HelpFormatter();
    formatter.printOptions(pw, 100, options, 0, 10);
    pw.flush();
    pw.close();
  }

  /**
 
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.