public interface ChooseByNameWeightedItemProvider extends ChooseByNameItemProvider
Modifier and Type | Method and Description |
---|---|
boolean |
filterElementsWithWeights(ChooseByNameBase base,
java.lang.String pattern,
boolean everywhere,
ProgressIndicator indicator,
Processor<? super FoundItemDescriptor<?>> consumer)
Searches for elements that match specified filters and returns also their weights.
|
filterElements, filterNames
boolean filterElementsWithWeights(ChooseByNameBase base, java.lang.String pattern, boolean everywhere, ProgressIndicator indicator, Processor<? super FoundItemDescriptor<?>> consumer)
FoundItemDescriptor
wrapper that contains found item and its weight.
Method should be used when receiver wants to sort found items by itself (for example when they should be mixed with results from other providers)pattern
- string pattern for searcheverywhere
- indicates if search should be preformed only in project files or external resources (like libraries and other) should be includedindicator
- ProgressIndicator
which could be used to cancel search processconsumer
- consumer for process all found items. Takes instances of FoundItemDescriptor
wrapper,
which contains also item's wightstrue
if all found items were processed. If consumer
returns false
for any of them search will be
stopped and method will return false
FoundItemDescriptor