Package org.objectweb.celtix.tools.common.toolspec.parser

Examples of org.objectweb.celtix.tools.common.toolspec.parser.CommandLineParser


    }

    public String getUsage() {
        if (usage == null) {
            try {
                CommandLineParser parser = getCommandLineParser();

                if (parser != null) {
                    usage = parser.getUsage();
                }
            } catch (Exception ex) {
                usage = "Could not get usage for the tool";
            }
        }
View Full Code Here


        setMode(args);
        if (isQuietMode()) {
            redirectOutput();
        }
        if (toolspec != null) {
            parser = new CommandLineParser(toolspec);
            commandDoc = parser.parseArguments(args);
        }
    }
View Full Code Here

            checkParams(errors);
        }            
    }
   
    private void outputInfo() {
        CommandLineParser parser = getCommandLineParser();

        if (commandDocument.hasParameter("help")) {
            try {
                System.out.println(name + " " + getUsage());
                System.out.println();
                System.out.println("Options : ");
                System.out.println();
                System.out.println(parser.getDetailedUsage());
                String toolUsage = parser.getToolUsage();

                if (toolUsage != null) {
                    System.out.println(toolUsage);
                    System.out.println();
                }
View Full Code Here

       
    }
   
    public TestUtils(String toolName, InputStream in) throws Exception {
        ToolSpec spec = new ToolSpec(in, false);
        CommandLineParser parser = new CommandLineParser(spec);
        String usage = parser.getUsage();
        mUsage = "Usage : " + toolName + " " + usage;
        mDetailedUsage = toolName + " " + usage + System.getProperty("line.separator")
                          + System.getProperty("line.separator");
        mDetailedUsage += "Options : " + System.getProperty("line.separator") + parser.getDetailedUsage()
                           + System.getProperty("line.separator");
        mDetailedUsage += parser.getToolUsage() + System.getProperty("line.separator")
                           + System.getProperty("line.separator");
    }
View Full Code Here

TOP

Related Classes of org.objectweb.celtix.tools.common.toolspec.parser.CommandLineParser

Copyright © 2018 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.