Completion provider - stylize/filter lookup elements from other contributors
已回答
From the documentation, it is clear how one would go about filtering lookup elements contributed by other contributors:
- execute `runRemainingContributors`
- use the consumer to check if the already contributed lookup elements are applicable, and
- pass applicable ones with `resultSet.passResult(result)`, where result is the lookup element
I was able to get the filtering of the lookup elements correctly based on it, but how do I stylize one such lookup element differently, say, strike out? FWIW, these are `PrioritizedLookupElement`s, I am dealing with. Calling:
lookupElement.renderElement(lookupPresentation)
after building a lookPresentation object doesn't seem to work. If its style cannot be updated this way, I would build a new PrioritizedLookupElement from the one that was passed in if I could, as long as I can style it the way I want, keeping other properties of the element intact; would that work? How do I go about doing that?
请先登录再写评论。
Does LookupElementDecorator.withRenderer() work?