From 16ba4b6875316cd7dcf373336c0065c8e3a58e4d Mon Sep 17 00:00:00 2001 From: "yana.hrynevich" Date: Fri, 6 Feb 2026 13:56:40 +0100 Subject: [PATCH] IJPL-220746 Fix mutation of template presentations in CorpusBuilder GitOrigin-RevId: 892baba80b1fce7cf1a76090c7e2ed29658aa27b --- .../searchEverywhereMl/typos/models/CorpusBuilder.kt | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/plugins/search-everywhere-ml/typos/src/com/intellij/searchEverywhereMl/typos/models/CorpusBuilder.kt b/plugins/search-everywhere-ml/typos/src/com/intellij/searchEverywhereMl/typos/models/CorpusBuilder.kt index bafc3c760a40..93d21f681cc4 100644 --- a/plugins/search-everywhere-ml/typos/src/com/intellij/searchEverywhereMl/typos/models/CorpusBuilder.kt +++ b/plugins/search-everywhere-ml/typos/src/com/intellij/searchEverywhereMl/typos/models/CorpusBuilder.kt @@ -3,9 +3,9 @@ package com.intellij.searchEverywhereMl.typos.models import com.intellij.ide.actions.ShowSettingsUtilImpl.Companion.getConfigurables import com.intellij.ide.ui.search.SearchableOptionsRegistrar import com.intellij.ide.ui.search.SearchableOptionsRegistrarImpl +import com.intellij.ide.util.gotoByName.getAnActionText 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 @@ -78,9 +78,8 @@ internal class CorpusBuilder(coroutineScope: CoroutineScope) { return actionManager.actionsOrStubs() .filterNot { it is ActionGroup && !it.isSearchable } .mapNotNull { action -> - val presentation = action.templatePresentation - action.applyTextOverride(ActionPlaces.ACTION_SEARCH, presentation) - presentation.text?.let { tokenizeText(it) } + val text = getAnActionText(action) + text?.let { tokenizeText(it) } } .toSet() }