LookupElement[] (Expression @NotNull [] params, ExpressionContext context) { Result result = calculateResult(params, context); if (result == null) { return null; } final String[] words = result.toString().split("_"); if (words.length > 1) { List<LookupElement> lookup = new ArrayList<>(); for(int i=0; i<words.length; i++) { String element = StringUtil.join(words, i, words.length, "_"); lookup.add(LookupElementBuilder.create(element)); } return lookup.toArray(LookupElement.EMPTY_ARRAY); } return null; }