Java 类com.intellij.psi.impl.source.tree.CompositePsiElement 实例源码

项目:consulo-java    文件:PsiImplUtil.java   
@Nullable
public static ASTNode findStatementChild(CompositePsiElement statement)
{
    if(DebugUtil.CHECK_INSIDE_ATOMIC_ACTION_ENABLED)
    {
        ApplicationManager.getApplication().assertReadAccessAllowed();
    }
    for(ASTNode element = statement.getFirstChildNode(); element != null; element = element.getTreeNext())
    {
        if(element.getPsi() instanceof PsiStatement)
        {
            return element;
        }
    }
    return null;
}
项目:intellij-ce-playground    文件:XmlDocumentImpl.java   
@NotNull
@Override
public CompositePsiElement clone() {
  HashMap<String, CachedValue<XmlNSDescriptor>> cacheStrict = new HashMap<String, CachedValue<XmlNSDescriptor>>(
    myDefaultDescriptorsCacheStrict
  );
  HashMap<String, CachedValue<XmlNSDescriptor>> cacheNotStrict = new HashMap<String, CachedValue<XmlNSDescriptor>>(
    myDefaultDescriptorsCacheNotStrict
  );
  final XmlDocumentImpl copy = (XmlDocumentImpl) super.clone();
  updateSelfDependentDtdDescriptors(copy, cacheStrict, cacheNotStrict);
  return copy;
}
项目:tools-idea    文件:PsiImplUtil.java   
@Nullable
public static ASTNode findStatementChild(CompositePsiElement statement) {
  if (DebugUtil.CHECK_INSIDE_ATOMIC_ACTION_ENABLED) {
    ApplicationManager.getApplication().assertReadAccessAllowed();
  }
  for (ASTNode element = statement.getFirstChildNode(); element != null; element = element.getTreeNext()) {
    if (element.getPsi() instanceof PsiStatement) return element;
  }
  return null;
}
项目:tools-idea    文件:XmlDocumentImpl.java   
public CompositePsiElement clone() {
  HashMap<String, CachedValue<XmlNSDescriptor>> cacheStrict = new HashMap<String, CachedValue<XmlNSDescriptor>>(
    myDefaultDescriptorsCacheStrict
  );
  HashMap<String, CachedValue<XmlNSDescriptor>> cacheNotStrict = new HashMap<String, CachedValue<XmlNSDescriptor>>(
    myDefaultDescriptorsCacheNotStrict
  );
  final XmlDocumentImpl copy = (XmlDocumentImpl) super.clone();
  updateSelfDependentDtdDescriptors(copy, cacheStrict, cacheNotStrict);
  return copy;
}
项目:consulo-xml    文件:XmlDocumentImpl.java   
@NotNull
@Override
public CompositePsiElement clone()
{
    HashMap<String, CachedValue<XmlNSDescriptor>> cacheStrict = new HashMap<>(myDefaultDescriptorsCacheStrict);
    HashMap<String, CachedValue<XmlNSDescriptor>> cacheNotStrict = new HashMap<>(myDefaultDescriptorsCacheNotStrict);
    final XmlDocumentImpl copy = (XmlDocumentImpl) super.clone();
    updateSelfDependentDtdDescriptors(copy, cacheStrict, cacheNotStrict);
    return copy;
}
项目:intellij-ce-playground    文件:XmlCDATAContentSelectioner.java   
@Override
public boolean canSelect(PsiElement e) {
  return e instanceof CompositePsiElement &&
         ((CompositePsiElement)e).getElementType() == XmlElementType.XML_CDATA;
}
项目:tools-idea    文件:XmlCDATAContentSelectioner.java   
public boolean canSelect(PsiElement e) {
  return e instanceof CompositePsiElement &&
         ((CompositePsiElement)e).getElementType() == XmlElementType.XML_CDATA;
}
项目:consulo-xml    文件:XmlCDATAContentSelectioner.java   
public boolean canSelect(PsiElement e) {
  return e instanceof CompositePsiElement &&
         ((CompositePsiElement)e).getElementType() == XmlElementType.XML_CDATA;
}
项目:consulo-xml    文件:XmlASTCompositeFactory.java   
@NotNull
@Override
public CompositeElement createComposite(IElementType type) {
  if (type == XML_TAG) {
    return new XmlTagImpl();
  }
  else if (type == XML_CONDITIONAL_SECTION) {
    return new XmlConditionalSectionImpl();
  }
  else if (type == HTML_TAG) {
    return new HtmlTagImpl();
  }
  else if (type == XML_TEXT) {
    return new XmlTextImpl();
  }
  else if (type == XML_PROCESSING_INSTRUCTION) {
    return new XmlProcessingInstructionImpl();
  }
  else if (type == XML_DOCUMENT) {
    return new XmlDocumentImpl();
  }
  else if (type == HTML_DOCUMENT) {
    return new HtmlDocumentImpl();
  }
  else if (type == XML_PROLOG) {
    return new XmlPrologImpl();
  }
  else if (type == XML_DECL) {
    return new XmlDeclImpl();
  }
  else if (type == XML_ATTRIBUTE) {
    return new XmlAttributeImpl();
  }
  else if (type == XML_ATTRIBUTE_VALUE) {
    return new XmlAttributeValueImpl();
  }
  else if (type == XML_COMMENT) {
    return new XmlCommentImpl();
  }
  else if (type == XML_DOCTYPE) {
    return new XmlDoctypeImpl();
  }
  else if (type == XML_MARKUP_DECL) {
    return new XmlMarkupDeclImpl();
  }
  else if (type == XML_ELEMENT_DECL) {
    return new XmlElementDeclImpl();
  }
  else if (type == XML_ENTITY_DECL) {
    return new XmlEntityDeclImpl();
  }
  else if (type == XML_ATTLIST_DECL) {
    return new XmlAttlistDeclImpl();
  }
  else if (type == XML_ATTRIBUTE_DECL) {
    return new XmlAttributeDeclImpl();
  }
  else if (type == XML_NOTATION_DECL) {
    return new XmlNotationDeclImpl();
  }
  else if (type == XML_ELEMENT_CONTENT_SPEC) {
    return new XmlElementContentSpecImpl();
  }
  else if (type == XML_ELEMENT_CONTENT_GROUP) {
    return new XmlElementContentGroupImpl();
  }
  else if (type == XML_ENTITY_REF) {
    return new XmlEntityRefImpl();
  }
  else if (type == XML_ENUMERATED_TYPE) {
    return new XmlEnumeratedTypeImpl();
  }
  else if (type == XML_CDATA) {
    return new CompositePsiElement(XML_CDATA) {};
  }
  else if (type instanceof TemplateDataElementType) {
    return new XmlFileElement(type, null);
  }

  return null;
}