KeymapGroup (final Condition<? super AnAction> filtered, final Project project) { final ActionManagerEx actionManager = ActionManagerEx.getInstanceEx(); Group rootGroup = new Group(getRootGroupName(), getRootGroupId(), AllIcons.Nodes.KeymapTools); List<ToolsGroup<Tool>> groups = ToolManager.getInstance().getGroups(); for (ToolsGroup<Tool> toolsGroup : groups) { String groupName = toolsGroup.getName(); Group group = new Group(groupName, getGroupIdPrefix() + groupName); List<? extends Tool> tools = getToolsIdsByGroupName(groupName); for (Tool tool : tools) { if (filtered != null && !filtered.value(actionManager.getActionOrStub(tool.getActionId()))) continue; group.addActionId(tool.getActionId()); } if (group.getSize() > 0) { rootGroup.addGroup(group); } } return rootGroup; }