DefaultActionGroup (SingleInspectionProfilePanel panel) { final DefaultActionGroup actionGroup = new DefaultActionGroup(); InspectionProfileActionProvider.EP_NAME.getExtensionList().forEach(provider -> { final var groupInfo = provider.getAddActions(panel); if (groupInfo != null) { ActionManager.getInstance().replaceAction(groupInfo.second, groupInfo.first); actionGroup.add(groupInfo.first); } }); if (actionGroup.getChildrenCount() == 0) return null; actionGroup.setPopup(true); actionGroup.registerCustomShortcutSet(CommonShortcuts.getNew(), panel); final Presentation presentation = actionGroup.getTemplatePresentation(); presentation.setIcon(AllIcons.General.Add); presentation.setText(InspectionsBundle.messagePointer("add.inspection.button")); return actionGroup; }