void (@NotNull MavenDomDependency dependency, @NotNull Collection<MavenDomDependency> dependencies, @NotNull DomElementAnnotationHolder holder) { Set<MavenDomProjectModel> processed = new HashSet<>(); List<String> links = new ArrayList<>(); for (MavenDomDependency domDependency : dependencies) { if (dependency.equals(domDependency)) continue; MavenDomProjectModel model = domDependency.getParentOfType(MavenDomProjectModel.class, false); if (model != null && !processed.contains(model)) { links.add(createLinkText(model, domDependency)); processed.add(model); } } links.sort(null); holder.createProblem(dependency, HighlightSeverity.WARNING, MavenDomBundle.message("MavenDuplicateDependenciesInspection.has.duplicates", NlsMessages.formatAndList(links))); }