Package henplus.view.util

Examples of henplus.view.util.SortedMatchIterator


        if (argc > 2 || argc == 2 && lastWord.length() == 0) {
            return null;
        }

        final Iterator<String> it = disp.getRegisteredCommandNames(lastWord);
        return new SortedMatchIterator(lastWord, it) {

            @Override
            protected boolean exclude(final String cmdName) {
                final Command cmd = disp.getCommandFrom(cmdName);
                return cmd.getLongDescription(cmdName) == null;
View Full Code Here


                return holder.completeValue(lastWord);
            }
            return null;
        }

        return new SortedMatchIterator(lastWord, getRegistry().getPropertyMap());
    }
View Full Code Here

                    alreadyGiven.add(st.nextToken());
                }
            }

            // ok, now return the list.
            return new SortedMatchIterator(lastWord, _aliases) {

                @Override
                protected boolean exclude(final String current) {
                    return alreadyGiven.contains(current);
                }
View Full Code Here

    public Iterator<String> complete(final CommandDispatcher disp, final String partialCommand, final String lastWord) {
        if (partialCommand.startsWith("connect")) {
            if (argumentCount(partialCommand) > ("".equals(lastWord) ? 1 : 2)) {
                return null;
            }
            return new SortedMatchIterator(lastWord, _knownUrls);
        } else if (partialCommand.startsWith("switch")) {
            if (argumentCount(partialCommand) > ("".equals(lastWord) ? 1 : 2)) {
                return null;
            }
            return new SortedMatchIterator(lastWord, _sessionManager.getSessionNames()) {

                @Override
                protected boolean exclude(final String sessionName) {
                    return sessionName.equals(_currentSessionName);
                }
View Full Code Here

        }
        // do not complete beyond first word.
        if (argc > ("".equals(lastWord) ? 0 : 1)) {
            return null;
        }
        return new SortedMatchIterator(lastWord, _plugins);
    }
View Full Code Here

        }
        // do not complete beyond first word.
        if (argc > ("".equals(lastWord) ? 0 : 1)) {
            return null;
        }
        return new SortedMatchIterator(lastWord, _drivers);
    }
View Full Code Here

        final String prefix = hasBrace ? "${" : "$";
        final String postfix = hasBrace ? "}" : "";
        final String name = variable.substring(prefix.length());
        // HenPlus.msg().println("VAR: " + variable);
        // HenPlus.msg().println("NAME: " + name);
        final SortedMatchIterator it = new SortedMatchIterator(name, _variables);
        it.setPrefix(prefix);
        it.setSuffix(postfix);
        return it;
    }
View Full Code Here

             */
            while (st.hasMoreElements()) {
                alreadyGiven.add(st.nextToken());
            }
        }
        return new SortedMatchIterator(lastWord, _variables) {

            @Override
            protected boolean exclude(final String current) {
                return alreadyGiven.contains(current);
            }
View Full Code Here

TOP

Related Classes of henplus.view.util.SortedMatchIterator

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.