void (boolean registerActions) { List<ToolsGroup<T>> groups = getToolsGroups(); for (ToolsGroup group : groups) { String groupName = group.getName(); if (!StringUtil.isEmptyOrSpaces(groupName)) { DefaultActionGroup subgroup = new DefaultActionGroup(); subgroup.getTemplatePresentation().setText(groupName, false); subgroup.setPopup(true); fillGroup(groupName, subgroup); if (subgroup.getChildrenCount() > 0) { add(subgroup); if (registerActions) { ActionManager.getInstance().registerAction(getGroupIdPrefix() + groupName, subgroup); } } } else { fillGroup(null, this); } } }