Examples of TextConsole


Examples of org.jnode.driver.console.TextConsole

    protected void startPlugin() throws PluginException {
        final Logger root = Logger.getRootLogger();
        try {
            // Create the appenders
            final ConsoleManager conMgr = InitialNaming.lookup(ConsoleManager.NAME);
            final TextConsole console =
                (TextConsole) conMgr.createConsole(
                    "Log4j",
                    (ConsoleManager.CreateOptions.TEXT |
                        ConsoleManager.CreateOptions.SCROLLABLE |
                        ConsoleManager.CreateOptions.NO_SYSTEM_OUT_ERR |
                        ConsoleManager.CreateOptions.NO_LINE_EDITTING));
            conMgr.registerConsole(console);

            console.setAcceleratorKeyCode(KeyEvent.VK_F7);
            final VirtualConsoleAppender debugApp =
                new VirtualConsoleAppender(new PatternLayout(LAYOUT), console, false);
            debugApp.setThreshold(Level.DEBUG);
            BootLogInstance.get().setDebugOut(new PrintStream(new WriterOutputStream(console.getOut(), false), true));

            TextConsole atc = new ActiveTextConsole(conMgr);
            final VirtualConsoleAppender infoApp = new VirtualConsoleAppender(
                    new PatternLayout(LAYOUT), atc, false);
            infoApp.setThreshold(Level.INFO);

            // Add the new appenders
View Full Code Here

Examples of org.jnode.driver.console.TextConsole

     *       otherwise to it's 'out' stream.
     */
    public VirtualConsoleAppender(Layout layout, String name, boolean toErr) {
        super();
        this.layout = layout;
        TextConsole console = getNamedConsole(name);
        this.writer = toErr ? console.getErr() : console.getOut();
        super.setWriter(this.writer);
    }
View Full Code Here

Examples of org.jnode.driver.console.TextConsole

            } catch (NameNotFoundException ex) {
                return null;
            }
        }
        try {
            TextConsole res = (TextConsole) mgr.getConsole(name);
            if (res == null) {
                throw new IllegalArgumentException("Unknown console: '" + name + '\'');
            }
            return res;
        } catch (ClassCastException ex) {
View Full Code Here

Examples of org.jnode.driver.console.TextConsole

        err = getError().getPrintWriter();
        Console console = ShellUtils.getCurrentShell().getConsole();
        if (!(console instanceof TextConsole)) {
            err.println(err_not_text);
        }
        TextConsole textConsole = (TextConsole) console;
        if (argReset.isSet()) {
            resetBindings(textConsole);
        } else if (argAdd.isSet()) {
            addBindings(textConsole);
        } else if (argRemove.isSet()) {
View Full Code Here

Examples of org.jnode.driver.console.TextConsole

        try {
            mgr = new TextScreenConsoleManager();
            InitialNaming.bind(ConsoleManager.NAME, mgr);

            // Create the first console
            final TextConsole first = (TextConsole) mgr.createConsole(
                null,
                (ConsoleManager.CreateOptions.TEXT |
                    ConsoleManager.CreateOptions.SCROLLABLE));
            first.setAcceleratorKeyCode(KeyEvent.VK_F1);
            mgr.focus(first);
            System.setOut(new PrintStream(new WriterOutputStream(first.getOut(), false), true));
            System.setErr(new PrintStream(new WriterOutputStream(first.getErr(), false), true));
            System.out.println(VmSystem.getBootLog());
        } catch (ConsoleException ex) {
            throw new PluginException(ex);
        } catch (NamingException ex) {
            throw new PluginException(ex);
View Full Code Here

Examples of org.jnode.driver.console.TextConsole

            return;
        }

        ShellManager sm = InitialNaming.lookup(ShellManager.NAME);
        TextScreenConsoleManager manager = (TextScreenConsoleManager) sm.getCurrentShell().getConsole().getManager();
        TextConsole console = manager.createConsole(
            "editor",
            (ConsoleManager.CreateOptions.TEXT |
                ConsoleManager.CreateOptions.STACKED |
                ConsoleManager.CreateOptions.NO_LINE_EDITTING |
                ConsoleManager.CreateOptions.NO_SYSTEM_OUT_ERR));
View Full Code Here

Examples of org.jnode.driver.console.TextConsole

        TextScreenConsoleManager manager = getParentManager();
        if (manager != null) {
            cm.setParent(manager);
        }
       
        TextConsole console = cm.createConsole(
            null,
            (ConsoleManager.CreateOptions.TEXT |
                ConsoleManager.CreateOptions.SCROLLABLE));
        new Thread(new CommandShell(console), "SwingConsoleCommandShell").start();
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.