void (DependencyDescriptor descriptor, DomElementAnnotationHolder holder) { if (!isIdeaProjectOrJetBrains(descriptor)) { highlightJetbrainsOnly(descriptor, holder); return; } if (descriptor.getModuleEntry().isEmpty() && descriptor.getPlugin().isEmpty()) { holder.createProblem(descriptor, HighlightSeverity.ERROR, DevKitBundle.message("inspections.plugin.xml.dependency.descriptor.at.least.one.dependency")); return; } final IdeaPlugin ideaPlugin = descriptor.getParentOfType(IdeaPlugin.class, false); assert ideaPlugin != null; for (Dependency dependency : ideaPlugin.getDepends()) { if (dependency.getOptional().getValue() == Boolean.TRUE) continue; holder.createProblem(dependency, HighlightSeverity.ERROR, DevKitBundle.message("inspections.plugin.xml.dependency.descriptor.cannot.use.depends")).highlightWholeElement(); } }