Package henplus.view.util

Examples of henplus.view.util.NameCompleter


    public Iterator<String> completeAllColumns(final String partialColumn) {
        final SQLSession session = _henplus.getCurrentSession();
        if (session == null) {
            return null;
        }
        final NameCompleter completer = getAllColumnsCompleter(session);
        return completer.getAlternatives(partialColumn);
    }
View Full Code Here


                    if ("*".equals(nextToken)) {
                        iter = objectLister.getTableNamesIteratorForSession(first);
                    } else if (nextToken.indexOf('*') > -1) {
                        final String tablePrefix = nextToken.substring(0, nextToken.length() - 1);
                        final NameCompleter compl = new NameCompleter(tablesOne);
                        iter = compl.getAlternatives(tablePrefix);
                    }

                    while (iter.hasNext()) {
                        final String objTableName = iter.next();
                        count = diffConditionally(objTableName, colNameIgnoreCase, first, second, tablesTwo, alreadyDiffed,
View Full Code Here

            }
            return quotedString;
        }

        private Iterator<String> getCommandCompleter(final String partial) {
            final NameCompleter completer = new NameCompleter();
            // first: check for must have parameters; then rest.
            if (_config.getFilename() == null) {
                completer.addName("from");
            } else if (_config.getTable() == null) {
                completer.addName("into");
            } else if (_config.getColumns() == null) {
                completer.addName("columns");
            } else {
                if (_config.getColDelimiter() == null) {
                    completer.addName("column-delim");
                }
                if (_config.getRowDelimiter() == null) {
                    completer.addName("row-delim");
                }
                if (_config.getEncoding() == null) {
                    completer.addName("encoding");
                }
                if (_config.getStartRow() < 0) {
                    completer.addName("start-row");
                }
                if (_config.getRowCount() < 0) {
                    completer.addName("row-count");
                    completer.addName("end-row");
                }
            }
            return completer.getAlternatives(partial);
        }
View Full Code Here

     * Used from several commands that need session name completion.
     */
    public Iterator<String> completeSessionName(final String partialSession) {
        Iterator<String> result = null;
        if (_sessions != null) {
            final NameCompleter completer = new NameCompleter(getSessionNames());
            Logger.debug("[SessionManager.completeSessionName] created completer for sessionnames '%s'", getSessionNames()
                    .toString());
            result = completer.getAlternatives(partialSession);
        }
        return result;
    }
View Full Code Here

TOP

Related Classes of henplus.view.util.NameCompleter

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.