use of com.intellij.openapi.actionSystem.impl.MenuItemPresentationFactory in project intellij-community by JetBrains.
the class ToolWindowContentUi method showContextMenu.
public void showContextMenu(Component comp, int x, int y, ActionGroup toolWindowGroup, @Nullable Content selectedContent) {
if (selectedContent == null && toolWindowGroup == null) {
return;
}
DefaultActionGroup group = new DefaultActionGroup();
if (selectedContent != null) {
initActionGroup(group, selectedContent);
}
if (toolWindowGroup != null) {
group.addAll(toolWindowGroup);
}
final ActionPopupMenu popupMenu = ((ActionManagerImpl) ActionManager.getInstance()).createActionPopupMenu(POPUP_PLACE, group, new MenuItemPresentationFactory(true));
popupMenu.getComponent().show(comp, x, y);
}
use of com.intellij.openapi.actionSystem.impl.MenuItemPresentationFactory in project intellij-community by JetBrains.
the class LightToolWindow method showGearPopup.
private void showGearPopup(Component component, int x, int y) {
ActionPopupMenu popupMenu = ((ActionManagerImpl) ActionManager.getInstance()).createActionPopupMenu(ToolWindowContentUi.POPUP_PLACE, createGearPopupGroup(), new MenuItemPresentationFactory(true));
popupMenu.getComponent().show(component, x, y);
}
Aggregations