diff --git a/platform/lang-impl/src/com/intellij/util/indexing/roots/IndexableFilesProvider.java b/platform/lang-impl/src/com/intellij/util/indexing/roots/IndexableFilesProvider.java index 28b8d0b6b750..5cfc4e37dfb7 100644 --- a/platform/lang-impl/src/com/intellij/util/indexing/roots/IndexableFilesProvider.java +++ b/platform/lang-impl/src/com/intellij/util/indexing/roots/IndexableFilesProvider.java @@ -16,6 +16,11 @@ import org.jetbrains.annotations.ApiStatus; @ApiStatus.Internal public interface IndexableFilesProvider { + /** + * Presentable name that can be shown in logs and used for debugging purposes. + */ + String getDebugName(); + /** * Presentable text shown in progress indicator during indexing of files of this provider. */ diff --git a/platform/lang-impl/src/com/intellij/util/indexing/roots/IndexableSetContributorFilesProvider.kt b/platform/lang-impl/src/com/intellij/util/indexing/roots/IndexableSetContributorFilesProvider.kt index a386f0dcc773..fb29c4ec44a5 100644 --- a/platform/lang-impl/src/com/intellij/util/indexing/roots/IndexableSetContributorFilesProvider.kt +++ b/platform/lang-impl/src/com/intellij/util/indexing/roots/IndexableSetContributorFilesProvider.kt @@ -10,6 +10,7 @@ import com.intellij.util.indexing.IndexableSetContributor import com.intellij.util.indexing.IndexingBundle internal class IndexableSetContributorFilesProvider(private val indexableSetContributor: IndexableSetContributor) : IndexableFilesProvider { + override fun getDebugName() = getName() ?: indexableSetContributor.toString() override fun getIndexingProgressText(): String { val name = getName() diff --git a/platform/lang-impl/src/com/intellij/util/indexing/roots/LibraryIndexableFilesProvider.kt b/platform/lang-impl/src/com/intellij/util/indexing/roots/LibraryIndexableFilesProvider.kt index 1d9e0fb2e852..9e4c00e93df4 100644 --- a/platform/lang-impl/src/com/intellij/util/indexing/roots/LibraryIndexableFilesProvider.kt +++ b/platform/lang-impl/src/com/intellij/util/indexing/roots/LibraryIndexableFilesProvider.kt @@ -10,6 +10,8 @@ import com.intellij.util.containers.ConcurrentBitSet import com.intellij.util.indexing.IndexingBundle internal class LibraryIndexableFilesProvider(val library: Library) : IndexableFilesProvider { + override fun getDebugName() = library.name.takeUnless { it.isNullOrEmpty() } ?: library.toString() + override fun getIndexingProgressText(): String? { val libraryName = library.name if (!libraryName.isNullOrEmpty()) { diff --git a/platform/lang-impl/src/com/intellij/util/indexing/roots/ModuleIndexableFilesProvider.kt b/platform/lang-impl/src/com/intellij/util/indexing/roots/ModuleIndexableFilesProvider.kt index f07e02e7523b..b6948ac93768 100644 --- a/platform/lang-impl/src/com/intellij/util/indexing/roots/ModuleIndexableFilesProvider.kt +++ b/platform/lang-impl/src/com/intellij/util/indexing/roots/ModuleIndexableFilesProvider.kt @@ -11,6 +11,8 @@ import com.intellij.util.containers.ConcurrentBitSet import com.intellij.util.indexing.IndexingBundle internal class ModuleIndexableFilesProvider(val module: Module) : IndexableFilesProvider { + override fun getDebugName() = module.name + override fun getIndexingProgressText() = IndexingBundle.message("indexable.files.provider.indexing.module.name", module.name) override fun getRootsScanningProgressText() = IndexingBundle.message("indexable.files.provider.scanning.module.name", module.name) diff --git a/platform/lang-impl/src/com/intellij/util/indexing/roots/SdkIndexableFilesProvider.kt b/platform/lang-impl/src/com/intellij/util/indexing/roots/SdkIndexableFilesProvider.kt index 2a258ce3fa73..622ee4eb37c0 100644 --- a/platform/lang-impl/src/com/intellij/util/indexing/roots/SdkIndexableFilesProvider.kt +++ b/platform/lang-impl/src/com/intellij/util/indexing/roots/SdkIndexableFilesProvider.kt @@ -12,6 +12,8 @@ import org.jetbrains.annotations.ApiStatus @ApiStatus.Internal class SdkIndexableFilesProvider(val sdk: Sdk) : IndexableFilesProvider { + override fun getDebugName() = sdk.name + override fun getIndexingProgressText() = IndexingBundle.message("indexable.files.provider.indexing.sdk.name", sdk.name) override fun getRootsScanningProgressText() = IndexingBundle.message("indexable.files.provider.scanning.sdk.name", sdk.name)