boolean (XmlElementDescriptor descriptor, XmlTag context) { XmlAttributeDescriptor[] attributes = descriptor.getAttributesDescriptors(context); int required = WebEditorOptions.getInstance().isAutomaticallyInsertRequiredAttributes() ? ArraysKt.count(attributes, (attribute) -> attribute.isRequired() && context.getAttribute(attribute.getName()) == null) : 0; return attributes.length - required > 0 ; }