Package org.jnode.shell

Examples of org.jnode.shell.Shell


    @Override
    public Help getHelp(String alias, CommandInfo cmdInfo) throws HelpException {
        SyntaxBundle syntaxes = null;
        ArgumentBundle bundle = null;
        try {
            final Shell shell = ShellUtils.getShellManager().getCurrentShell();
            final SyntaxManager syntaxManager = shell.getSyntaxManager();
            Command cmd = cmdInfo.createCommandInstance();
            if (cmd != null) {
                bundle = cmd.getArgumentBundle();
                syntaxes = syntaxManager.getSyntaxBundle(alias);
                if (syntaxes == null) {
View Full Code Here


        new ClearConsoleCommand().execute(args);
    }
   
    @Override
    public void execute() throws Exception {
        final Shell shell = ShellUtils.getCurrentShell();
        TextConsole tc = (TextConsole) shell.getConsole();
        tc.clear();
        tc.setCursor(0, 0);
    }
View Full Code Here

    @Override
    public void execute() throws Exception {
        final PrintWriter err = getError().getPrintWriter();
        final File file = argFile.getValue();

        Shell shell = null;
        try {
            shell = ShellUtils.getShellManager().getCurrentShell();
        } catch (NameNotFoundException e) {
            e.printStackTrace(err);
            exit(2);
        }

        if (shell == null) {
            err.println(err_null);
            exit(2);
        }
       
        String[] args = argArgs.getValues();

        int rc = shell.runCommandFile(file, null, args);
        if (rc != 0) {
            exit(rc);
        }
    }
View Full Code Here

TOP

Related Classes of org.jnode.shell.Shell

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.