com.intellij.psi.impl.source.html.dtd.HtmlNSDescriptorImpl Java Examples

The following examples show how to use com.intellij.psi.impl.source.html.dtd.HtmlNSDescriptorImpl. You can vote up the ones you like or vote down the ones you don't like, and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example #1
Source File: ISMLTagDescriptor.java    From intellij-demandware with MIT License 6 votes vote down vote up
@Override
public XmlAttributeDescriptor[] getAttributesDescriptors(@Nullable XmlTag context) {
    if (context != null) {
        final String tagName = context.getName();
        if (attrMap.containsKey(tagName)) {
            final String[] attrs = attrMap.get(tagName).split(",");
            final XmlAttributeDescriptor[] result = new XmlAttributeDescriptor[attrs.length];
            for (int i = 0; i < attrs.length; i++) {
                result[i] = new ISMLXmlAttributeDescriptor(tagName, attrs[i]);
            }
            return result;
        }
    }
    final XmlAttributeDescriptor[] commonAttributes = HtmlNSDescriptorImpl.getCommonAttributeDescriptors(context);
    return RelaxedHtmlFromSchemaElementDescriptor.addAttrDescriptorsForFacelets(context, commonAttributes);
}
 
Example #2
Source File: ViewHelperXmlElementDescriptor.java    From idea-php-typo3-plugin with MIT License 5 votes vote down vote up
@Override
public XmlAttributeDescriptor[] getAttributesDescriptors(@Nullable XmlTag context) {
    Collection<XmlAttributeDescriptor> attributeDescriptors = new ArrayList<>();

    viewHelper.arguments.forEach((s, viewHelperArgument) -> {
        attributeDescriptors.add(new ViewHelperArgumentDescriptor(viewHelper, viewHelperArgument));
    });

    final XmlAttributeDescriptor[] commonAttributes = HtmlNSDescriptorImpl.getCommonAttributeDescriptors(context);

    return ArrayUtil.mergeArrays(attributeDescriptors.toArray(new XmlAttributeDescriptor[0]), commonAttributes);
}
 
Example #3
Source File: WeexTagDescriptor.java    From weex-language-support with MIT License 5 votes vote down vote up
@Override
public XmlAttributeDescriptor[] getAttributesDescriptors(@Nullable XmlTag context) {
    XmlAttributeDescriptor[] attributeDescriptors = HtmlNSDescriptorImpl.getCommonAttributeDescriptors(context);
    XmlAttributeDescriptor[] customAttributes = new XmlAttributeDescriptor[1];
    customAttributes[0] = new AnyXmlAttributeDescriptor("weex");
    return ArrayUtil.mergeArrays(attributeDescriptors, customAttributes);
}