com.intellij.xml.XmlNSDescriptor Java Examples

The following examples show how to use com.intellij.xml.XmlNSDescriptor. 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: RTRequireTagDescriptor.java    From react-templates-plugin with MIT License 5 votes vote down vote up
@Override
public XmlElementDescriptor getElementDescriptor(XmlTag childTag, XmlTag contextTag) {
    XmlTag parent = contextTag.getParentTag();
    if (parent == null) return null;
    final XmlNSDescriptor descriptor = parent.getNSDescriptor(childTag.getNamespace(), true);
    return descriptor == null ? null : descriptor.getElementDescriptor(childTag);
}
 
Example #2
Source File: RTClassTagDescriptor.java    From react-templates-plugin with MIT License 5 votes vote down vote up
@Override
public XmlElementDescriptor getElementDescriptor(XmlTag childTag, XmlTag contextTag) {
    XmlTag parent = contextTag.getParentTag();
    if (parent == null) return null;
    final XmlNSDescriptor descriptor = parent.getNSDescriptor(childTag.getNamespace(), true);
    return descriptor == null ? null : descriptor.getElementDescriptor(childTag);
}
 
Example #3
Source File: RTImportTagDescriptor.java    From react-templates-plugin with MIT License 5 votes vote down vote up
@Override
public XmlElementDescriptor getElementDescriptor(XmlTag childTag, XmlTag contextTag) {
    XmlTag parent = contextTag.getParentTag();
    if (parent == null) return null;
    final XmlNSDescriptor descriptor = parent.getNSDescriptor(childTag.getNamespace(), true);
    return descriptor == null ? null : descriptor.getElementDescriptor(childTag);
}
 
Example #4
Source File: RTImportTagDescriptor.java    From react-templates-plugin with MIT License 5 votes vote down vote up
@Override
public XmlElementDescriptor getElementDescriptor(XmlTag childTag, XmlTag contextTag) {
    XmlTag parent = contextTag.getParentTag();
    if (parent == null) return null;
    final XmlNSDescriptor descriptor = parent.getNSDescriptor(childTag.getNamespace(), true);
    return descriptor == null ? null : descriptor.getElementDescriptor(childTag);
}
 
Example #5
Source File: RTRequireTagDescriptor.java    From react-templates-plugin with MIT License 5 votes vote down vote up
@Override
public XmlElementDescriptor getElementDescriptor(XmlTag childTag, XmlTag contextTag) {
    XmlTag parent = contextTag.getParentTag();
    if (parent == null) return null;
    final XmlNSDescriptor descriptor = parent.getNSDescriptor(childTag.getNamespace(), true);
    return descriptor == null ? null : descriptor.getElementDescriptor(childTag);
}
 
Example #6
Source File: XmlDescriptorUtil.java    From idea-php-typo3-plugin with MIT License 5 votes vote down vote up
public static XmlElementDescriptor getElementDescriptor(XmlTag childTag, XmlTag contextTag) {
    final XmlDocument document = PsiTreeUtil.getParentOfType(contextTag, XmlDocument.class);
    if (document == null) {
        return null;
    }
    final XmlNSDescriptor nsDescriptor = document.getDefaultNSDescriptor(childTag.getNamespace(), true);
    if (nsDescriptor instanceof XmlNSDescriptorEx) {
        XmlElementDescriptor descriptor = ((XmlNSDescriptorEx) nsDescriptor).getElementDescriptor(childTag.getLocalName(), childTag.getNamespace());
        return descriptor != null ? wrapInDelegating(descriptor) : null;
    }
    return null;
}
 
Example #7
Source File: ISMLTagDescriptor.java    From intellij-demandware with MIT License 5 votes vote down vote up
@Override
public XmlElementDescriptor getElementDescriptor(XmlTag childTag, XmlTag contextTag) {
    XmlTag parent = contextTag.getParentTag();
    if (parent == null) return null;
    final XmlNSDescriptor descriptor = parent.getNSDescriptor(childTag.getNamespace(), true);
    return descriptor == null ? null : descriptor.getElementDescriptor(childTag);
}
 
Example #8
Source File: RTClassTagDescriptor.java    From react-templates-plugin with MIT License 5 votes vote down vote up
@Override
public XmlElementDescriptor getElementDescriptor(XmlTag childTag, XmlTag contextTag) {
    XmlTag parent = contextTag.getParentTag();
    if (parent == null) return null;
    final XmlNSDescriptor descriptor = parent.getNSDescriptor(childTag.getNamespace(), true);
    return descriptor == null ? null : descriptor.getElementDescriptor(childTag);
}
 
Example #9
Source File: ISMLTagDescriptorsProvider.java    From intellij-demandware with MIT License 5 votes vote down vote up
@Nullable
@Override
public XmlElementDescriptor getDescriptor(XmlTag tag) {
    if (!(tag instanceof HtmlTag)) {
        return null;
    }

    final XmlNSDescriptor nsDescriptor = tag.getNSDescriptor(tag.getNamespace(), false);
    final XmlElementDescriptor descriptor = nsDescriptor != null ? nsDescriptor.getElementDescriptor(tag) : null;
    if (descriptor != null && !(descriptor instanceof AnyXmlElementDescriptor)) {
        return null;
    }

    return new ISMLTagDescriptor(tag.getName(), tag);
}
 
Example #10
Source File: RTRequireTagDescriptor.java    From react-templates-plugin with MIT License 4 votes vote down vote up
@Override
public XmlNSDescriptor getNSDescriptor() {
    return null;
}
 
Example #11
Source File: RTRequireTagDescriptor.java    From react-templates-plugin with MIT License 4 votes vote down vote up
@Override
public XmlNSDescriptor getNSDescriptor() {
    return null;
}
 
Example #12
Source File: RTImportTagDescriptor.java    From react-templates-plugin with MIT License 4 votes vote down vote up
@Override
public XmlNSDescriptor getNSDescriptor() {
    return null;
}
 
Example #13
Source File: RTClassTagDescriptor.java    From react-templates-plugin with MIT License 4 votes vote down vote up
@Override
public XmlNSDescriptor getNSDescriptor() {
    return null;
}
 
Example #14
Source File: ISMLTagDescriptor.java    From intellij-demandware with MIT License 4 votes vote down vote up
@Override
public XmlNSDescriptor getNSDescriptor() {
    return null;
}
 
Example #15
Source File: RTImportTagDescriptor.java    From react-templates-plugin with MIT License 4 votes vote down vote up
@Override
public XmlNSDescriptor getNSDescriptor() {
    return null;
}
 
Example #16
Source File: RTClassTagDescriptor.java    From react-templates-plugin with MIT License 4 votes vote down vote up
@Override
public XmlNSDescriptor getNSDescriptor() {
    return null;
}
 
Example #17
Source File: AfxFusionElementDescriptorProvider.java    From intellij-neos with GNU General Public License v3.0 4 votes vote down vote up
@Nullable
@Override
public XmlNSDescriptor getNSDescriptor() {
    return null;
}
 
Example #18
Source File: WeexTagDescriptor.java    From weex-language-support with MIT License 4 votes vote down vote up
@Override
public XmlNSDescriptor getNSDescriptor() {
    return null;
}
 
Example #19
Source File: ViewHelperXmlElementDescriptor.java    From idea-php-typo3-plugin with MIT License 4 votes vote down vote up
@Nullable
@Override
public XmlNSDescriptor getNSDescriptor() {
    return null;
}