use of net.jangaroo.jooc.cli.CommandLineParseException 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;
}
use of net.jangaroo.jooc.cli.CommandLineParseException in project jangaroo-tools by CoreMedia.
the class Jooc method run.
public static int run(String[] argv, CompileLog log) {
try {
JoocCommandLineParser commandLineParser = new JoocCommandLineParser();
JoocConfiguration config = commandLineParser.parse(argv);
if (config != null) {
return new Jooc(config, log).run().getResultCode();
}
} catch (CommandLineParseException e) {
// NOSONAR this is a commandline tool
System.out.println(e.getMessage());
return e.getExitCode();
}
return CompilationResult.RESULT_CODE_OK;
}
use of net.jangaroo.jooc.cli.CommandLineParseException in project jangaroo-tools by CoreMedia.
the class ExmlcCommandLineParser method parse.
public ExmlConfiguration parse(String[] args) throws CommandLineParseException {
ExmlConfiguration config = new ExmlConfiguration();
CmdLineParser parser = new CmdLineParser(config);
try {
// parse the arguments.
parser.parseArgument(args);
} catch (CmdLineException e) {
StringBuilder msg = extendedUsage(parser, e);
throw new CommandLineParseException(msg.toString(), -1);
}
return parseConfig(parser, config);
}
Aggregations