private void showHelp (CLIContext cli, String args[], Options options) { PrintWriter pw = new PrintWriter (cli.getOutputStream()); HelpFormatter helpFormatter = new HelpFormatter (); helpFormatter.printHelp (args[0] + "<nick> [options]", options); helpFormatter.printHelp(pw, HelpFormatter.DEFAULT_WIDTH, args[0], null, options, 0, HelpFormatter.DEFAULT_DESC_PAD, null,false); } }
private void showHelp (CLIContext cli, String args[], Options options) { PrintWriter pw = new PrintWriter (cli.getOutputStream()); HelpFormatter helpFormatter = new HelpFormatter (); helpFormatter.printHelp (args[0] + "[options]", options); helpFormatter.printHelp(pw, HelpFormatter.DEFAULT_WIDTH, args[0], null, options, 0, HelpFormatter.DEFAULT_DESC_PAD, null,false); } }
private void showHelp (CLIContext cli, String args[], Options options) { PrintWriter pw = new PrintWriter (cli.getOutputStream()); HelpFormatter helpFormatter = new HelpFormatter (); helpFormatter.printHelp (args[0] + " <nick> [options]", options); helpFormatter.printHelp(pw, HelpFormatter.DEFAULT_WIDTH, args[0], null, options, 0, HelpFormatter.DEFAULT_DESC_PAD, null,false); } }
public void exec(CLIContext cli, String[] args) throws IOException { boolean shutdown; if (cli.isInteractive() && cli.getOutputStream() != System.out) { cli.println ("Can't shutdown remotely"); return; } if (hasOption(args, "-f", "--force", "-fq")) { shutdown = true; } else { shutdown = cli.confirm("Confirm shutdown (Yes/No) ? "); } if (shutdown) { if (!hasOption (args, "-q", "--quiet", "-fq")) cli.println("Shutting down."); cli.getCLI().getQ2().shutdown(); } else { cli.println("Q2 will continue running."); } }