mirror of
https://gitflic.ru/project/openide/openide.git
synced 2026-09-27 10:03:11 +07:00
IDEA-222902 IDEA-235581 revert of 4753b0f
GitOrigin-RevId: 4686c4f6445c1f09f3abaf3ba1cbf15400b08e9e
This commit is contained in:
committed by
intellij-monorepo-bot
parent
4a18157bf6
commit
91aa330fa2
@@ -276,7 +276,7 @@ public class PopupFactoryImpl extends JBPopupFactory {
|
||||
List<ActionItem> 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<DataContext> 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<DataContext> 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);
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user