[ByteCodeViewer] Focus the bytecode tool window after the 'Show Bytecode' action is called

GitOrigin-RevId: 305c6b97d6201218079dca3c1af667ead944a5ec
This commit is contained in:
Bartek Pacia
2025-07-02 16:12:27 +00:00
committed by intellij-monorepo-bot
parent 92d8c4f34c
commit d61e2115c7
@@ -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 {