public final synchronized void collectItems(@NotNull DataContext dataContext,
                                              @NotNull List<RunAnythingItem> model,
                                              @NotNull String pattern) {
    SearchResult result = getItems(dataContext, model, pattern, getMaxInitialItems());

    ProgressManager.checkCanceled();
    if (!result.isEmpty()) {
      myTitleIndex = model.size();
      model.addAll(result);
      myMoreIndex = result.myNeedMore ? model.size() - 1 : -1;
    }
  }
public final synchronized void collectItems(@NotNull DataContext dataContext,
                                              @NotNull List<RunAnythingItem> model,
                                              @NotNull String pattern)