void (@NotNull ProjectScanningHistoryImpl scanningHistory, @NotNull CheckCancelOnlyProgressIndicator indicator, @NotNull IndexingProgressReporter progressReporter, @NotNull Ref<StatusMark> markRef) { try { if (!IndexInfrastructure.hasIndices()) { return; } scanUnindexedFiles(scanningHistory, indicator, progressReporter, markRef); } finally { // Scanning may throw exception (or error). // In this case, we should either clear or flush the indexing queue; otherwise, dumb mode will not end in the project. if (flushQueueAfterScanning) { flushPerProjectIndexingQueue(scanningHistory.getScanningReason(), indicator); } ((UserDataHolderEx)myProject).replace(FIRST_SCANNING_REQUESTED, FirstScanningState.REQUESTED, FirstScanningState.PERFORMED); } }