Examples of CommandContainer


Examples of org.apache.geronimo.twiddle.command.CommandContainer

            throw new NullArgumentException("world");
        }
       
        this.io = io;
        this.world = world;
        this.container = new CommandContainer();
        this.executor = new CommandExecutor(container);
       
        // Make sure the default realm is there
        try {
            world.newRealm(Command.DEFAULT_CLASS_REALM);
View Full Code Here

Examples of org.apache.geronimo.twiddle.command.CommandContainer

        if (config == null) return;
       
        CommandConfig[] commands = config.getCommandConfig();
        if (commands == null) return;
       
        CommandContainer container = twiddle.getCommandContainer();
        ClassWorld world = getTwiddle().getClassWorld();
       
        for (int i=0; i<commands.length; i++) {
            if (commands[i] == null) {
                throw new NullArgumentException("CommandConfig", i);
            }
           
            CommandInfo info = new CommandInfo(commands[i], world);
            container.addCommandInfo(info);
        }
    }
View Full Code Here

Examples of org.apache.geronimo.twiddle.command.CommandContainer

            throw new NullArgumentException("world");
        }
       
        this.io = io;
        this.world = world;
        this.container = new CommandContainer();
        this.executor = new CommandExecutor(container);
       
        // Make sure the default realm is there
        try {
            world.newRealm(Command.DEFAULT_CLASS_REALM);
View Full Code Here

Examples of org.apache.geronimo.twiddle.command.CommandContainer

        if (config == null) return;
       
        CommandConfig[] commands = config.getCommandConfig();
        if (commands == null) return;
       
        CommandContainer container = twiddle.getCommandContainer();
        ClassWorld world = getTwiddle().getClassWorld();
       
        for (int i=0; i<commands.length; i++) {
            if (commands[i] == null) {
                throw new NullArgumentException("CommandConfig", i);
            }
           
            CommandInfo info = new CommandInfo(commands[i], world);
            container.addCommandInfo(info);
        }
    }
View Full Code Here

Examples of org.jboss.aesh.console.command.CommandContainer

    @Override
    public CommandResult execute(CommandInvocation commandInvocation) throws IOException {
        setCommandInvocation(commandInvocation);
        if(manPages != null && manPages.size() > 0) {
            try {
                CommandContainer manCommand = registry.getCommand(manPages.get(0).getCommand(), null);
                if(manCommand.getCommand() instanceof ManCommand) {
                    setFile(((ManCommand) manCommand.getCommand()).getManLocation().toString());
                    getCommandInvocation().attachConsoleCommand(this);
                    afterAttach();
                }
            } catch (CommandNotFoundException e) {
                e.printStackTrace();
View Full Code Here

Examples of org.jboss.aesh.console.command.container.CommandContainer

            throws CommandNotFoundException {
        try {
            return registry.getCommand(name, line);
        } catch (CommandNotFoundException e) {
            if (internalRegistry != null) {
                CommandContainer cc = internalRegistry.getCommand(name);
                if (cc != null)
                    return cc;
            }
            throw e;
        }
View Full Code Here

Examples of org.jboss.aesh.console.command.container.CommandContainer

            throws CommandNotFoundException {
        try {
            return registry.getCommand(name, line);
        } catch (CommandNotFoundException e) {
            if (internalRegistry != null) {
                CommandContainer cc = internalRegistry.getCommand(name);
                if (cc != null)
                    return cc;
            }
            throw e;
        }
View Full Code Here

Examples of org.jboss.aesh.console.command.container.CommandContainer

        }
    }

    @Override
    public String getHelpInfo(String commandName) {
        CommandContainer commandContainer = null;
        try {
            commandContainer = registry.getCommand(commandName, "");
        }
        catch (CommandNotFoundException e) {
            e.printStackTrace();
        }
        if(commandContainer != null)
            return commandContainer.getParser().printHelp();
        else
            return "";
    }
View Full Code Here

Examples of org.jboss.aesh.console.command.container.CommandContainer

        try {
            return registry.getCommand(name, line);
        }
        catch (CommandNotFoundException e) {
            if(internalRegistry != null) {
                CommandContainer cc = internalRegistry.getCommand(name);
                if(cc != null)
                    return cc;
            }
            throw e;
        }
View Full Code Here

Examples of org.jboss.aesh.console.command.container.CommandContainer

            if(completedCommands.size() > 0) {
                completeOperation.addCompletionCandidates(completedCommands);
            }
            else {
                try {
                    CommandContainer commandContainer =
                            getCommand( Parser.findFirstWord(completeOperation.getBuffer()), completeOperation.getBuffer());
                    CommandLineCompletionParser completionParser = commandContainer.getParser().getCompletionParser();

                    ParsedCompleteObject completeObject =
                            completionParser.findCompleteObject( completeOperation.getBuffer(), completeOperation.getCursor());
                    completionParser.injectValuesAndComplete(completeObject, commandContainer.getCommand(), completeOperation);
                }
                catch (CommandLineParserException e) {
                    logger.warning(e.getMessage());
                }
                catch (CommandNotFoundException ignored) {
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.