@Override
  public @NotNull List<DomElementProblemDescriptor> checkRequired(final DomElement element, final DomElementAnnotationHolder holder) {
    final Required required = element.getAnnotation(Required.class);
    if (required != null) {
      final XmlElement xmlElement = element.getXmlElement();
      if (xmlElement == null) {
        if (required.value()) {
          final String xmlElementName = element.getXmlElementName();
          String namespace = element.getXmlElementNamespace();
          if (element instanceof GenericAttributeValue) {
            return Collections.singletonList(holder.createProblem(element, XmlDomBundle.message(
              "dom.inspections.attribute.0.should.be.defined", xmlElementName),
                                                              new DefineAttributeQuickFix(xmlElementName, namespace)));
          }
          return Collections.singletonList(
            holder.createProblem(
              element,
              HighlightSeverity.ERROR,
              XmlDomBundle.message("dom.inspections.child.tag.0.should.be.defined", xmlElementName),
              new AddRequiredSubtagFix(xmlElementName, namespace)
            )
          );
        }
      }
      else if (element instanceof GenericDomValue) {
        return ContainerUtil.createMaybeSingletonList(checkRequiredGenericValue((GenericDomValue)element, required, holder));
      }
    }
    if (DomUtil.hasXml(element)) {
      final SmartList<DomElementProblemDescriptor> list = new SmartList<>();
      final DomGenericInfo info = element.getGenericInfo();
      for (final AbstractDomChildrenDescription description : info.getChildrenDescriptions()) {
        if (description instanceof DomCollectionChildDescription childDescription && description.getValues(element).isEmpty()) {
          final Required annotation = description.getAnnotation(Required.class);
          if (annotation != null && annotation.value()) {
            list.add(holder.createProblem(element, childDescription, XmlDomBundle.message("dom.inspections.child.tag.0.should.be.defined", ((DomCollectionChildDescription)description).getXmlElementName())));
          }
        }
      }
      return list;
    }
    return Collections.emptyList();
  }
@Override
  public @NotNull List<DomElementProblemDescriptor> checkRequired(final DomElement element, final DomElementAnnotationHolder holder)