ML in SE: Add key provider for PSIPresentationBgRendererWrapper$ItemWithPresentation

GitOrigin-RevId: 6b85cd1786f83ea4f7a7cc1e5d0c477081dbbbd4
This commit is contained in:
Adam Malek
2024-06-17 11:13:10 +02:00
committed by intellij-monorepo-bot
parent ddd2e74ac1
commit 8c4c7dc747
2 changed files with 2 additions and 2 deletions

View File

@@ -292,7 +292,7 @@ object SearchEverywhereMLStatisticsCollector : CounterUsagesCollector() {
return true
}
private val GROUP = EventLogGroup("mlse.log", 102, MLSE_RECORDER_ID)
private val GROUP = EventLogGroup("mlse.log", 103, MLSE_RECORDER_ID)
private val IS_INTERNAL = EventFields.Boolean("isInternal")
private val ORDER_BY_ML_GROUP = EventFields.Boolean("orderByMl")

View File

@@ -8,7 +8,7 @@ private class PsiElementKeyProvider : SearchEverywhereElementKeyProvider {
override fun getKeyOrNull(element: Any): Any? {
return when (element) {
is PsiElement -> element
is PSIPresentationBgRendererWrapper.PsiItemWithPresentation -> element.item
is PSIPresentationBgRendererWrapper.ItemWithPresentation<*> -> element.item
else -> null
}
}