diff --git a/platform/platform-impl/src/com/intellij/ui/popup/PopupFactoryImpl.java b/platform/platform-impl/src/com/intellij/ui/popup/PopupFactoryImpl.java index ab164933b4f9..0f04e474da4b 100644 --- a/platform/platform-impl/src/com/intellij/ui/popup/PopupFactoryImpl.java +++ b/platform/platform-impl/src/com/intellij/ui/popup/PopupFactoryImpl.java @@ -276,7 +276,7 @@ public class PopupFactoryImpl extends JBPopupFactory { List items = ActionPopupStep.createActionItems( actionGroup, dataContext, showNumbers, useAlphaAsNumbers, showDisabledActions, honorActionMnemonics, actionPlace, presentationFactory); - return new ActionPopupStep(items, title, getComponentContextSupplier(dataContext, component), actionPlace, showNumbers || honorActionMnemonics && itemsHaveMnemonics(items), + return new ActionPopupStep(items, title, getComponentContextSupplier(component), actionPlace, showNumbers || honorActionMnemonics && itemsHaveMnemonics(items), preselectActionCondition, autoSelection, showDisabledActions, presentationFactory); } @@ -353,14 +353,8 @@ public class PopupFactoryImpl extends JBPopupFactory { } @NotNull - private static Supplier getComponentContextSupplier(@NotNull DataContext dataContext, Component component) { - return () -> { - DataContext componentContext = DataManager.getInstance().getDataContext(component); - return (DataContext)dataId -> { - Object data = dataContext.getData(dataId); - return data != null ? data : componentContext.getData(dataId); - }; - }; + private static Supplier getComponentContextSupplier(Component component) { + return () -> DataManager.getInstance().getDataContext(component); } @Override @@ -417,7 +411,7 @@ public class PopupFactoryImpl extends JBPopupFactory { return ActionPopupStep.createActionsStep( actionGroup, dataContext, showNumbers, true, showDisabledActions, title, honorActionMnemonics, autoSelectionEnabled, - getComponentContextSupplier(dataContext, component), + getComponentContextSupplier(component), actionPlace, null, defaultOptionIndex, null); }