Examples of withIcon()


Examples of com.intellij.codeInsight.lookup.LookupElementBuilder.withIcon()

    LookupElementBuilder builder = LookupElementBuilder.create(info, componentName);
    if (info.getLibraryId() != null) {
      builder = builder.withTailText(info.getLibraryId(), true);
    }
    if (info.getType() != null) {
      builder = builder.withIcon(info.getType().getIcon());
    }
    return builder.withInsertHandler(MY_INSERT_HANDLER);
  }

  private static final InsertHandler<LookupElement> MY_INSERT_HANDLER = new InsertHandler<LookupElement>() {
View Full Code Here

Examples of com.intellij.codeInsight.lookup.LookupElementBuilder.withIcon()

    private void buildLookupElements(CompletionResultSet completionResultSet, QueryBuilderScopeContext collect) {
        for(Map.Entry<String, QueryBuilderPropertyAlias> entry: collect.getPropertyAliasMap().entrySet()) {
            DoctrineModelField field = entry.getValue().getField();
            LookupElementBuilder lookup = LookupElementBuilder.create(entry.getKey());
            lookup = lookup.withIcon(Symfony2Icons.DOCTRINE);
            if(field != null) {
                lookup = lookup.withTypeText(field.getTypeName(), true);

                if(field.getRelationType() != null) {
                    lookup = lookup.withTailText("(" + field.getRelationType() + ")", true);
View Full Code Here

Examples of com.intellij.codeInsight.lookup.LookupElementBuilder.withIcon()

                lookup = lookup.withTypeText(field.getTypeName(), true);

                if(field.getRelationType() != null) {
                    lookup = lookup.withTailText("(" + field.getRelationType() + ")", true);
                    lookup = lookup.withTypeText(field.getRelation(), true);
                    lookup = lookup.withIcon(PhpIcons.CLASS_ICON);
                } else {
                    // relation tail text wins
                    String column = field.getColumn();
                    if(column != null) {
                        lookup = lookup.withTailText("(" + column + ")", true);
View Full Code Here

Examples of com.intellij.codeInsight.lookup.LookupElementBuilder.withIcon()

        if(nodeVars.containsKey(nodeName)) {
            lookupElementBuilder = lookupElementBuilder.withTypeText(StringUtil.shortenTextWithEllipsis(nodeVars.get(nodeName), 100, 0), true);
        }

        if(isShortcut) {
            lookupElementBuilder = lookupElementBuilder.withIcon(Symfony2Icons.CONFIG_VALUE_SHORTCUT);
        }

        return lookupElementBuilder;
    }
View Full Code Here

Examples of com.intellij.codeInsight.lookup.LookupElementBuilder.withIcon()

        if(prototype) {
            lookupElementBuilder = lookupElementBuilder.withTypeText("Prototype", true);
        }

        if(isShortcut) {
            lookupElementBuilder = lookupElementBuilder.withIcon(Symfony2Icons.CONFIG_VALUE_SHORTCUT);
        }

        return lookupElementBuilder;
    }
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. 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.