diff --git a/platform/lang-impl/src/com/intellij/ide/actions/searcheverywhere/MultiThreadSearcher.java b/platform/lang-impl/src/com/intellij/ide/actions/searcheverywhere/MultiThreadSearcher.java index 4b0aa490db46..2baef93940a8 100644 --- a/platform/lang-impl/src/com/intellij/ide/actions/searcheverywhere/MultiThreadSearcher.java +++ b/platform/lang-impl/src/com/intellij/ide/actions/searcheverywhere/MultiThreadSearcher.java @@ -112,9 +112,12 @@ class MultiThreadSearcher implements SESearcher { * @return {@link ProgressIndicator} that could be used to track and/or cancel searching process */ @Override - public ProgressIndicator findMoreItems(Map, Collection> alreadyFound, String pattern, - boolean useNonProjectItems, SearchEverywhereContributor contributorToExpand, int newLimit, - Function, SearchEverywhereContributorFilter> filterSupplier) { + public ProgressIndicator findMoreItems(@NotNull Map, Collection> alreadyFound, + @NotNull String pattern, + boolean useNonProjectItems, + @NotNull SearchEverywhereContributor contributorToExpand, + int newLimit, + @NotNull Function, SearchEverywhereContributorFilter> filterSupplier) { ResultsAccumulator accumulator = new ShowMoreResultsAccumulator(alreadyFound, myEqualityProvider, contributorToExpand, newLimit, myListener, myNotificationExecutor); SearchEverywhereContributorFilter filter = filterSupplier.apply(contributorToExpand); ProgressIndicator indicator = new ProgressIndicatorBase(); diff --git a/platform/lang-impl/src/com/intellij/ide/actions/searcheverywhere/SESearcher.java b/platform/lang-impl/src/com/intellij/ide/actions/searcheverywhere/SESearcher.java index f1de0f3c3d9d..3c73eacf4f39 100644 --- a/platform/lang-impl/src/com/intellij/ide/actions/searcheverywhere/SESearcher.java +++ b/platform/lang-impl/src/com/intellij/ide/actions/searcheverywhere/SESearcher.java @@ -10,13 +10,17 @@ import java.util.Map; import java.util.function.Function; interface SESearcher { - ProgressIndicator search(Map, Integer> contributorsAndLimits, String pattern, + ProgressIndicator search(@NotNull Map, Integer> contributorsAndLimits, + @NotNull String pattern, boolean useNonProjectItems, - Function, SearchEverywhereContributorFilter> filterSupplier); + @NotNull Function, SearchEverywhereContributorFilter> filterSupplier); - ProgressIndicator findMoreItems(Map, Collection> alreadyFound, String pattern, - boolean useNonProjectItems, SearchEverywhereContributor contributorToExpand, int newLimit, - Function, SearchEverywhereContributorFilter> filterSupplier); + ProgressIndicator findMoreItems(@NotNull Map, Collection> alreadyFound, + @NotNull String pattern, + boolean useNonProjectItems, + @NotNull SearchEverywhereContributor contributorToExpand, + int newLimit, + @NotNull Function, SearchEverywhereContributorFilter> filterSupplier); /** * Search process listener interface diff --git a/platform/lang-impl/src/com/intellij/ide/actions/searcheverywhere/SingleThreadSearcher.java b/platform/lang-impl/src/com/intellij/ide/actions/searcheverywhere/SingleThreadSearcher.java index 6a52216036ec..db044ad0bc2e 100644 --- a/platform/lang-impl/src/com/intellij/ide/actions/searcheverywhere/SingleThreadSearcher.java +++ b/platform/lang-impl/src/com/intellij/ide/actions/searcheverywhere/SingleThreadSearcher.java @@ -32,8 +32,10 @@ class SingleThreadSearcher implements SESearcher { } @Override - public ProgressIndicator search(Map, Integer> contributorsAndLimits, String pattern, boolean useNonProjectItems, - Function, SearchEverywhereContributorFilter> filterSupplier) { + public ProgressIndicator search(@NotNull Map, Integer> contributorsAndLimits, + @NotNull String pattern, + boolean useNonProjectItems, + @NotNull Function, SearchEverywhereContributorFilter> filterSupplier) { ProgressIndicator indicator = new ProgressIndicatorBase(); Runnable task = new SearchTask(contributorsAndLimits, pattern, useNonProjectItems, filterSupplier, indicator, myNotificationExecutor, myNotificationListener, myEqualityProvider); @@ -43,9 +45,12 @@ class SingleThreadSearcher implements SESearcher { } @Override - public ProgressIndicator findMoreItems(Map, Collection> alreadyFound, String pattern, - boolean useNonProjectItems, SearchEverywhereContributor contributorToExpand, int newLimit, - Function, SearchEverywhereContributorFilter> filterSupplier) { + public ProgressIndicator findMoreItems(@NotNull Map, Collection> alreadyFound, + @NotNull String pattern, + boolean useNonProjectItems, + @NotNull SearchEverywhereContributor contributorToExpand, + int newLimit, + @NotNull Function, SearchEverywhereContributorFilter> filterSupplier) { ProgressIndicator indicator = new ProgressIndicatorBase(); Runnable task = createShowMoreTask(contributorToExpand, newLimit, pattern, useNonProjectItems, alreadyFound, filterSupplier, indicator); ApplicationManager.getApplication().executeOnPooledThread(ConcurrencyUtil.underThreadNameRunnable("SE-SingleThread-SearchTask", task));