Package org.apache.karaf.shell.support.completers

Examples of org.apache.karaf.shell.support.completers.AggregateCompleter$Completion


                }
            }
            if (!subShell.equals(Session.SCOPE_GLOBAL)) {
                completers.add(new StringsCompleter(new String[] { "exit" }));
            }
            int res = new AggregateCompleter(completers).complete(session, commandLine, candidates);
            Collections.sort(candidates);
            return res;
        }

        // FIRST mode
        if (Session.COMPLETION_MODE_FIRST.equalsIgnoreCase(completion)) {
            if (!subShell.isEmpty()) {
                List<Completer> completers = new ArrayList<Completer>();
                for (String name : allCompleters[1].keySet()) {
                    if (name.startsWith(subShell + ":")) {
                        completers.add(allCompleters[1].get(name));
                    }
                }
                int res = new AggregateCompleter(completers).complete(session, commandLine, candidates);
                if (!candidates.isEmpty()) {
                    Collections.sort(candidates);
                    return res;
                }
            }
            List<Completer> compl = new ArrayList<Completer>();
            compl.add(aliasesCompleter);
            compl.addAll(allCompleters[0].values());
            int res = new AggregateCompleter(compl).complete(session, commandLine, candidates);
            Collections.sort(candidates);
            return res;
        }

        List<Completer> compl = new ArrayList<Completer>();
        compl.add(aliasesCompleter);
        compl.addAll(allCompleters[0].values());
        int res = new AggregateCompleter(compl).complete(session, commandLine, candidates);
        Collections.sort(candidates);
        return res;
    }
View Full Code Here

TOP

Related Classes of org.apache.karaf.shell.support.completers.AggregateCompleter$Completion

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.