void (@NotNull String pattern, @NotNull ProgressIndicator progressIndicator, @NotNull Processor<? super FoundItemDescriptor<Object>> consumer) { Function<PsiElement, TargetPresentation> calculator = createCalculator(); myDelegate.fetchWeightedElements(pattern, progressIndicator, descriptor -> { FoundItemDescriptor<Object> presentationDescriptor = element2presentation(descriptor, calculator); return consumer.process(presentationDescriptor); }); }