Package jline

Examples of jline.FileNameCompletor


        try {
            final StreamManager streamManager = new StreamManager(out, err, lineSep);

            final ConsoleReader reader = new ConsoleReader(sin, streamManager.getSout());
            reader.addCompletor(new FileNameCompletor());
            reader.addCompletor(new SimpleCompletor(COMMANDS.keySet().toArray(new String[COMMANDS.size()])));
            // TODO : add completers

            String line;
            StringBuilder builtWelcome = new StringBuilder("Apache OpenEJB ")
View Full Code Here


        this.shell = shell;
        completors = new HashMap<String, Completor[]>();
        completors.put("help", new Completor[]{commandCompletor, commandCompletor, new NullCompletor()});   
        completors.put("install", new Completor[]{commandCompletor, new InstallCompletor(shell)});   
        completors.put("installed", new Completor[]{commandCompletor, new ICURICompletor(shell), new NullCompletor()});   
        completors.put("load", new Completor[]{commandCompletor, new FileNameCompletor(), new NullCompletor()});   
        completors.put("remove", new Completor[]{commandCompletor, new ICURICompletor(shell), new NullCompletor()});   
        completors.put("run", new Completor[]{commandCompletor, new FileNameCompletor(), new NullCompletor()});   
        completors.put("save", new Completor[]{commandCompletor, new FileNameCompletor(), new NullCompletor()});   
        completors.put("start", new Completor[]{commandCompletor, new ICURICompletor(shell), new CompositeURICompletor(shell), new NullCompletor()});   
        completors.put("status", new Completor[]{commandCompletor, new ICURICompletor(shell), new CompositeURICompletor(shell), new NullCompletor()});   
        completors.put("stop", new Completor[]{commandCompletor, new ICURICompletor(shell), new CompositeURICompletor(shell), new NullCompletor()});   
    }
View Full Code Here

        return helpText.toString();
    }

    @Override
    public Completor[] getCompletors() {
        return new Completor[]{new ICURICompletor(shell), new FileNameCompletor(), new NullCompletor()};
    }
View Full Code Here

        completors = new HashMap<String, Completor[]>();
        completors.put("help", new Completor[]{commandCompletor, commandCompletor, new NullCompletor()});   
        completors.put("install", new Completor[]{commandCompletor, new InstallCompletor(shell)});   
        completors.put("installed", new Completor[]{commandCompletor, new ICURICompletor(shell), new NullCompletor()});   
        completors.put("invoke", new Completor[]{commandCompletor, new ServiceCompletor(shell), new ServiceOperationCompletor(shell), new NullCompletor()});   
        completors.put("load", new Completor[]{commandCompletor, new FileNameCompletor(), new NullCompletor()});   
        completors.put("remove", new Completor[]{commandCompletor, new ICURICompletor(shell), new NullCompletor()});   
        completors.put("run", new Completor[]{commandCompletor, new FileNameCompletor(), new NullCompletor()});   
        completors.put("save", new Completor[]{commandCompletor, new FileNameCompletor(), new NullCompletor()});   
        completors.put("start", new Completor[]{commandCompletor, new ICURICompletor(shell), new CompositeURICompletor(shell), new RemoteNodeCompletor(shell), new NullCompletor()});   
        completors.put("started", new Completor[]{commandCompletor, new ICURICompletor(shell), new CompositeURICompletor(shell), new NullCompletor()});   
        completors.put("stop", new Completor[]{commandCompletor, new ICURICompletor(shell), new CompositeURICompletor(shell), new NullCompletor()});   
       
        for (Command c : shell.getCommands().values()) {
View Full Code Here

        try {
            final StreamManager streamManager = new StreamManager(out, err, lineSep);

            final ConsoleReader reader = new ConsoleReader(sin, streamManager.getSout());
            reader.addCompletor(new FileNameCompletor());
            reader.addCompletor(new SimpleCompletor(COMMANDS.keySet().toArray(new String[COMMANDS.size()])));
            // TODO : add completers

            String line;
            final StringBuilder builtWelcome = new StringBuilder("Apache OpenEJB ")
View Full Code Here

    cr.setHistory(new History(new File(historyFile)));
   
    // set completer with list of words
    Completor[] comp = new Completor[]{
            new SimpleCompletor(getCommandsAsArray()),
            new FileNameCompletor()
        };
    cr.addCompletor (new ArgumentCompletor(comp));

    // main input loop
    luceneMethods = new LuceneMethods(DEFAULT_INDEX);
View Full Code Here

        completors = new HashMap<String, Completor[]>();
        completors.put("help", new Completor[]{commandCompletor, commandCompletor, new NullCompletor()});   
        completors.put("install", new Completor[]{commandCompletor, new InstallCompletor(shell)});   
        completors.put("installed", new Completor[]{commandCompletor, new ICURICompletor(shell), new NullCompletor()});   
        completors.put("invoke", new Completor[]{commandCompletor, new ServiceCompletor(shell), new ServiceOperationCompletor(shell), new NullCompletor()});   
        completors.put("load", new Completor[]{commandCompletor, new FileNameCompletor(), new NullCompletor()});   
        completors.put("remove", new Completor[]{commandCompletor, new ICURICompletor(shell), new NullCompletor()});   
        completors.put("run", new Completor[]{commandCompletor, new FileNameCompletor(), new NullCompletor()});   
        completors.put("save", new Completor[]{commandCompletor, new FileNameCompletor(), new NullCompletor()});   
        completors.put("start", new Completor[]{commandCompletor, new ICURICompletor(shell), new CompositeURICompletor(shell), new NullCompletor()});   
        completors.put("started", new Completor[]{commandCompletor, new ICURICompletor(shell), new CompositeURICompletor(shell), new NullCompletor()});   
        completors.put("stop", new Completor[]{commandCompletor, new ICURICompletor(shell), new CompositeURICompletor(shell), new NullCompletor()});   
    }
View Full Code Here

            System.err.println("Pass the base url as parameter");
            return;
        }

        final ConsoleReader reader = new ConsoleReader(System.in, new OutputStreamWriter(System.out));
        reader.addCompletor(new FileNameCompletor());
        reader.addCompletor(new SimpleCompletor(CommandManager.keys().toArray(new String[CommandManager.size()])));

        String line;
        while ((line = reader.readLine(PROMPT)) != null) {
            if (EXIT_CMD.equals(line)) {
View Full Code Here

            System.err.println("Pass the base url as parameter");
            return;
        }

        final ConsoleReader reader = new ConsoleReader(System.in, new OutputStreamWriter(System.out));
        reader.addCompletor(new FileNameCompletor());
        reader.addCompletor(new SimpleCompletor(CommandManager.keys().toArray(new String[CommandManager.size()])));

        String line;
        while ((line = reader.readLine(PROMPT)) != null) {
            if (EXIT_CMD.equals(line)) {
View Full Code Here

        try {
            final StreamManager streamManager = new StreamManager(out, err, lineSep);

            final ConsoleReader reader = new ConsoleReader(sin, streamManager.getSout());
            reader.addCompletor(new FileNameCompletor());
            reader.addCompletor(new SimpleCompletor(COMMANDS.keySet().toArray(new String[COMMANDS.size()])));
            // TODO : add completers

            String line;
            final StringBuilder builtWelcome = new StringBuilder("Apache OpenEJB ")
View Full Code Here

TOP

Related Classes of jline.FileNameCompletor

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.