mirror of
https://gitflic.ru/project/openide/openide.git
synced 2026-09-27 10:03:11 +07:00
IJPL-237895 search-everywhere: Use KeepAlive in the document right before the item is selected
This commit fixes a bug when a rapid editor close on the frontend and navigation on the backend could conflict and skip editor to be opened. This commit introduced the Rider's keep alive workaround for same problem (cherry-picked from f4144e1819baa6f30d25a8d38cfdebe3d8df06e0) (cherry picked from commit 5ed488db9b341dd48a8f6421e54e931a214ba548) IJ-MR-195270 GitOrigin-RevId: 7ae16f504516391e08c4ed06b4acf8501ad00ae9
This commit is contained in:
committed by
intellij-monorepo-bot
parent
ec987e6f32
commit
10ffbf0ca9
+4
@@ -12,6 +12,10 @@
|
||||
<extensionPoint name="searchEverywhere.tabFactory"
|
||||
interface="com.intellij.platform.searchEverywhere.frontend.SeTabFactory"
|
||||
dynamic="true"/>
|
||||
|
||||
<extensionPoint name="searchEverywhere.previewPanelListener"
|
||||
interface="com.intellij.platform.searchEverywhere.frontend.ui.SePreviewPanelListener"
|
||||
dynamic="true"/>
|
||||
</extensionPoints>
|
||||
|
||||
<extensions defaultExtensionNs="com.intellij">
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
// Copyright 2000-2024 JetBrains s.r.o. and contributors. Use of this source code is governed by the Apache 2.0 license.
|
||||
// Copyright 2000-2026 JetBrains s.r.o. and contributors. Use of this source code is governed by the Apache 2.0 license.
|
||||
package com.intellij.platform.searchEverywhere.frontend
|
||||
|
||||
import com.intellij.ide.rpc.DataContextId
|
||||
@@ -11,6 +11,7 @@ import com.intellij.platform.searchEverywhere.SeSession
|
||||
import com.intellij.platform.searchEverywhere.SeTransferEnd
|
||||
import com.intellij.platform.searchEverywhere.SeTransferEvent
|
||||
import com.intellij.platform.searchEverywhere.SeTransferItem
|
||||
import com.intellij.platform.searchEverywhere.frontend.ui.SePreviewPanelListener
|
||||
import com.intellij.platform.searchEverywhere.impl.SeRemoteApi
|
||||
import com.intellij.platform.searchEverywhere.presentations.SeItemPresentation
|
||||
import com.intellij.platform.searchEverywhere.providers.SeLog
|
||||
@@ -72,6 +73,7 @@ class SeFrontendItemDataProvidersFacade(private val projectId: ProjectId,
|
||||
modifiers: Int,
|
||||
searchText: String,
|
||||
): Boolean {
|
||||
SePreviewPanelListener.EP.forEachExtensionSafe { it.onItemSelected() }
|
||||
return SeRemoteApi.getInstance().itemSelected(projectId, session, itemData, modifiers, searchText, isAllTab = isAllTab)
|
||||
}
|
||||
|
||||
|
||||
@@ -0,0 +1,23 @@
|
||||
// Copyright 2000-2026 JetBrains s.r.o. and contributors. Use of this source code is governed by the Apache 2.0 license.
|
||||
package com.intellij.platform.searchEverywhere.frontend.ui
|
||||
|
||||
import com.intellij.openapi.editor.Editor
|
||||
import com.intellij.openapi.extensions.ExtensionPointName
|
||||
import org.jetbrains.annotations.ApiStatus
|
||||
|
||||
/**
|
||||
* A very internal hack for fixing IJPL-237895. A subject to removal. Please do not use it.
|
||||
*/
|
||||
@ApiStatus.Internal
|
||||
@FunctionalInterface
|
||||
interface SePreviewPanelListener {
|
||||
companion object {
|
||||
val EP: ExtensionPointName<SePreviewPanelListener> = ExtensionPointName.create("com.intellij.searchEverywhere.previewPanelListener")
|
||||
}
|
||||
|
||||
/**
|
||||
* Called, when new [editor] is used to show a preview in Search Everywhere preview tab
|
||||
*/
|
||||
fun onNewPreviewEditor(editor: Editor)
|
||||
fun onItemSelected()
|
||||
}
|
||||
@@ -1,4 +1,4 @@
|
||||
// Copyright 2000-2024 JetBrains s.r.o. and contributors. Use of this source code is governed by the Apache 2.0 license.
|
||||
// Copyright 2000-2026 JetBrains s.r.o. and contributors. Use of this source code is governed by the Apache 2.0 license.
|
||||
package com.intellij.platform.searchEverywhere.frontend.ui
|
||||
|
||||
import com.intellij.icons.AllIcons
|
||||
@@ -1073,6 +1073,7 @@ class SePopupContentPane(
|
||||
}
|
||||
|
||||
override fun onEditorCreated(editor: Editor) {
|
||||
SePreviewPanelListener.EP.forEachExtensionSafe { it.onNewPreviewEditor(editor) }
|
||||
if (editor is EditorEx) {
|
||||
editor.setRendererMode(true)
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user