void (TemplateState state, Project project, Editor editor, LookupElement @NotNull [] elements, Expression expressionNode) { List<TemplateExpressionLookupElement> lookupItems = new ArrayList<>(); for (int i = 0; i < elements.length; i++) { lookupItems.add(new TemplateExpressionLookupElement(state, elements[i], i)); } if (((TemplateManagerImpl)TemplateManager.getInstance(project)).shouldSkipInTests()) { insertSingleItem(editor, lookupItems); } else { for (LookupElement lookupItem : lookupItems) { assert lookupItem != null : expressionNode; } AsyncEditorLoader.performWhenLoaded(editor, () -> runLookup(state, lookupItems, project, editor, expressionNode.getAdvertisingText(), expressionNode.getLookupFocusDegree())); } }