Search in sources :

Example 1 with ExmlcCommandLineParser

use of net.jangaroo.exml.cli.ExmlcCommandLineParser in project jangaroo-tools by CoreMedia.

the class Exmlc method run.

public static int run(String[] argv) {
    ExmlcCommandLineParser parser = new ExmlcCommandLineParser();
    ExmlConfiguration exmlConfiguration;
    try {
        exmlConfiguration = parser.parse(argv);
    } catch (CommandLineParseException e) {
        // NOSONAR this is a commandline tool
        System.err.println(e.getMessage());
        return e.getExitCode();
    }
    if (exmlConfiguration != null) {
        Exmlc exmlc = new Exmlc(exmlConfiguration);
        if (exmlConfiguration.isConvertToMxml()) {
            exmlc.convertAllExmlToMxml();
        } else {
            exmlc.generateAllConfigClasses();
            exmlc.generateAllComponentClasses();
            exmlc.generateXsd();
        }
    }
    return 0;
}
Also used : ExmlcCommandLineParser(net.jangaroo.exml.cli.ExmlcCommandLineParser) CommandLineParseException(net.jangaroo.jooc.cli.CommandLineParseException) ExmlConfiguration(net.jangaroo.exml.config.ExmlConfiguration)

Aggregations

ExmlcCommandLineParser (net.jangaroo.exml.cli.ExmlcCommandLineParser)1 ExmlConfiguration (net.jangaroo.exml.config.ExmlConfiguration)1 CommandLineParseException (net.jangaroo.jooc.cli.CommandLineParseException)1