Package org.jnode.shell.help

Examples of org.jnode.shell.help.Help


        // We'll show the help for the last command in the pipeline.
        CommandLine cmd = commands.get(len - 1).commandLine;
        CommandInfo cmdInfo = cmd.getCommandInfo(shell);
        if (cmdInfo != null) {
            try {
                Help help = HelpFactory.getHelpFactory().getHelp(cmd.getCommandName(), cmdInfo);
                help.usage(pw);
                return true;
            } catch (HelpException ex) {
                LOG.info("Unexpected error while getting help for alias / class '" +
                        cmd.getCommandName() + "': " + ex.getMessage(), ex);
            }
View Full Code Here


    public boolean help(CommandShell shell, String line, PrintWriter pw) throws ShellException {
        CommandLine cmd = doParseCommandLine(line);
        CommandInfo cmdInfo = cmd.getCommandInfo(shell);
        if (cmdInfo != null) {
            try {
                Help help = HelpFactory.getHelpFactory().getHelp(cmd.getCommandName(), cmdInfo);
                help.usage(pw);
                return true;
            } catch (HelpException ex) {
                LOG.info("Unexpected error while getting help for alias / class '" +
                        cmd.getCommandName() + "': " + ex.getMessage(), ex);
            }
View Full Code Here

        }
        CommandShell shell = null;
        try {
            shell = (CommandShell) ShellUtils.getShellManager().getCurrentShell();
            CommandInfo cmdInfo =  shell.getCommandInfo(alias);
            Help cmdHelp = HelpFactory.getHelpFactory().getHelp(alias, cmdInfo);
            if (cmdHelp == null) {
                err.format(err_no_help, alias);
                exit(1);
            }
            cmdHelp.help(out);
            otherAliases(shell.getAliasManager(), alias, cmdInfo.getCommandClass().getName(), out);
        } catch (HelpException ex) {
            err.format(err_help_ex, alias, ex.getLocalizedMessage());
            throw ex;
        } catch (ShellException ex) {
View Full Code Here

                    }
                } else {
                    errPW.println("Command syntax error: " + ex.getMessage());
                }
                if (cmdLine != null) {
                    Help help = HelpFactory.getHelpFactory().getHelp(
                            cmdLine.getCommandName(), cmdLine.getCommandInfo());
                    help.usage(errPW);
                }
            } catch (HelpException e) {
                errPW.println("Exception while trying to get the command usage");
                stackTrace(ex);
            }
View Full Code Here

TOP

Related Classes of org.jnode.shell.help.Help

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.