Examples of XmlElementDescriptor


Examples of com.intellij.xml.XmlElementDescriptor

  public XmlElementDescriptor getDescriptor(XmlTag xmlTag) {
    if (!(xmlTag instanceof HtmlTag && AngularIndexUtil.hasAngularJS(xmlTag.getProject()))) return null;

    final String directiveName = DirectiveUtil.normalizeAttributeName(xmlTag.getName());
    final XmlNSDescriptor nsDescriptor = xmlTag.getNSDescriptor(xmlTag.getNamespace(), false);
    final XmlElementDescriptor descriptor = nsDescriptor != null ? nsDescriptor.getElementDescriptor(xmlTag) : null;
    if (descriptor != null && !(descriptor instanceof AnyXmlElementDescriptor)) {
      return null;
    }

    final Project project = xmlTag.getProject();
View Full Code Here

Examples of com.intellij.xml.XmlElementDescriptor

        nextError = PsiTreeUtil.getNextSiblingOfType(nextError, PsiErrorElement.class);
      }
    }
    if (HTMLLanguage.INSTANCE.is(language) && error.getErrorDescription().endsWith("not closed")) {
      final PsiElement parent = error.getParent();
      final XmlElementDescriptor descriptor = parent instanceof XmlTag ? ((XmlTag)parent).getDescriptor() : null;
      return !(descriptor instanceof AngularJSTagDescriptor);
    }
    return true;
  }
View Full Code Here

Examples of com.intellij.xml.XmlElementDescriptor

    List<SimpleNode> children = new ArrayList<SimpleNode>();
    final XmlTag tag = element.getXmlTag();
   
    if (tag != null && !(tag.getContainingFile() instanceof XmlFile)) return NO_CHILDREN;
    final XmlElementDescriptor xmlElementDescriptor = tag == null ? null : tag.getDescriptor();
    final XmlElementDescriptor[] xmlDescriptors = xmlElementDescriptor == null ? null : xmlElementDescriptor.getElementsDescriptors(tag);

    for (DomFixedChildDescription description : element.getGenericInfo().getFixedChildrenDescriptions()) {
      String childName = description.getXmlElementName();
      if (xmlDescriptors != null) {
        if (findDescriptor(xmlDescriptors, childName) == -1) continue;
View Full Code Here

Examples of com.intellij.xml.XmlElementDescriptor

  @Nullable
  protected Comparator<AbstractDomElementNode> getDefaultComparator(DomElement element) {
    final XmlTag tag = element.getXmlTag();
    if (tag != null) {
      final XmlElementDescriptor descriptor = tag.getDescriptor();
      if (descriptor != null) {
        final XmlElementDescriptor[] childDescriptors = descriptor.getElementsDescriptors(tag);
        if (childDescriptors != null && childDescriptors.length > 1) {
          return new Comparator<AbstractDomElementNode>() {
            public int compare(final AbstractDomElementNode o1, final AbstractDomElementNode o2) {
              return findDescriptor(childDescriptors, o1.getTagName()) - findDescriptor(childDescriptors, o2.getTagName());
            }
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.