void (@NotNull PsiFile file, @NotNull InspectionManager manager, @NotNull ProblemsHolder problemsHolder, @NotNull GlobalInspectionContext globalContext, @NotNull ProblemDescriptionsProcessor problemDescriptionsProcessor) { Set<ResourceBundle> visitedBundles = globalContext.getUserData(VISITED_BUNDLES_KEY); if (!(file instanceof PropertiesFile propertiesFile)) return; ResourceBundle resourceBundle = propertiesFile.getResourceBundle(); assert visitedBundles != null; if (!visitedBundles.add(resourceBundle)) return; List<PropertiesFile> files = resourceBundle.getPropertiesFiles(); if (files.size() < 2) return; BidirectionalMap<PropertiesFile, PropertiesFile> parents = new BidirectionalMap<>(); for (PropertiesFile f : files) { PropertiesFile parent = PropertiesUtil.getParent(f, files); if (parent != null) { parents.put(f, parent); } } final Map<PropertiesFile, Map<String, String>> propertiesFilesNamesMaps = FactoryMap.create(key -> key.getNamesMap()); Map<PropertiesFile, Set<String>> keysUpToParent = new HashMap<>(); for (PropertiesFile f : files) { Set<String> keys = new HashSet<>(propertiesFilesNamesMaps.get(f).keySet()); PropertiesFile parent = parents.get(f); while (parent != null) { keys.addAll(propertiesFilesNamesMaps.get(parent).keySet()); parent = parents.get(parent); } keysUpToParent.put(f, keys); } for (final InconsistentResourceBundleInspectionProvider provider : myInspectionProviders.getValue()) { if (isProviderEnabled(provider.getName())) { provider.check(parents, files, keysUpToParent, propertiesFilesNamesMaps, manager, globalContext.getRefManager(), problemDescriptionsProcessor); } } }