LookupElement (@NotNull PsiElement targetElement, @NotNull String id, @Nullable Module module, @Nullable String mark) { LookupElementBuilder element = LookupElementBuilder.create(targetElement, id); if (module != null) { element = element.withTypeText(module.getName(), ModuleType.get(module).getIcon(), false).withTypeIconRightAligned(true); } if (mark != null) { element = element.withTailText(" {" + mark + "}", true); } return element; }