void (@Nullable String filter, boolean forceInclude) { if (isDisposed()) return; myRoot.removeAllChildren(); myRoot.dropCache(); List<Set<String>> keySetList = new ArrayList<>(); final Set<String> quoted = new HashSet<>(); if (filter != null && !filter.isEmpty()) { keySetList.addAll(SearchUtil.findKeys(filter, quoted)); } else { // No filter -> add always visible groups myCustomGroups.forEach(group -> getGroupNode(myRoot, group.path())); } Project project = getProject(); final boolean emptyFilter = myInspectionsFilter.isEmptyFilter(); for (ToolDescriptors toolDescriptors : myInitialToolDescriptors.values()) { final Descriptor descriptor = toolDescriptors.getDefaultDescriptor(); if (filter != null && !filter.isEmpty() && !isDescriptorAccepted(descriptor, filter, forceInclude, keySetList, quoted)) { continue; } final String shortName = toolDescriptors.getDefaultDescriptor().getShortName(); final InspectionConfigTreeNode node = new InspectionConfigTreeNode.Tool(() -> myInitialToolDescriptors.get(shortName)); if (!emptyFilter && !myInspectionsFilter.matches(myProfile.getTools(shortName, project), node)) { continue; } getGroupNode(myRoot, toolDescriptors.getDefaultDescriptor().getGroup()).add(node); } for (InspectionTreeAdvertiser.CustomGroup customGroup : myCustomGroups) { if (filter != null && isCustomGroupAccepted(customGroup, filter, quoted)) { getGroupNode(myRoot, customGroup.path()); } } if (filter != null && forceInclude && myRoot.getChildCount() == 0) { final Set<String> filters = SearchableOptionsRegistrar.getInstance().getProcessedWords(filter); if (filters.size() > 1 || !quoted.isEmpty()) { fillTreeData(filter, false); } } TreeUtil.sortRecursively(myRoot, InspectionsConfigTreeComparator.INSTANCE); }