From ab2c3dc1881e86ee50606d6ad99f1f06b5e30867 Mon Sep 17 00:00:00 2001 From: Anton Bragin Date: Thu, 26 Oct 2023 14:41:21 +0200 Subject: [PATCH] DS-5867 Cell creation by floating button is logged into FUS GitOrigin-RevId: 3747b22fe0e37abbab9ac9679f161aa8472cebd7 --- .../notebooks/ui/visualization/CellBorderComponents.kt | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/notebooks/notebook-ui/src/org/jetbrains/plugins/notebooks/ui/visualization/CellBorderComponents.kt b/notebooks/notebook-ui/src/org/jetbrains/plugins/notebooks/ui/visualization/CellBorderComponents.kt index 7f03d9af9fb7..ed63a772664e 100644 --- a/notebooks/notebook-ui/src/org/jetbrains/plugins/notebooks/ui/visualization/CellBorderComponents.kt +++ b/notebooks/notebook-ui/src/org/jetbrains/plugins/notebooks/ui/visualization/CellBorderComponents.kt @@ -1,8 +1,10 @@ package org.jetbrains.plugins.notebooks.ui.visualization +import com.intellij.openapi.actionSystem.ActionPlaces import com.intellij.openapi.actionSystem.AnAction import com.intellij.openapi.actionSystem.AnActionEvent import com.intellij.openapi.actionSystem.KeyboardShortcut +import com.intellij.openapi.actionSystem.ex.ActionManagerEx import com.intellij.openapi.editor.Editor import com.intellij.openapi.editor.ex.EditorEx import com.intellij.openapi.keymap.KeymapUtil @@ -28,8 +30,8 @@ class JupyterCellBorderButton( setUI(sausageUi) defineButtonAppearance(editor, this, action) addActionListener { - val anActionEvent = AnActionEvent.createFromAnAction(action, null, "JupyterCellPanel", editor.dataContext) - action.actionPerformed(anActionEvent) + val anActionEvent = AnActionEvent.createFromAnAction(action, null, ActionPlaces.EDITOR_INLAY, editor.dataContext) + ActionManagerEx.getInstanceEx().tryToExecute(action, anActionEvent.inputEvent, this, ActionPlaces.EDITOR_INLAY, true) } }