void (InspectionProfileImpl profile, Project project) { addAction(new ResetFilterAction()); addSeparator(); if (ApplicationNamesInfo.getInstance().getProductName().contains("IDEA")) { // minor IDEs don't have "New in XXX" in inspection descriptions addAction(new ShowNewInspectionsAction()); } addSeparator(); addAction(new ShowEnabledOrDisabledInspectionsAction(true)); addAction(new ShowEnabledOrDisabledInspectionsAction(false)); addAction(new ShowOnlyModifiedInspectionsAction()); addSeparator(); for (final HighlightSeverity severity : LevelChooserAction.getSeverities(mySeverityRegistrar)) { add(new ShowWithSpecifiedSeverityInspectionsAction(severity)); } addSeparator(); final Set<String> languageIds = new HashSet<>(); for (ScopeToolState state : profile.getDefaultStates(project)) { final String language = state.getTool().getLanguage(); if (language != null) languageIds.add(language); } final List<Language> languages = new SmartList<>(); for (String id : languageIds) { if (id != null) { final Language language = Language.findLanguageByID(id); if (language != null && !(language instanceof MetaLanguage)) { languages.add(language); } } } if (!languages.isEmpty()) { final DefaultActionGroup languageActionGroupParent = new DefaultActionGroup(ActionsBundle.message("action.InspectionFilterAction.filter.by.language.text"), languages.size() >= MIN_LANGUAGE_COUNT_TO_WRAP); add(languageActionGroupParent); languages.sort(Comparator.comparing(Language::getDisplayName)); for (Language language : languages) { languageActionGroupParent.add(new LanguageFilterAction(language)); } languageActionGroupParent.add(new LanguageFilterAction(null)); addSeparator(); } add(new ShowAvailableOnlyOnAnalyzeInspectionsAction()); add(new ShowOnlyCleanupInspectionsAction()); }