From 3258827c2cbf66472d6a06e2eafe04e2f5a353f4 Mon Sep 17 00:00:00 2001 From: Bartek Pacia Date: Wed, 25 Jun 2025 13:32:24 +0200 Subject: [PATCH] [ByteCodeViewer] IDEA-374999 Replace usage of deprecated runWriteAction() GitOrigin-RevId: 7847d32826f5e0def9543171390378a2919a22f7 --- .../com/intellij/byteCodeViewer/BytecodeToolWindowPanel.kt | 6 +++--- 1 file 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 3d4ad5a3deb5..eda7ab6bde55 100644 --- a/plugins/ByteCodeViewer/src/com/intellij/byteCodeViewer/BytecodeToolWindowPanel.kt +++ b/plugins/ByteCodeViewer/src/com/intellij/byteCodeViewer/BytecodeToolWindowPanel.kt @@ -3,7 +3,7 @@ package com.intellij.byteCodeViewer import com.intellij.ide.highlighter.JavaClassFileType import com.intellij.openapi.Disposable -import com.intellij.openapi.application.runWriteAction +import com.intellij.openapi.application.ApplicationManager import com.intellij.openapi.diagnostic.Logger import com.intellij.openapi.editor.Editor import com.intellij.openapi.editor.EditorFactory @@ -114,8 +114,8 @@ internal class BytecodeToolWindowPanel( if (classFile == null) throw IllegalStateException("Class file must not be null") val byteCodeText = deserializeBytecode(classFile) bytecodeEditor.document.putUserData(BYTECODE_WITH_DEBUG_INFO, byteCodeText) // include debug info for selection matching - runWriteAction { - val byteCodeToShow = if (BytecodeViewerSettings.getInstance().state.showDebugInfo) byteCodeText else removeDebugInfo(byteCodeText) + val byteCodeToShow = if (BytecodeViewerSettings.getInstance().state.showDebugInfo) byteCodeText else removeDebugInfo(byteCodeText) + ApplicationManager.getApplication().runWriteAction { bytecodeEditor.document.setText(byteCodeToShow) }