void (Component comp, int x, int y) { final DefaultActionGroup group = new DefaultActionGroup(); group.addAll(rerunActionGroup); group.addAll(sourceActionGroup); group.addSeparator(); ExecutionNode[] selectedNodes = getSelectedNodes(); if (selectedNodes.length == 1) { ExecutionNode selectedNode = selectedNodes[0]; List<AnAction> contextActions = myBuildDescriptor.getContextActions(selectedNode); if (!contextActions.isEmpty()) { group.addAll(contextActions); group.addSeparator(); } } group.addAll(filteringActionsGroup); group.addSeparator(); group.addAll(navigationActionGroup); ActionPopupMenu popupMenu = ActionManager.getInstance().createActionPopupMenu("BuildView", group); popupMenu.setTargetComponent(myTree); JPopupMenu menu = popupMenu.getComponent(); menu.show(comp, x, y); }