Package org.apache.commons.cli

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


    HelpFormatter formatter = new HelpFormatter();
    PrintWriter writer = new PrintWriter(out);
    writer.println("> -----");
    writer.println(getCommandDescriptions());
//    formatter.printHelp(writer, 80, getCommandDescriptions(), ">>>", getOptions(), 4, 4, ">>>", true);
    formatter.printOptions(writer, 80, getOptions(), 4, 4);
    writer.println("> -----");
    writer.flush();
  }
 
  /**
 
View Full Code Here


                    "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

                    "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

        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

                    "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

                    "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

                    "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

@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

  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

                    "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

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.