Package org.apache.commons.cli

Examples of org.apache.commons.cli.HelpFormatter


  /* (non-Javadoc)
   * @see org.gudy.azureus2.ui.console.commands.IConsoleCommand#printHelp(java.io.PrintStream, java.util.List)
   */
  public void printHelpExtra(PrintStream out, List args)
  {
    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


      if (constart)
        System.exit(2);
    }
    if (commands.hasOption('h')) {
      if (constart) {
        HelpFormatter hf = new HelpFormatter();
        hf.printHelp("java org.gudy.azureus2.ui.common.Main", "Optionally you can put torrent files to add to the end of the command line.\r\n", options, "Available User Interfaces: swt (default), web, console\r\nThe default interface is not started if you give either the '-e' or '-c' option (But you can start it by hand with '-u').", true);
        System.exit(0);
      }
    }
    return commands;
  }
View Full Code Here

     * Display usage information based upon current command-line option
     * configuration.
     */
    public static void displayHelp()
    {
        HelpFormatter formatter = new HelpFormatter();
        formatter.printHelp(Schema2XMI.class.getName() + " [options] ...]]", "\nOptions:", options, "\n");
    }
View Full Code Here

    }
  }

  private static void printUsage(Options options) {
    System.out.println("Sesame Server, a standalone RDF server.");
    HelpFormatter formatter = new HelpFormatter();
    formatter.setWidth(80);
    formatter.printHelp("server [OPTION]", options);
  }
View Full Code Here

    return options;
  }

  private static void printUsage(Options options) {
    System.out.println("USAGE:");
    HelpFormatter formatter = new HelpFormatter();
    formatter.setWidth(80);
    formatter.printHelp("start-server [OPTION]", options);
  }
View Full Code Here

    console.start();
  }

  private static void printUsage(Options options) {
    System.out.println("Sesame Console, an interactive shell based utility to communicate with Sesame repositories.");
    HelpFormatter formatter = new HelpFormatter();
    formatter.setWidth(80);
    formatter.printHelp("start-console [OPTION] [repositoryID]", options);
    // writeln("Usage: start-console [OPTION] [repositoryID]");
    // writeln();
    // writeln(" -h, --help print this help");
    // writeln(" -s, --serverURL=URL URL of Sesame server to connect to, e.g.
    // http://localhost/openrdf-sesame/");
View Full Code Here

    return _pluginList;
  }
 
  void printHelp()
  {
    HelpFormatter formatter = new HelpFormatter();
    formatter.printHelp("squirrel-sql", _options);
  }
View Full Code Here

            printHelp(out, options);
        }
    }

    private static void printHelp(PrintStream out, Options options) {
        HelpFormatter formatter = new HelpFormatter();
        PrintWriter pw = new PrintWriter(out);

        formatter.printHelp(
            pw,
            80,
            "groovy [options] [args]",
            "options:",
            options,
View Full Code Here

      CommandLineParser parser = new GnuParser();
      CommandLine line=null;
      try{
        line = parser.parse(options, args);
      } catch(Exception e){
        HelpFormatter formatter = new HelpFormatter();
        formatter.printHelp("cronconverter", options, true);
        System.exit(0);
      }
     
      sourceFile = getWholeArgument(line.getOptionValues("crontab"));
      if (sourceFile.equalsIgnoreCase("/etc/crontab")) sysTab = true;
View Full Code Here

* </ul>
*/
public class Main implements Constants {

  private static void printUsageAndExit(Options options, int exitCode) {
    HelpFormatter formatter = new HelpFormatter();
    formatter.printHelp("bin/hbase rest start", "", options,
      "\nTo run the REST server as a daemon, execute " +
      "bin/hbase-daemon.sh start|stop rest [--infoport <port>] [-p <port>] [-ro]\n", true);
    System.exit(exitCode);
  }
View Full Code Here

TOP

Related Classes of org.apache.commons.cli.HelpFormatter

Copyright © 2015 www.massapicom. 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.