mirror of
https://gitflic.ru/project/openide/openide.git
synced 2026-09-27 10:03:11 +07:00
Make inspections happy without changing logic
GitOrigin-RevId: 865695ea6f8a28354f4c736cc6f625e174c78928
This commit is contained in:
committed by
intellij-monorepo-bot
parent
8c13398318
commit
86cfe58290
+5
-5
@@ -16,7 +16,7 @@ import com.intellij.util.indexing.roots.origin.IndexingUrlRootHolder
|
||||
import com.intellij.util.indexing.roots.origin.ModuleRootOriginImpl
|
||||
|
||||
/**
|
||||
* @param rootHolder is null when iterator should just iterate all files in module, no explicit root list
|
||||
* @param rootHolder is null when iterator should just iterate all files in [module], no explicit root list
|
||||
*/
|
||||
internal class ModuleIndexableFilesIteratorImpl private constructor(private val module: Module,
|
||||
rootHolder: IndexingRootHolder?,
|
||||
@@ -34,10 +34,10 @@ internal class ModuleIndexableFilesIteratorImpl private constructor(private val
|
||||
fun createIterators(module: Module, urlRoots: IndexingUrlRootHolder): Collection<IndexableFilesIterator> {
|
||||
val roots = urlRoots.toRootHolder()
|
||||
if (roots.isEmpty()) return emptyList()
|
||||
// 100 is a totally magic constant here, designed to help Rider to avoid indexing all non-recursive roots with one iterator => on a
|
||||
// single thread
|
||||
// 100 is a totally magic constant here, designed to help Rider to avoid indexing all non-recursive roots with one iterator,
|
||||
// which results in indexing on a single thread
|
||||
if (roots.size() > 100) {
|
||||
return roots.split(100).map { rootSublists -> ModuleIndexableFilesIteratorImpl(module, rootSublists, true) }
|
||||
return roots.split(100).map { rootSublist -> ModuleIndexableFilesIteratorImpl(module, rootSublist, true) }
|
||||
}
|
||||
return setOf(ModuleIndexableFilesIteratorImpl(module, roots, true))
|
||||
}
|
||||
@@ -99,7 +99,7 @@ internal class ModuleIndexableFilesIteratorImpl private constructor(private val
|
||||
}
|
||||
return nonRecursiveRoots?.all { root ->
|
||||
if (runReadAction { index.isInContent(root) } && fileFilter.accept(root)) fileIterator.processFile(root) else true
|
||||
} ?: true
|
||||
} != false
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user