void (@NotNull GlobalInspectionContextImpl context, @NotNull InspectionToolWrapper wrapper, @NotNull InspectionTreeNode parentNode, boolean showStructure, boolean groupBySeverity, @NotNull final Map<String, Set<RefEntity>> contents, @NotNull Function<? super RefEntity, CommonProblemDescriptor[]> problems) { final Map<String, Set<OfflineProblemDescriptor>> filteredContent = getFilteredContent(context, wrapper); InspectionResultsView view = context.getView(); if (filteredContent != null && !filteredContent.values().isEmpty()) { buildTree(context, filteredContent, wrapper, descriptor -> { final RefEntity element = descriptor.getRefElement(context.getRefManager()); return new RefEntityContainer<OfflineProblemDescriptor>(element, new OfflineProblemDescriptor[] {descriptor}) { @Nullable @Override protected String getModuleName() { final String module = super.getModuleName(); return module == null ? descriptor.getModuleName() : module; } }; }, showStructure, parentNode, view.getTree().getInspectionTreeModel()); } }