LookupElement () { LookupElementBuilder lookupElement = LookupElementBuilder.create(this, getPresentation()) .withTypeText(getTypeHint()) .withIcon(getIcon()); if (!isIsStandard()) { lookupElement = lookupElement.withInsertHandler( (context, item) -> context.getDocument().replaceString(context.getStartOffset(), context.getTailOffset(), getValue())); } return PrioritizedLookupElement.withPriority(lookupElement, getPriority()); }