mirror of
https://gitflic.ru/project/openide/openide.git
synced 2026-02-04 23:39:07 +07:00
ML in SE: Fix computation of PsiElement name
GitOrigin-RevId: 1b461f3fa290a7c263d8139e9335ff93aef4159b
This commit is contained in:
committed by
intellij-monorepo-bot
parent
22c53ed52c
commit
caa436b56c
@@ -292,7 +292,7 @@ object SearchEverywhereMLStatisticsCollector : CounterUsagesCollector() {
|
||||
return true
|
||||
}
|
||||
|
||||
private val GROUP = EventLogGroup("mlse.log", 94, MLSE_RECORDER_ID)
|
||||
private val GROUP = EventLogGroup("mlse.log", 95, MLSE_RECORDER_ID)
|
||||
|
||||
private val IS_INTERNAL = EventFields.Boolean("isInternal")
|
||||
private val ORDER_BY_ML_GROUP = EventFields.Boolean("orderByMl")
|
||||
|
||||
@@ -121,9 +121,11 @@ internal class SearchEverywherePsiElementFeaturesProvider : SearchEverywhereElem
|
||||
}
|
||||
|
||||
private fun getElementName(element: Any) = when (element) {
|
||||
is PsiItemWithPresentation -> element.presentation.presentableText
|
||||
is PsiNamedElement -> ReadAction.compute<String, Nothing> { element.name }
|
||||
else -> null
|
||||
is PsiItemWithPresentation -> element.item as? PsiNamedElement
|
||||
is PsiNamedElement -> element
|
||||
else -> null
|
||||
}?.let {
|
||||
ReadAction.compute<String, Nothing> { it.name }
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
Reference in New Issue
Block a user