mirror of
https://gitflic.ru/project/openide/openide.git
synced 2026-03-22 15:19:59 +07:00
IJPL-425: let IndexUpdateRunner.FileSet contain a set of files, not a collection
GitOrigin-RevId: 80d8d81395210ac38b299c988e8e074d73760b5f
This commit is contained in:
committed by
intellij-monorepo-bot
parent
7af5853f3c
commit
176ab2369e
@@ -6,6 +6,7 @@ import com.intellij.openapi.vfs.VirtualFile
|
||||
import com.intellij.openapi.vfs.VirtualFileWithId
|
||||
import com.intellij.util.indexing.FileBasedIndex
|
||||
import org.jetbrains.annotations.ApiStatus.Internal
|
||||
import java.util.Objects
|
||||
|
||||
@Internal
|
||||
class FileIndexingRequest private constructor(
|
||||
@@ -13,6 +14,14 @@ class FileIndexingRequest private constructor(
|
||||
val file: VirtualFile,
|
||||
val fileId: Int = FileBasedIndex.getFileId(file),
|
||||
) {
|
||||
override fun equals(other: Any?): Boolean {
|
||||
return other is FileIndexingRequest && isDeleteRequest == other.isDeleteRequest && fileId == other.fileId
|
||||
}
|
||||
|
||||
override fun hashCode(): Int {
|
||||
return Objects.hash(isDeleteRequest, fileId)
|
||||
}
|
||||
|
||||
companion object {
|
||||
private val LOG = Logger.getInstance(FileIndexingRequest::class.java)
|
||||
|
||||
|
||||
@@ -55,7 +55,8 @@ class IndexUpdateRunner(fileBasedIndex: FileBasedIndexImpl,
|
||||
*/
|
||||
class IndexingInterruptedException(cause: Throwable) : Exception(cause)
|
||||
|
||||
class FileSet(project: Project, val debugName: String, internal val files: Collection<FileIndexingRequest>) {
|
||||
class FileSet(project: Project, val debugName: String, internal val files: Set<FileIndexingRequest>) {
|
||||
constructor(project: Project, debugName: String, files: Collection<FileIndexingRequest>) : this(project, debugName, files.toSet())
|
||||
val statistics: IndexingFileSetStatistics = IndexingFileSetStatistics(project, debugName)
|
||||
|
||||
fun isEmpty(): Boolean = files.isEmpty()
|
||||
|
||||
Reference in New Issue
Block a user