DefaultActionGroup () { final LayoutTree tree = myLayoutTreeComponent.getLayoutTree(); DefaultActionGroup popupActionGroup = new DefaultActionGroup(); final List<AnAction> createActions = new ArrayList<>(); AddCompositeElementAction.addCompositeCreateActions(createActions, this); for (AnAction createAction : createActions) { popupActionGroup.add(createAction); } popupActionGroup.add(createAddNonCompositeElementGroup()); final RemovePackagingElementAction removeAction = new RemovePackagingElementAction(this); removeAction.registerCustomShortcutSet(CommonShortcuts.getDelete(), tree); popupActionGroup.add(removeAction); popupActionGroup.add(new ExtractArtifactAction(this)); popupActionGroup.add(new InlineArtifactAction(this)); popupActionGroup.add(new RenamePackagingElementAction(this)); popupActionGroup.add(new SurroundElementWithAction(this)); popupActionGroup.add(Separator.getInstance()); popupActionGroup.add(new HideContentAction(this)); popupActionGroup.add(new LayoutTreeNavigateAction(myLayoutTreeComponent)); popupActionGroup.add(new LayoutTreeFindUsagesAction(myLayoutTreeComponent, myContext.getParent())); popupActionGroup.add(Separator.getInstance()); CommonActionsManager actionsManager = CommonActionsManager.getInstance(); DefaultTreeExpander treeExpander = new DefaultTreeExpander(tree); popupActionGroup.add(actionsManager.createExpandAllAction(treeExpander, tree)); popupActionGroup.add(actionsManager.createCollapseAllAction(treeExpander, tree)); return popupActionGroup; }