From d61e2115c7f3c266694e6c761987daf9d7f7661e Mon Sep 17 00:00:00 2001 From: Bartek Pacia Date: Wed, 2 Jul 2025 10:17:37 +0200 Subject: [PATCH] [ByteCodeViewer] Focus the bytecode tool window after the 'Show Bytecode' action is called GitOrigin-RevId: 305c6b97d6201218079dca3c1af667ead944a5ec --- .../src/com/intellij/byteCodeViewer/ShowBytecodeAction.kt | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/plugins/ByteCodeViewer/src/com/intellij/byteCodeViewer/ShowBytecodeAction.kt b/plugins/ByteCodeViewer/src/com/intellij/byteCodeViewer/ShowBytecodeAction.kt index fdfb2a9ecfe3..e8b8167d4814 100644 --- a/plugins/ByteCodeViewer/src/com/intellij/byteCodeViewer/ShowBytecodeAction.kt +++ b/plugins/ByteCodeViewer/src/com/intellij/byteCodeViewer/ShowBytecodeAction.kt @@ -7,6 +7,7 @@ import com.intellij.notification.NotificationType import com.intellij.openapi.actionSystem.* import com.intellij.openapi.util.Key import com.intellij.openapi.vfs.VirtualFile +import com.intellij.openapi.wm.IdeFocusManager import com.intellij.openapi.wm.ToolWindowAnchor import com.intellij.openapi.wm.ToolWindowManager import com.intellij.ui.content.ContentFactory @@ -78,7 +79,9 @@ internal class ShowBytecodeAction : AnAction() { content.setDisposer(panel) toolWindow.contentManager.setSelectedContent(content) toolWindow.setAdditionalGearActions(createActionGroup()) - toolWindow.activate(null) + toolWindow.activate { + IdeFocusManager.getInstance(project).requestFocus(panel, false) + } } private fun createActionGroup(): ActionGroup {