LookupElementBuilder (@NotNull T item) { LookupElementBuilder builder = LookupElementBuilder.create(item, getLookupString(item)) .withIcon(getIcon(item)); InsertHandler<LookupElement> handler = createInsertHandler(item); if (handler != null) { builder = builder.withInsertHandler(handler); } String tailText = getTailText(item); if (tailText != null) { builder = builder.withTailText(tailText, true); } String typeText = getTypeText(item); if (typeText != null) { builder = builder.withTypeText(typeText); } return builder; }