void (final Project project, final Editor editor, final PsiFile file, @NotNull Map<TemplateImpl, String> matchingTemplates, @NotNull MultiMap<String, CustomLiveTemplateLookupElement> customTemplatesLookupElements) { LookupImpl lookup = (LookupImpl)LookupManager.getInstance(project).createLookup(editor, LookupElement.EMPTY_ARRAY, "", new TemplatesArranger()); for (Map.Entry<TemplateImpl, String> entry : matchingTemplates.entrySet()) { TemplateImpl template = entry.getKey(); lookup.addItem(createTemplateElement(template), new PlainPrefixMatcher(StringUtil.notNullize(entry.getValue()))); } for (Map.Entry<String, Collection<CustomLiveTemplateLookupElement>> entry : customTemplatesLookupElements.entrySet()) { for (CustomLiveTemplateLookupElement lookupElement : entry.getValue()) { lookup.addItem(lookupElement, new PlainPrefixMatcher(entry.getKey())); } } showLookup(lookup, file); }