mirror of
https://gitflic.ru/project/openide/openide.git
synced 2026-09-27 10:03:11 +07:00
LAB-84: Use text that appears in search to construct the language model
GitOrigin-RevId: 65fffcd85b9833e277fd998f0b114ee48b36babb
This commit is contained in:
committed by
intellij-monorepo-bot
parent
e17be19c6e
commit
8fc4c0d4e0
+6
-1
@@ -4,6 +4,7 @@ import com.intellij.ide.ui.search.SearchableOptionsRegistrar
|
||||
import com.intellij.ide.ui.search.SearchableOptionsRegistrarImpl
|
||||
import com.intellij.openapi.actionSystem.ActionGroup
|
||||
import com.intellij.openapi.actionSystem.ActionManager
|
||||
import com.intellij.openapi.actionSystem.ActionPlaces
|
||||
import com.intellij.openapi.actionSystem.impl.ActionManagerImpl
|
||||
import com.intellij.openapi.components.Service
|
||||
import com.intellij.openapi.components.service
|
||||
@@ -60,7 +61,11 @@ internal class ActionsLanguageModel(val coroutineScope: CoroutineScope) {
|
||||
private fun getWordsFromActions(): Sequence<@NlsActions.ActionText String> {
|
||||
return (ActionManager.getInstance() as ActionManagerImpl).actionsOrStubs()
|
||||
.filterNot { it is ActionGroup && !it.isSearchable }
|
||||
.mapNotNull { it.templateText }
|
||||
.mapNotNull {
|
||||
val presentation = it.templatePresentation
|
||||
it.applyTextOverride(ActionPlaces.ACTION_SEARCH, presentation)
|
||||
return@mapNotNull presentation.text
|
||||
}
|
||||
}
|
||||
|
||||
private fun getWordsFromSettings(): Sequence<@NlsContexts.ConfigurableName CharSequence> {
|
||||
|
||||
Reference in New Issue
Block a user