IntPredicate (@Nullable Project project) { boolean dumb = ActionUtil.isDumbMode(project); if (!dumb) return f -> true; if (DumbServiceImpl.ALWAYS_SMART && project != null && UnindexedFilesUpdater.isIndexUpdateInProgress(project)) { return f -> true; } DumbModeAccessType dumbModeAccessType = getCurrentDumbModeAccessType(); if (dumbModeAccessType == null) { //throw new IllegalStateException("index access is not allowed in dumb mode"); return __ -> true; } if (dumbModeAccessType == DumbModeAccessType.RAW_INDEX_DATA_ACCEPTABLE) return f -> true; assert dumbModeAccessType == DumbModeAccessType.RELIABLE_DATA_ONLY; return fileId -> !getChangedFilesCollector().containsFileId(fileId); }