Package org.apache.felix.karaf.shell.console

Examples of org.apache.felix.karaf.shell.console.Completer


        if (argIndex < 0) {
            return -1;
        }

        final Completer comp;

        // if we are beyond the end of the completors, just use the last one
        if (argIndex >= completers.length) {
            comp = completers[completers.length - 1];
        } else {
            comp = completers[argIndex];
        }

        // ensure that all the previous completors are successful before
        // allowing this completor to pass (only if strict is true).
        for (int i = 0; getStrict() && (i < argIndex); i++) {
            Completer sub = completers[(i >= completers.length) ? (completers.length - 1) : i];
            String[] args = list.getArguments();
            String arg = ((args == null) || (i >= args.length)) ? "" : args[i];

            List<String> subCandidates = new LinkedList<String>();

            if (sub.complete(arg, arg.length(), subCandidates) == -1) {
                return -1;
            }

            if (subCandidates.size() == 0) {
                return -1;
View Full Code Here

TOP

Related Classes of org.apache.felix.karaf.shell.console.Completer

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.