mirror of
https://gitflic.ru/project/openide/openide.git
synced 2026-09-27 10:03:11 +07:00
[ByteCodeViewer] BytecodeToolWindowPanel: Rename setEditorText() to updateTextInEditor()
GitOrigin-RevId: 9bbe1fc9810098bcd40ef3bb9242dc38f4a8b7cc
This commit is contained in:
committed by
intellij-monorepo-bot
parent
35cc69bf25
commit
bdc8a86183
@@ -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()
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user