Examples of wasHelpRequestedByOption()


Examples of com.gitblit.utils.cli.CmdLineParser.wasHelpRequestedByOption()

  protected void parseCommandLine(Object options) throws UnloggedFailure {
    final CmdLineParser clp = newCmdLineParser(options);
    try {
      clp.parseArgument(argv);
    } catch (IllegalArgumentException err) {
      if (!clp.wasHelpRequestedByOption()) {
        throw new UnloggedFailure(1, "fatal: " + err.getMessage());
      }
    } catch (CmdLineException err) {
      if (!clp.wasHelpRequestedByOption()) {
        throw new UnloggedFailure(1, "fatal: " + err.getMessage());
View Full Code Here

Examples of com.gitblit.utils.cli.CmdLineParser.wasHelpRequestedByOption()

    } catch (IllegalArgumentException err) {
      if (!clp.wasHelpRequestedByOption()) {
        throw new UnloggedFailure(1, "fatal: " + err.getMessage());
      }
    } catch (CmdLineException err) {
      if (!clp.wasHelpRequestedByOption()) {
        throw new UnloggedFailure(1, "fatal: " + err.getMessage());
      }
    }

    if (clp.wasHelpRequestedByOption()) {
View Full Code Here

Examples of com.gitblit.utils.cli.CmdLineParser.wasHelpRequestedByOption()

      if (!clp.wasHelpRequestedByOption()) {
        throw new UnloggedFailure(1, "fatal: " + err.getMessage());
      }
    }

    if (clp.wasHelpRequestedByOption()) {
      CommandMetaData meta = getClass().getAnnotation(CommandMetaData.class);
      String title = meta.name().toUpperCase() + ": " + meta.description();
      String b = com.gitblit.utils.StringUtils.leftPad("", title.length() + 2, '═');
      StringWriter msg = new StringWriter();
      msg.write('\n');
View Full Code Here

Examples of com.gitblit.utils.cli.CmdLineParser.wasHelpRequestedByOption()

  protected void parseCommandLine(Object options) throws UnloggedFailure {
    final CmdLineParser clp = newCmdLineParser(options);
    try {
      clp.parseArgument(argv);
    } catch (IllegalArgumentException err) {
      if (!clp.wasHelpRequestedByOption()) {
        throw new UnloggedFailure(1, "fatal: " + err.getMessage());
      }
    } catch (CmdLineException err) {
      if (!clp.wasHelpRequestedByOption()) {
        throw new UnloggedFailure(1, "fatal: " + err.getMessage());
View Full Code Here

Examples of com.gitblit.utils.cli.CmdLineParser.wasHelpRequestedByOption()

    } catch (IllegalArgumentException err) {
      if (!clp.wasHelpRequestedByOption()) {
        throw new UnloggedFailure(1, "fatal: " + err.getMessage());
      }
    } catch (CmdLineException err) {
      if (!clp.wasHelpRequestedByOption()) {
        throw new UnloggedFailure(1, "fatal: " + err.getMessage());
      }
    }

    if (clp.wasHelpRequestedByOption()) {
View Full Code Here

Examples of com.gitblit.utils.cli.CmdLineParser.wasHelpRequestedByOption()

      if (!clp.wasHelpRequestedByOption()) {
        throw new UnloggedFailure(1, "fatal: " + err.getMessage());
      }
    }

    if (clp.wasHelpRequestedByOption()) {
      CommandMetaData meta = getClass().getAnnotation(CommandMetaData.class);
      String title = meta.name().toUpperCase() + ": " + meta.description();
      String b = com.gitblit.utils.StringUtils.leftPad("", title.length() + 2, '═');
      StringWriter msg = new StringWriter();
      msg.write('\n');
View Full Code Here

Examples of com.google.gerrit.util.cli.CmdLineParser.wasHelpRequestedByOption()

    final Injector empty = emptyInjector();
    final CmdLineParser clp = new CmdLineParser(empty, this);
    try {
      clp.parseArgument(argv);
    } catch (CmdLineException err) {
      if (!clp.wasHelpRequestedByOption()) {
        System.err.println("fatal: " + err.getMessage());
        return 1;
      }
    }
View Full Code Here

Examples of com.google.gerrit.util.cli.CmdLineParser.wasHelpRequestedByOption()

        System.err.println("fatal: " + err.getMessage());
        return 1;
      }
    }

    if (clp.wasHelpRequestedByOption()) {
      StringWriter msg = new StringWriter();
      clp.printDetailedUsage(getName(), msg);
      System.err.println(msg.toString());
      return 1;
    }
View Full Code Here

Examples of com.google.gerrit.util.cli.CmdLineParser.wasHelpRequestedByOption()

  protected void parseCommandLine(Object options) throws UnloggedFailure {
    final CmdLineParser clp = newCmdLineParser(options);
    try {
      clp.parseArgument(argv);
    } catch (IllegalArgumentException err) {
      if (!clp.wasHelpRequestedByOption()) {
        throw new UnloggedFailure(1, "fatal: " + err.getMessage());
      }
    } catch (CmdLineException err) {
      if (!clp.wasHelpRequestedByOption()) {
        throw new UnloggedFailure(1, "fatal: " + err.getMessage());
View Full Code Here

Examples of com.google.gerrit.util.cli.CmdLineParser.wasHelpRequestedByOption()

    } catch (IllegalArgumentException err) {
      if (!clp.wasHelpRequestedByOption()) {
        throw new UnloggedFailure(1, "fatal: " + err.getMessage());
      }
    } catch (CmdLineException err) {
      if (!clp.wasHelpRequestedByOption()) {
        throw new UnloggedFailure(1, "fatal: " + err.getMessage());
      }
    }

    if (clp.wasHelpRequestedByOption()) {
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.