From bdc8a861838f4dac5907f37a8201a2cdb267721b Mon Sep 17 00:00:00 2001 From: Bartek Pacia Date: Mon, 23 Jun 2025 15:45:50 +0200 Subject: [PATCH] [ByteCodeViewer] BytecodeToolWindowPanel: Rename setEditorText() to updateTextInEditor() GitOrigin-RevId: 9bbe1fc9810098bcd40ef3bb9242dc38f4a8b7cc --- .../com/intellij/byteCodeViewer/BytecodeToolWindowPanel.kt | 4 ++-- .../src/com/intellij/byteCodeViewer/ShowBytecodeAction.kt | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/plugins/ByteCodeViewer/src/com/intellij/byteCodeViewer/BytecodeToolWindowPanel.kt b/plugins/ByteCodeViewer/src/com/intellij/byteCodeViewer/BytecodeToolWindowPanel.kt index 455cb2bd1ec2..3a340bde4386 100644 --- a/plugins/ByteCodeViewer/src/com/intellij/byteCodeViewer/BytecodeToolWindowPanel.kt +++ b/plugins/ByteCodeViewer/src/com/intellij/byteCodeViewer/BytecodeToolWindowPanel.kt @@ -79,7 +79,7 @@ internal class BytecodeToolWindowPanel( } else { add(bytecodeEditor.getComponent()) - setEditorText() + updateTextInEditor() EditorFactory.getInstance().getEventMulticaster().addCaretListener(object : CaretListener { override fun caretPositionChanged(event: CaretEvent) { val sourceEditor = selectedMatchingEditor @@ -98,7 +98,7 @@ internal class BytecodeToolWindowPanel( } } - fun setEditorText() { + fun updateTextInEditor() { if (classFile == null) throw IllegalStateException("Class file must not be null at this point") val byteCodeText = deserializeBytecode(classFile) bytecodeEditor.document.putUserData(BYTECODE_WITH_DEBUG_INFO, byteCodeText) // include debug info for selection matching diff --git a/plugins/ByteCodeViewer/src/com/intellij/byteCodeViewer/ShowBytecodeAction.kt b/plugins/ByteCodeViewer/src/com/intellij/byteCodeViewer/ShowBytecodeAction.kt index fed2aa42cb5e..168a277e811e 100644 --- a/plugins/ByteCodeViewer/src/com/intellij/byteCodeViewer/ShowBytecodeAction.kt +++ b/plugins/ByteCodeViewer/src/com/intellij/byteCodeViewer/ShowBytecodeAction.kt @@ -65,7 +65,7 @@ internal class ShowBytecodeAction : AnAction() { val toolWindow = ToolWindowManager.getInstance(project).getToolWindow(BytecodeToolWindowPanel.TOOL_WINDOW_ID) ?: return toolWindow.contentManager.contents.forEach { val panel = it.component as? BytecodeToolWindowPanel ?: return@forEach - panel.setEditorText() + panel.updateTextInEditor() } } }