diff --git a/platform/searchEverywhere/frontend/src/SeFrontendService.kt b/platform/searchEverywhere/frontend/src/SeFrontendService.kt index 864d4f8f9284..c94c9b1145c2 100644 --- a/platform/searchEverywhere/frontend/src/SeFrontendService.kt +++ b/platform/searchEverywhere/frontend/src/SeFrontendService.kt @@ -6,6 +6,7 @@ import com.intellij.ide.actions.searcheverywhere.* import com.intellij.ide.actions.searcheverywhere.PreviewExperiment.isExperimentEnabled import com.intellij.ide.actions.searcheverywhere.statistics.SearchEverywhereUsageTriggerCollector import com.intellij.openapi.actionSystem.AnActionEvent +import com.intellij.openapi.application.ApplicationManager import com.intellij.openapi.components.Service import com.intellij.openapi.components.service import com.intellij.openapi.project.Project @@ -13,6 +14,7 @@ import com.intellij.openapi.ui.popup.JBPopup import com.intellij.openapi.ui.popup.JBPopupFactory import com.intellij.openapi.util.Disposer import com.intellij.openapi.util.WindowStateService +import com.intellij.openapi.util.registry.Registry import com.intellij.openapi.wm.WindowManager import com.intellij.platform.searchEverywhere.SeProviderId import com.intellij.platform.searchEverywhere.SeSession @@ -53,7 +55,6 @@ import java.util.concurrent.CompletableFuture import java.util.concurrent.TimeUnit import java.util.concurrent.atomic.AtomicBoolean import javax.swing.SwingUtilities -import kotlin.String @ApiStatus.Internal @Service(Service.Level.PROJECT, Service.Level.APP) @@ -108,6 +109,10 @@ class SeFrontendService(val project: Project?, private val coroutineScope: Corou coroutineScope.launch { val session = SeSessionEntity.createSession() + if (Registry.`is`("search.everywhere.reproduce.freeze.IJPL.218505", false)) { + reproduceFreezeIjpl218505(popupScope) + } + try { popupSemaphore.withPermit { val providersHolder = SeProvidersHolder.initialize(initEvent, project, session, "Frontend", false) @@ -370,6 +375,19 @@ class SeFrontendService(val project: Project?, private val coroutineScope: Corou return isExperimentEnabled } + private fun reproduceFreezeIjpl218505(popupScope: CoroutineScope) { + popupScope.launch { + (1..1000).forEach { _ -> + delay(2000) + ApplicationManager.getApplication().invokeLater { + ApplicationManager.getApplication().runWriteAction { + println("write action") + } + } + } + } + } + companion object { @JvmStatic fun getInstance(project: Project?): SeFrontendService = project?.getService(SeFrontendService::class.java) diff --git a/platform/util/resources/misc/registry.properties b/platform/util/resources/misc/registry.properties index 45981666cc7c..51f3069329a1 100644 --- a/platform/util/resources/misc/registry.properties +++ b/platform/util/resources/misc/registry.properties @@ -1320,6 +1320,12 @@ llm.welcome.guide.description=Enables Welcome Guide feature search.everywhere.new.enabled=false search.everywhere.new.enabled.description=Enable the new Search Everywhere implementation (excl. Rider) +search.everywhere.enable.freeze.IJPL.218505=false +search.everywhere.enable.freeze.IJPL.218505.description=Enable the freeze from IJPL-218505 Freeze in SearchEverywhereConcurrentElementsFetcher + +search.everywhere.reproduce.freeze.IJPL.218505=false +search.everywhere.reproduce.freeze.IJPL.218505.description=Run reproducing conditions for freeze IJPL-218505 + search.everywhere.new.minimum.width=700 search.everywhere.new.minimum.width.description=Default popup width for the new Search Everywhere implementation