Package org.jboss.aesh.extensions.page

Examples of org.jboss.aesh.extensions.page.SimpleFileParser


    @Override
    public CommandResult execute(CommandInvocation commandInvocation) throws IOException, InterruptedException {
        setCommandInvocation(commandInvocation);
        //make sure to reset loader on each execute
        loader = new SimpleFileParser();
        if(commandInvocation.getShell().in().getStdIn().available() > 0) {
            java.util.Scanner s = new java.util.Scanner(commandInvocation.getShell().in().getStdIn()).useDelimiter("\\A");
            String fileContent = s.hasNext() ? s.next() : "";
            setInput(fileContent);
            afterAttach();
View Full Code Here


    private SimpleFileParser loader;

    public Less(Console console) {
        super();
        setConsole(console);
        loader = new SimpleFileParser();
    }
View Full Code Here

    public void setControlOperator(ControlOperator controlOperator) {
        this.controlOperator = controlOperator;
    }

    public void afterAttach() throws IOException {
        loader = new SimpleFileParser();
        number = new StringBuilder();
        rows = console.getTerminalSize().getHeight();
        int columns = console.getTerminalSize().getWidth();
        page = new MorePage(loader, columns);
View Full Code Here

                if(count < this.page.size())
                    commandInvocation.getShell().out().print(Config.getLineSeparator());
            }

            page.clear();
            loader = new SimpleFileParser();
        }
        else {
            if(!page.hasData()) {
                //display help
            }
View Full Code Here

            commandInvocation.getShell().out().print(Buffer.printAnsi("K"));
            commandInvocation.getShell().out().print(Buffer.printAnsi("1G"));
            commandInvocation.getShell().out().flush();
        }
        page.clear();
        loader = new SimpleFileParser();
    }
View Full Code Here

    @Override
    public CommandResult execute(CommandInvocation commandInvocation) throws IOException {
        this.commandInvocation = commandInvocation;
        this.operator = commandInvocation.getControlOperator();
        loader = new SimpleFileParser();

        if(commandInvocation.getShell().in().getStdIn().available() > 0) {
            java.util.Scanner s = new java.util.Scanner(commandInvocation.getShell().in().getStdIn()).useDelimiter("\\A");
            String fileContent = s.hasNext() ? s.next() : "";
            setInput(fileContent);
View Full Code Here

    private SimpleFileParser loader;

    public Man(Console console) {
        setConsole(console);
        manPages = new ArrayList<ManPage>();
        loader = new SimpleFileParser();
    }
View Full Code Here

                if(count < this.page.size())
                    commandInvocation.getShell().out().print(Config.getLineSeparator());
            }

            page.clear();
            loader = new SimpleFileParser();
        }
        else {
            if(!page.hasData()) {
                //display help
            }
View Full Code Here

            commandInvocation.getShell().out().print(Buffer.printAnsi("K"));
            commandInvocation.getShell().out().print(Buffer.printAnsi("1G"));
            commandInvocation.getShell().out().flush();
        }
        page.clear();
        loader = new SimpleFileParser();
    }
View Full Code Here

    @Override
    public CommandResult execute(CommandInvocation commandInvocation) throws IOException {
        this.commandInvocation = commandInvocation;
        this.operator = commandInvocation.getControlOperator();
        loader = new SimpleFileParser();

        if(commandInvocation.getShell().in().getStdIn().available() > 0) {
            java.util.Scanner s = new java.util.Scanner(commandInvocation.getShell().in().getStdIn()).useDelimiter("\\A");
            String fileContent = s.hasNext() ? s.next() : "";
            setInput(fileContent);
View Full Code Here

TOP

Related Classes of org.jboss.aesh.extensions.page.SimpleFileParser

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.