LookupElement (IdeaPlugin plugin) { final String displayName = getDisplayName(plugin); LookupElementBuilder builder = LookupElementBuilder.create(Objects.requireNonNull(getPsiElement(plugin)), displayName) .withIcon(ElementPresentationManager.getIconForClass(ContentDescriptor.ModuleDescriptor.class)) .withBoldness(isSubDescriptor(displayName)) .withTypeText(plugin.getPackage().getStringValue()); Double priority = plugin.getUserData(LOOKUP_PRIORITY); return priority != null ? PrioritizedLookupElement.withPriority(builder, priority) : builder; }