void (@NotNull Project project, @NotNull List<? extends RootsChangeRescanningInfo> changes) { if (!(FileBasedIndex.getInstance() instanceof FileBasedIndexImpl)) return; if (LightEdit.owns(project)) return; if (!UnindexedFilesScanner.isFirstProjectScanningRequested(project)) return; if (changes.isEmpty()) { runFullRescan(project, "Project roots have changed"); } if (DumbServiceImpl.isSynchronousTaskExecution()) { doIndexChanges(project, changes); } else { ApplicationManager.getApplication().executeOnPooledThread(() -> doIndexChanges(project, changes)); } }