public static void findUsages(@NotNull FindModel findModel,
                                @NotNull Project project,
                                @NotNull FindUsagesProcessPresentation processPresentation,
                                @NotNull Set<? extends @NotNull VirtualFile> filesToStart,
                                @NotNull Processor<? super UsageInfo> consumer) {
    Runnable runnable = () -> new FindInProjectTask(findModel, project, filesToStart, true).findUsages(processPresentation, consumer);
    if (ProgressIndicatorProvider.getGlobalProgressIndicator() == null) {
      ProgressManager.getInstance().runProcess(runnable, new EmptyProgressIndicator());
    }
    else {
      runnable.run();
    }
  }
public static void findUsages(@NotNull FindModel findModel,
                                @NotNull Project project,
                                @NotNull FindUsagesProcessPresentation processPresentation,
                                @NotNull Set<? extends @NotNull VirtualFile> filesToStart,
                                @NotNull Processor<? super UsageInfo> consumer)