mirror of
https://gitflic.ru/project/openide/openide.git
synced 2026-01-05 01:50:56 +07:00
ML in SE: Fix key provider not providing unique ID for rnc items (IDEA-295687)
GitOrigin-RevId: e53195f2d9d1b53dbb967eef5cc3bf4acef43d48
This commit is contained in:
committed by
intellij-monorepo-bot
parent
897a0be29b
commit
1f99ae0f7f
@@ -1,9 +1,14 @@
|
||||
package com.intellij.ide.actions.searcheverywhere.ml.id
|
||||
|
||||
import com.intellij.navigation.NavigationItem
|
||||
import com.intellij.navigation.PsiElementNavigationItem
|
||||
|
||||
private class NavigationItemKeyProvider : ElementKeyForIdProvider() {
|
||||
override fun getKey(element: Any): Any? {
|
||||
return element as? NavigationItem
|
||||
return when (element) {
|
||||
is PsiElementNavigationItem -> element.targetElement
|
||||
is NavigationItem -> element.name?.let { it + element.presentation?.locationString }
|
||||
else -> null
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user