Package org.jnode.shell

Examples of org.jnode.shell.ShellManager


    }

    @Override
    public void execute() throws NameNotFoundException, IsolateStartupException, ShellException {
        final PrintWriter out = getOutput().getPrintWriter();
        final ShellManager sm = InitialNaming.lookup(ShellManager.NAME);
        final ConsoleManager conMgr = sm.getCurrentShell().getConsole().getManager();

        boolean listConsoles = FLAG_LIST.isSet();
        boolean newConsole = FLAG_NEW.isSet();
        boolean isolateNewConsole = FLAG_ISOLATED.isSet();
        boolean test = FLAG_TEST.isSet();
View Full Code Here


         * This will be the entry point for the isolate.
         * @param args
         */
        public static void main(String[] args) {
            try {
                final ShellManager sm = InitialNaming.lookup(ShellManager.NAME);
                final ConsoleManager conMgr = sm.getCurrentShell().getConsole().getManager();
                final PrintWriter out = new PrintWriter(new OutputStreamWriter(System.out));
                TextConsole console = createConsoleWithShell(conMgr, out);
                System.setIn(new ReaderInputStream(console.getIn()));
                System.setOut(new PrintStream(new WriterOutputStream(console.getOut(), false), true));
                System.setErr(new PrintStream(new WriterOutputStream(console.getErr(), false), true));
View Full Code Here

    /**
     * Start this plugin
     */
    protected void startPlugin() throws PluginException {
        try {
            ShellManager mgr = InitialNaming.lookup(ShellManager.NAME);
            mgr.registerInterpreterFactory(FACTORY);
        } catch (NamingException ex) {
            throw new PluginException("Cannot find the shell manager", ex);
        }
    }
View Full Code Here

    /**
     * Stop this plugin
     */
    protected void stopPlugin() throws PluginException {
        try {
            ShellManager mgr = InitialNaming.lookup(ShellManager.NAME);
            mgr.unregisterInterpreterFactory(FACTORY);
        } catch (NamingException ex) {
            throw new PluginException("Cannot find the shell manager", ex);
        }
    }
View Full Code Here

    /**
     * Start this plugin
     */
    protected void startPlugin() throws PluginException {
        try {
            final ShellManager shellMgr = new DefaultShellManager();
            final AliasManager aliasMgr =
                new DefaultAliasManager(getDescriptor().getExtensionPoint("aliases"));
            final SyntaxManager syntaxMgr =
                new DefaultSyntaxManager(getDescriptor().getExtensionPoint("syntaxes"));
            InitialNaming.bind(AliasManager.NAME, aliasMgr);
View Full Code Here

        return instance;
    }

    private static Toolkit createInstance() {
        try {
            final ShellManager sm = InitialNaming.lookup(ShellManager.NAME);
            final ConsoleManager conMgr = sm.getCurrentShell().getConsole().getManager();
            final TextConsole console = (TextConsole) conMgr.createConsole(
                "charva",
                ConsoleManager.CreateOptions.TEXT |
                            ConsoleManager.CreateOptions.STACKED |
                            ConsoleManager.CreateOptions.NO_LINE_EDITTING);
View Full Code Here

    protected static void initEnv() throws NamingException {
        if (true) {
            InitialNaming.setNameSpace(new BasicNameSpace());
            InitialNaming.bind(DeviceManager.NAME, DeviceManager.INSTANCE);
            final AliasManager aliasMgr = new DefaultAliasManager(new DummyExtensionPoint());
            final ShellManager shellMgr = new DefaultShellManager();
            InitialNaming.bind(AliasManager.NAME, aliasMgr);
            InitialNaming.bind(ShellManager.NAME, shellMgr);
        }
    }
View Full Code Here

   
    /**
     * Set up the pager's console and command pipe.
     */
    private void setup() throws NameNotFoundException, IOException {
        ShellManager sm = InitialNaming.lookup(ShellManager.NAME);
        manager = (TextScreenConsoleManager) sm.getCurrentShell().getConsole().getManager();
        console = manager.createConsole(
            "page",
            (ConsoleManager.CreateOptions.TEXT |
                ConsoleManager.CreateOptions.STACKED |
                ConsoleManager.CreateOptions.NO_LINE_EDITTING |
View Full Code Here

    /**
     * Execute this command
     */
    public void execute() throws Exception {
        ShellManager sm = InitialNaming.lookup(ShellManager.NAME);
        ((CommandShell) sm.getCurrentShell()).exit();
    }
View Full Code Here

     * Initialize a new instance
     *
     * @param descriptor
     */
    public BjornePseudoPlugin() throws NamingException {
        ShellManager mgr = InitialNaming.lookup(ShellManager.NAME);
        mgr.registerInterpreterFactory(FACTORY);
    }
View Full Code Here

TOP

Related Classes of org.jnode.shell.ShellManager

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.