Examples of printUsage()


Examples of org.apache.karaf.shell.commands.meta.ActionMetaData.printUsage()

            Object param = it.next();
            if (HelpOption.HELP.name().equals(param)) {
                Terminal term = session != null ? (Terminal) session.get(".jline.terminal") : null;
                int termWidth = term != null ? term.getWidth() : 80;
                boolean globalScope = NameScoping.isGlobalScope(session, actionMetaData.getCommand().scope());
                actionMetaData.printUsage(action, System.out, globalScope, termWidth);
                return false;
            }
        }
       
        // Populate
View Full Code Here

Examples of org.eclipse.jgit.pgm.opt.CmdLineParser.printUsage()

        if (argv.length == 0 || help) {
            final String ex = clp.printExample(ExampleMode.ALL, CLIText.get().resourceBundle());
            writer.println("jgit" + ex + " command [ARG ...]"); //$NON-NLS-1$
            if (help) {
                writer.println();
                clp.printUsage(writer, CLIText.get().resourceBundle());
                writer.println();
            } else if (subcommand == null) {
                writer.println();
                writer.println(CLIText.get().mostCommonlyUsedCommandsAre);
                final CommandRef[] common = CommandCatalog.common();
View Full Code Here

Examples of org.exolab.castor.util.CommandLineOptions.printUsage()

        String mappingName = options.getProperty("o");
        boolean force = (options.getProperty("f") != null);

        if (classname == null) {
            PrintWriter pw = new PrintWriter(System.out, true);
            allOptions.printUsage(pw);
            pw.flush();
            return;
        }

        MappingTool tool;
View Full Code Here

Examples of org.kohsuke.args4j.CmdLineParser.printUsage()

        CmdLineParser parser = new CmdLineParser(opts);
        try {
            parser.parseArgument(args);
        } catch (CmdLineException e) {
            e.printStackTrace(System.err);
            parser.printUsage(System.err);
            System.exit(1);
        }
        return opts;
    }
View Full Code Here

Examples of org.kohsuke.args4j.CmdLineParser.printUsage()

            e.printStackTrace(System.err);
            parser.printUsage(System.err);
            System.exit(1);
        }
        if (opts.hosts == null) {
            parser.printUsage(System.err);
            System.exit(1);
        }
        return opts;
    }
View Full Code Here

Examples of org.kohsuke.args4j.CmdLineParser.printUsage()

        CmdLineParser parser = new CmdLineParser(opts);
        try {
            parser.parseArgument(args);
        } catch (CmdLineException e) {
            e.printStackTrace(System.err);
            parser.printUsage(System.err);
            System.exit(1);
        }
        return opts;
    }
View Full Code Here

Examples of org.kohsuke.args4j.CmdLineParser.printUsage()

        CmdLineParser parser = new CmdLineParser(opts);
        try {
            parser.parseArgument(args);
        } catch (CmdLineException e) {
            e.printStackTrace(System.err);
            parser.printUsage(System.err);
            System.exit(1);
        }
        if (opts.hosts == null) {
            parser.printUsage(System.err);
            System.exit(1);
View Full Code Here

Examples of org.kohsuke.args4j.CmdLineParser.printUsage()

        try {
            parser.parseArgument(args);
        } catch (CmdLineException e) {
            System.err.println(e.getMessage());
            System.err.println("java -jar granule.jar [options...] arguments...");
            parser.printUsage(System.err);
            return;
        }
        String rootdir = options.getRootpath();
        if (rootdir == null) rootdir = ".";
        File f = new File(rootdir);
View Full Code Here

Examples of org.kohsuke.args4j.CmdLineParser.printUsage()

    try {
      parser.parseArgument(args);
    } catch (CmdLineException e) {
      System.err.println(e.getMessage() + "\n");
      parser.setUsageWidth(120);
      parser.printUsage(System.err);
      throw new CmdLineException("Exiting...");
    }
  }

  private static class DiffReportFactory {
View Full Code Here

Examples of org.kohsuke.args4j.CmdLineParser.printUsage()

      bind(ClassPath.class).toInstance(new ClassPathFactory().createFromPath(config.cp));
      bind(ReportFormat.class).toInstance(config.format);     
    } catch (CmdLineException e) {
      err.println(e.getMessage() + "\n");
      parser.setUsageWidth(120);
      parser.printUsage(err);
      err.println("Exiting...");
    }
    bind(CommandLineConfig.class).toInstance(config);
    bind(ReportOptions.class).toInstance(new ReportOptions(
        config.cyclomaticMultiplier, config.globalMultiplier, config.constructorMultiplier,
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.