private static void annotateListeners(Listeners listeners, DomElementAnnotationHolder holder) {
    final Module module = listeners.getModule();
    if (module == null || IntelliJProjectUtil.isIntelliJPlatformProject(module.getProject())) return;

    PluginPlatformInfo platformInfo = PluginPlatformInfo.forDomElement(listeners);
    final PluginPlatformInfo.PlatformResolveStatus resolveStatus = platformInfo.getResolveStatus();

    if (resolveStatus == PluginPlatformInfo.PlatformResolveStatus.DEVKIT_NO_MAIN) {
      holder.createProblem(listeners, ProblemHighlightType.ERROR,
                           DevKitBundle.message("inspections.plugin.xml.since.build.could.not.locate.main.descriptor"), null)
        .highlightWholeElement();
      return;
    }

    if (resolveStatus == PluginPlatformInfo.PlatformResolveStatus.DEVKIT_NO_SINCE_BUILD) {
      final boolean noSinceBuildXml = !DomUtil.hasXml(platformInfo.getMainIdeaPlugin().getIdeaVersion().getSinceBuild());
      LocalQuickFix[] fixes =
        noSinceBuildXml ? new LocalQuickFix[]{new AddDomElementQuickFix<>(platformInfo.getMainIdeaPlugin().getIdeaVersion())} :
        LocalQuickFix.EMPTY_ARRAY;
      holder.createProblem(listeners, ProblemHighlightType.ERROR,
                           DevKitBundle.message("inspections.plugin.xml.since.build.must.be.specified"), null,
                           fixes)
        .highlightWholeElement();
      return;
    }

    final BuildNumber buildNumber = platformInfo.getSinceBuildNumber();
    if (buildNumber == null) {
      holder.createProblem(listeners, ProblemHighlightType.ERROR,
                           DevKitBundle.message("inspections.plugin.xml.since.build.could.not.determine.platform.version"), null)
        .highlightWholeElement();
      return;
    }

    final int baselineVersion = buildNumber.getBaselineVersion();

    boolean canHaveOsAttribute = baselineVersion >= LISTENERS_OS_ATTRIBUTE_PLATFORM_VERSION;
    if (!canHaveOsAttribute) {
      for (Listener listener : listeners.getListeners()) {
        if (DomUtil.hasXml(listener.getOs())) {
          holder.createProblem(listener.getOs(), ProblemHighlightType.ERROR,
                               DevKitBundle.message("inspections.plugin.xml.since.build.listeners.os.attribute",
                                                    LISTENERS_OS_ATTRIBUTE_PLATFORM_VERSION,
                                                    baselineVersion),
                               null)
            .highlightWholeElement();
        }
      }
    }


    if (baselineVersion >= LISTENERS_PLATFORM_VERSION) return;

    holder.createProblem(listeners, ProblemHighlightType.ERROR,
                         DevKitBundle.message("inspections.plugin.xml.since.build.listeners.not.available",
                                              LISTENERS_PLATFORM_VERSION,
                                              baselineVersion),
                         null)
      .highlightWholeElement();
  }
private static void annotateListeners(Listeners listeners, DomElementAnnotationHolder holder)