ActionGroup (final boolean popup) { ActionManager actionManager = ActionManager.getInstance(); DefaultActionGroup group = new DefaultActionGroup(getName(), popup); AnAction groupToRestorePresentation = null; if (getName() != null) { groupToRestorePresentation = actionManager.getAction(getName()); } else { if (getId() != null) { groupToRestorePresentation = actionManager.getAction(getId()); } } if (groupToRestorePresentation != null) { group.copyFrom(groupToRestorePresentation); } for (Object o : myChildren) { if (o instanceof String) { group.add(actionManager.getAction((String)o)); } else if (o instanceof Separator) { group.addSeparator(); } else if (o instanceof Group) { group.add(((Group)o).constructActionGroup(popup)); } } return group; }