I'd like to move towards making my completions more responsive by passing elements to the CompletionResultSet as I generate them, rather than batching them up and sending them all at once, getVariants style. There's one case which makes this tricky - in some cases I iterate a lot of indexes generating the lookups, and I have to collate them somewhat to produce a tail text which says " in <location>, <location>...". Concretely, this is for lookup elements corresponding to methods - the lookup text is the name of the method and the args, but I'd like the tail text to show all locations that a method with that signature was found in. However this basically means that that cannot be asynchronous, it has to wait until all methods have been iterated before I can add that lookup to the result set.
Is it possible to hold on to the LookupElements for these methods after I pass them to the CompletionResultSet and update the tail text later? Would that then be updated in the UI? If not, is there any other way to achieve this?