* @param commandInfo The command line array
* @return The results of the command, null on errors
*/
public Object execute (String... commandInfo) {
try {
UICommand command = set.createCommand(commandInfo[0]);
if (command != null) {
CommandLineArgumentsStandard cla = null;
if (commandInfo.length > 1) {
if (command instanceof CommandLineArgumentParser) {
cla = ((CommandLineArgumentParser)command).createArguments(StringUtil.join(CollectionUtil.shift(commandInfo), ' '));
} else {
cla = new CommandLineArgumentsStandard(CollectionUtil.shift(commandInfo));
}
}
return command.execute(context, cla);
} else {
if ("exit".equalsIgnoreCase(commandInfo[0]) || "quit".equalsIgnoreCase(commandInfo[0])) {
running = false;
return new CommandLineExitException(this);
} else