Examples of HelpFormatter


Examples of org.apache.commons.cli.HelpFormatter

            }
        } catch(ParseException exp) {
            // oops, something went wrong
            System.err.println("Parsing failed.  Reason: " + exp.getMessage());
             
            HelpFormatter formatter = new HelpFormatter();
            formatter.printHelp("find", options);
        }       
    }
View Full Code Here

Examples of org.apache.commons.cli.HelpFormatter

        }
      } catch( ParseException exp ) {
          // oops, something went wrong
          System.err.println( "Parsing failed.  Reason: " + exp.getMessage() );
         
        HelpFormatter formatter = new HelpFormatter();
        formatter.printHelp( "list", options );
      }       
    }
View Full Code Here

Examples of org.apache.commons.cli.HelpFormatter

        return this;
    }

    public void printHelp() {
        HelpFormatter formatter = new HelpFormatter();
        String appName = this.appName == null ? "App" : this.appName;
        formatter.printHelp(appName, this.rules);
    }
View Full Code Here

Examples of org.apache.commons.cli.HelpFormatter

    return opt;
  }

  public static void printHelp(Options opts) {
    HelpFormatter formatter = new HelpFormatter();
    formatter.printHelp("Generate a record with random data given an Avro schema", opts);
  }
View Full Code Here

Examples of org.apache.commons.cli.HelpFormatter

      System.exit(-1);
    }

    if (!cmdline.hasOption(HOST_OPTION) || !cmdline.hasOption(PORT_OPTION)
        || !cmdline.hasOption(QUERIES_OPTION)) {
      HelpFormatter formatter = new HelpFormatter();
      formatter.printHelp(RunQueriesThrift.class.getName(), options);
      System.exit(-1);
    }

    String queryFile = cmdline.getOptionValue(QUERIES_OPTION);
    if (!new File(queryFile).exists()) {
View Full Code Here

Examples of org.apache.commons.cli.HelpFormatter

      System.exit(-1);
    }

    if (!cmdline.hasOption(HOST_OPTION) || !cmdline.hasOption(PORT_OPTION)
        || !cmdline.hasOption(QUERIES_OPTION)) {
      HelpFormatter formatter = new HelpFormatter();
      formatter.printHelp(RunQueriesThrift.class.getName(), options);
      System.exit(-1);
    }

    String queryFile = cmdline.getOptionValue(QUERIES_OPTION);
    if (!new File(queryFile).exists()) {
View Full Code Here

Examples of org.apache.commons.cli.HelpFormatter

      System.err.println("Error parsing command line: " + exp.getMessage());
      System.exit(-1);
  }
 
  if (!cmdline.hasOption(HTML_OPTION)) {
      HelpFormatter formatter = new HelpFormatter();
      formatter.printHelp(HTMLStatusExtractor.class.getName(), options);
      System.exit(-1);
  }
 
  String html_filename = cmdline.getOptionValue(HTML_OPTION);
  BufferedReader html_file = null;
View Full Code Here

Examples of org.apache.commons.cli.HelpFormatter

        return options;
    }

    private static void printHelp(Options options) {
        HelpFormatter formatter = new HelpFormatter();
        formatter.printHelp("run", options, true);
    }
View Full Code Here

Examples of org.apache.commons.cli.HelpFormatter

    opts.addOption(null, "public-server", false, "allow connections from external computers");
    opts.addOption(null, "no-password", false, "do not require a password from external connections " +
                   "(warning: for advanced users only!)");
    CommandLine line = parser.parse(opts, args);
    if (line.hasOption("help")) {
      new HelpFormatter().printHelp("beaker.command", opts);
      System.exit(0);
    }
    return line;
  }
View Full Code Here

Examples of org.apache.commons.cli.HelpFormatter

        CommandLineParser parser = new PosixParser();
        CommandLine params = parser.parse(options, args);
        if (!params.hasOption("theme") || !params.hasOption("theme-folder")
                || !params.hasOption("version")) {
            // automatically generate the help statement
            HelpFormatter formatter = new HelpFormatter();
            formatter.printHelp(CompileTheme.class.getName(), options);
            return;
        }
        String themeName = params.getOptionValue("theme");
        String themeFolder = params.getOptionValue("theme-folder");
        String version = params.getOptionValue("version");
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.