Package com.dci.intellij.dbn.code.common.completion

Examples of com.dci.intellij.dbn.code.common.completion.CodeCompletionContext


import javax.swing.Icon;

public abstract class LookupItemFactory implements Disposable {
    public DBLookupItem createLookupItem(Object source, CodeCompletionLookupConsumer consumer) {
        CodeCompletionContext context = consumer.getContext();

        CharSequence text = getText(context);
        if (text != null) {
            Icon icon = getIcon();

            String textHint = getTextHint();
            boolean bold = isBold();

            DBLookupItem lookupItem;
            CodeCompletionSortingSettings sortingSettings = context.getCodeCompletionSettings().getSortingSettings();
            if (sortingSettings.isEnabled()) {
                int sortingIndex = sortingSettings.getSortingIndexFor(this);
                lookupItem = new DBLookupItem(source, icon, text.toString(), textHint, bold, sortingIndex);
            } else {
                lookupItem = new DBLookupItem(source, icon, text.toString(), textHint, bold);
            }
            context.getResult().addElement(lookupItem);
            return lookupItem;
        }

        return null;
    }
View Full Code Here

TOP

Related Classes of com.dci.intellij.dbn.code.common.completion.CodeCompletionContext

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.