[ByteCodeViewer] BytecodeToolWindowPanel: Rename setEditorText() to updateTextInEditor()

GitOrigin-RevId: 9bbe1fc9810098bcd40ef3bb9242dc38f4a8b7cc
This commit is contained in:
Bartek Pacia
2025-06-24 11:26:05 +00:00
committed by intellij-monorepo-bot
parent 35cc69bf25
commit bdc8a86183
2 changed files with 3 additions and 3 deletions
@@ -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
@@ -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()
}
}
}