From 10e30ff2cb62ba5b98870381aae73d2d7c580146 Mon Sep 17 00:00:00 2001 From: Bartek Pacia Date: Thu, 30 Oct 2025 15:56:03 +0100 Subject: [PATCH] [java-decompiler] format DecompilerInEditorListener GitOrigin-RevId: 95944d138ca7ad71d0a5d4aa686b3dc42c535ef6 --- .../decompiler/DecompilerInEditorListener.kt | 17 ----------------- 1 file changed, 17 deletions(-) diff --git a/plugins/java-decompiler/plugin/src/org/jetbrains/java/decompiler/DecompilerInEditorListener.kt b/plugins/java-decompiler/plugin/src/org/jetbrains/java/decompiler/DecompilerInEditorListener.kt index 227a6f683de0..d33e8aa24670 100644 --- a/plugins/java-decompiler/plugin/src/org/jetbrains/java/decompiler/DecompilerInEditorListener.kt +++ b/plugins/java-decompiler/plugin/src/org/jetbrains/java/decompiler/DecompilerInEditorListener.kt @@ -9,7 +9,6 @@ import com.intellij.openapi.actionSystem.Presentation import com.intellij.openapi.actionSystem.impl.ActionButton import com.intellij.openapi.editor.event.EditorFactoryEvent import com.intellij.openapi.editor.event.EditorFactoryListener -import com.intellij.openapi.editor.ex.EditorMarkupModel import com.intellij.openapi.editor.impl.EditorImpl import com.intellij.openapi.editor.impl.EditorInspectionsActionToolbar import com.intellij.openapi.editor.impl.EditorMarkupModelImpl @@ -33,22 +32,6 @@ private class DecompilerInEditorListener : EditorFactoryListener { setupModeToggles(editor) } - /** - * This is a hack. See IDEA-368466. - * - * We want to add an icon to the small toolbar in the upper-right corner of the editor (aka "the inspection widget"). - * - * Normal, well-behaved plugins (for example GitHub plugin, for code review), contribute their own actions to the - * inspection widget by calling [EditorMarkupModel.addInspectionWidgetAction]. - * - * Unfortunately, we cannot act like a well-behaved plugin because the inspection widget is not shown for - * class files (and other binary artifacts). This assumption is hardcoded quite deep in platform code. - * - * Therefore, we replace the whole "status component" (which itself is a part of [JBScrollPane]). - * - * We assume we will not overwrite any existing UI that was already there – because there wasn't any UI to be - * overwritten – recall that the whole "status component" is not displayed for class files (and other binary artifacts). - */ private fun setupModeToggles(editor: EditorImpl) { val decompilerSettings = IdeaDecompilerSettings.getInstance()