Result (ExpressionContext context) { LookupElement[] lookupItems = calculateLookupItems(context); if (lookupItems.length == 0) return new TextResult(""); return new TextResult(lookupItems[0].getLookupString()); }