XmlAttributeDescriptor[] (final @Nullable XmlTag context) { if (context == null) return XmlAttributeDescriptor.EMPTY; DomElement domElement = myManager.getDomElement(context); if (domElement == null) return XmlAttributeDescriptor.EMPTY; final List<? extends DomAttributeChildDescription<?>> descriptions = domElement.getGenericInfo().getAttributeChildrenDescriptions(); List<XmlAttributeDescriptor> descriptors = new ArrayList<>(); for (DomAttributeChildDescription<?> description : descriptions) { descriptors.add(new DomAttributeXmlDescriptor(description, myManager.getProject())); } List<? extends CustomDomChildrenDescription> customs = domElement.getGenericInfo().getCustomNameChildrenDescription(); for (CustomDomChildrenDescription custom : customs) { CustomDomChildrenDescription.AttributeDescriptor descriptor = custom.getCustomAttributeDescriptor(); if (descriptor != null) { for (EvaluatedXmlName variant : descriptor.getCompletionVariants(domElement)) { AttributeChildDescriptionImpl childDescription = new AttributeChildDescriptionImpl(variant.getXmlName(), String.class); descriptors.add(new DomAttributeXmlDescriptor(childDescription, myManager.getProject())); } } } return descriptors.toArray(XmlAttributeDescriptor.EMPTY); }