From ea9efe9b09c2db43d06b3e9270bd1f7970308315 Mon Sep 17 00:00:00 2001 From: Mikhail Sokolov Date: Thu, 25 Feb 2021 16:21:06 +0500 Subject: [PATCH] Revert supporting PlatformDataKeys.CONTEXT_MENU_POINT in action button popups GitOrigin-RevId: 62b28d303e9cc6274e8e114fd4bc895cc7a6008d --- .../actionSystem/impl/ActionButton.java | 19 +------------------ 1 file changed, 1 insertion(+), 18 deletions(-) diff --git a/platform/platform-impl/src/com/intellij/openapi/actionSystem/impl/ActionButton.java b/platform/platform-impl/src/com/intellij/openapi/actionSystem/impl/ActionButton.java index cf4827319f1a..4ddfbfb26569 100644 --- a/platform/platform-impl/src/com/intellij/openapi/actionSystem/impl/ActionButton.java +++ b/platform/platform-impl/src/com/intellij/openapi/actionSystem/impl/ActionButton.java @@ -16,7 +16,6 @@ import com.intellij.openapi.util.NlsContexts; import com.intellij.openapi.util.NlsSafe; import com.intellij.openapi.util.registry.Registry; import com.intellij.openapi.util.text.StringUtil; -import com.intellij.ui.awt.RelativePoint; import com.intellij.ui.popup.PopupFactoryImpl; import com.intellij.ui.popup.PopupState; import com.intellij.ui.scale.JBUIScale; @@ -212,23 +211,7 @@ public class ActionButton extends JComponent implements ActionButtonComponent, A createPresentationFactory(), false); popup.setShowSubmenuOnHover(true); - RelativePoint point = getContextMenuPoint(e.getDataContext()); - if (point != null) { - popup.show(point); - } - else { - popup.showUnderneathOf(e.getInputEvent().getComponent()); - } - } - - private static RelativePoint getContextMenuPoint(DataContext dataContext) { - Point point = PlatformDataKeys.CONTEXT_MENU_POINT.getData(dataContext); - Component component = PlatformDataKeys.CONTEXT_COMPONENT.getData(dataContext); - if (point != null && component != null) { - return new RelativePoint(component, point); - } - - return null; + popup.showUnderneathOf(e.getInputEvent().getComponent()); } // used in Rider, please don't change visibility