Examples of printHelp()


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

        return options;
    }

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

    private static class AlternateName implements Comparable<AlternateName> {
        private final int geonameId;
        private final String name;
View Full Code Here

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

        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

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

            return setDisplayNameAndOrEmail(cmd);
        }

        String actions = StringUtils.join(getActions(), " | ");
        HelpFormatter formatter = new HelpFormatter();
        formatter.printHelp(UserAdmin.class.getSimpleName() + " < " + actions + " >", getOptions());
        return -1;
    }

    private int create(CommandLine cmd) {
        String username = cmd.getOptionValue(CMD_OPT_USERNAME);
View Full Code Here

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

      if (line.getArgs().length != 0) {
        throw new ParseException("Unexpected options");
      }
    } catch (ParseException pe) {
      HelpFormatter formatter = new HelpFormatter();
      formatter.printHelp("TestFileAppend2", options);
      throw pe;
    }
           
    TestFileAppend2 tfa2 = new TestFileAppend2();
    tfa2.numDatanodes = Integer.parseInt(
View Full Code Here

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

      return commandLine.getArgs();
    } catch(ParseException e) {
      LOG.warn("options parsing failed: "+e.getMessage());

      HelpFormatter formatter = new HelpFormatter();
      formatter.printHelp("general options are: ", opts);
    }
    return args;
  }

  /**
 
View Full Code Here

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

                System.exit(1);
            }
        } catch (Exception e) {
            HelpFormatter formatter = new HelpFormatter();
            formatter.setWidth(Integer.MAX_VALUE);
            formatter.printHelp(
                    MessageFormat.format(
                            "java -classpath ... {0}",
                            BatchCompilerDriver.class.getName()),
                    OPTIONS,
                    true);
View Full Code Here

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

            Configuration conf = parseConfiguration(args);
            task = new AbortTask(conf.profile, conf.sessionId);
        } catch (Exception e) {
            HelpFormatter formatter = new HelpFormatter();
            formatter.setWidth(Integer.MAX_VALUE);
            formatter.printHelp(
                    MessageFormat.format(
                            "java -classpath ... {0}",
                            WindGateAbort.class.getName()),
                    OPTIONS,
                    true);
View Full Code Here

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

                    conf.mode.completesSession,
                    conf.arguments);
        } catch (Exception e) {
            HelpFormatter formatter = new HelpFormatter();
            formatter.setWidth(Integer.MAX_VALUE);
            formatter.printHelp(
                    MessageFormat.format(
                            "java -classpath ... {0}",
                            WindGate.class.getName()),
                    OPTIONS,
                    true);
View Full Code Here

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

        try {
            start(args);
        } catch (Exception e) {
            HelpFormatter formatter = new HelpFormatter();
            formatter.setWidth(Integer.MAX_VALUE);
            formatter.printHelp(
                    MessageFormat.format(
                            "java -classpath ... {0}",
                            OperatorCompilerDriver.class.getName()),
                    OPTIONS,
                    true);
View Full Code Here

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

                System.exit(1);
            }
        } catch (Exception e) {
            HelpFormatter formatter = new HelpFormatter();
            formatter.setWidth(Integer.MAX_VALUE);
            formatter.printHelp(
                    MessageFormat.format(
                            "java -classpath ... {0}",
                            AllBatchCompilerDriver.class.getName()),
                    OPTIONS,
                    true);
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.