UX-1 new SearchEverywhere popup

* show all found TopHits anRecent files
This commit is contained in:
Mikhail Sokolov
2018-06-08 13:08:10 +03:00
parent f3f0e32630
commit a714efe43b
2 changed files with 4 additions and 2 deletions
@@ -72,7 +72,7 @@ public class RecentFilesSEContributor extends FileSearchEverywhereContributor {
}
);
return res.size() > elementsLimit
return elementsLimit > 0 && res.size() > elementsLimit
? new ContributorSearchResult<>(res.subList(0, elementsLimit), true)
: new ContributorSearchResult<>(res);
}
@@ -625,7 +625,8 @@ public class SearchEverywhereUI extends BorderLayoutPanel implements Disposable,
} else {
boolean clearBefore = true;
for (SearchEverywhereContributor contributor : getUsedContributors()) {
anyFound |= addContributorItems(contributor, MULTIPLE_CONTRIBUTORS_ELEMENTS_LIMIT, clearBefore);
int count = myServiceContributors.contains(contributor) ? -1 : MULTIPLE_CONTRIBUTORS_ELEMENTS_LIMIT; //show ALL items for service contributors
anyFound |= addContributorItems(contributor, count, clearBefore);
clearBefore = false;
}
}
@@ -698,6 +699,7 @@ public class SearchEverywhereUI extends BorderLayoutPanel implements Disposable,
private List<SearchEverywhereContributor> getUsedContributors() {
SearchEverywhereContributorFilter<String> contributorsFilter =
(SearchEverywhereContributorFilter<String>) myContributorFilters.get(SearchEverywhereManagerImpl.ALL_CONTRIBUTORS_GROUP_ID);
List<SearchEverywhereContributor> contributors = new ArrayList<>(myServiceContributors);
myShownContributors.stream()
.filter(contributor -> contributorsFilter.isSelected(contributor.getSearchProviderId()))