当前位置: 首页>>代码示例>>Java>>正文


Java CompositePsiElement类代码示例

本文整理汇总了Java中com.intellij.psi.impl.source.tree.CompositePsiElement的典型用法代码示例。如果您正苦于以下问题:Java CompositePsiElement类的具体用法?Java CompositePsiElement怎么用?Java CompositePsiElement使用的例子?那么, 这里精选的类代码示例或许可以为您提供帮助。


CompositePsiElement类属于com.intellij.psi.impl.source.tree包,在下文中一共展示了CompositePsiElement类的8个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。

示例1: findStatementChild

import com.intellij.psi.impl.source.tree.CompositePsiElement; //导入依赖的package包/类
@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;
}
 
开发者ID:consulo,项目名称:consulo-java,代码行数:17,代码来源:PsiImplUtil.java

示例2: clone

import com.intellij.psi.impl.source.tree.CompositePsiElement; //导入依赖的package包/类
@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;
}
 
开发者ID:jskierbi,项目名称:intellij-ce-playground,代码行数:14,代码来源:XmlDocumentImpl.java

示例3: findStatementChild

import com.intellij.psi.impl.source.tree.CompositePsiElement; //导入依赖的package包/类
@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;
}
 
开发者ID:lshain-android-source,项目名称:tools-idea,代码行数:11,代码来源:PsiImplUtil.java

示例4: clone

import com.intellij.psi.impl.source.tree.CompositePsiElement; //导入依赖的package包/类
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;
}
 
开发者ID:lshain-android-source,项目名称:tools-idea,代码行数:12,代码来源:XmlDocumentImpl.java

示例5: clone

import com.intellij.psi.impl.source.tree.CompositePsiElement; //导入依赖的package包/类
@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;
}
 
开发者ID:consulo,项目名称:consulo-xml,代码行数:11,代码来源:XmlDocumentImpl.java

示例6: canSelect

import com.intellij.psi.impl.source.tree.CompositePsiElement; //导入依赖的package包/类
@Override
public boolean canSelect(PsiElement e) {
  return e instanceof CompositePsiElement &&
         ((CompositePsiElement)e).getElementType() == XmlElementType.XML_CDATA;
}
 
开发者ID:jskierbi,项目名称:intellij-ce-playground,代码行数:6,代码来源:XmlCDATAContentSelectioner.java

示例7: canSelect

import com.intellij.psi.impl.source.tree.CompositePsiElement; //导入依赖的package包/类
public boolean canSelect(PsiElement e) {
  return e instanceof CompositePsiElement &&
         ((CompositePsiElement)e).getElementType() == XmlElementType.XML_CDATA;
}
 
开发者ID:lshain-android-source,项目名称:tools-idea,代码行数:5,代码来源:XmlCDATAContentSelectioner.java

示例8: createComposite

import com.intellij.psi.impl.source.tree.CompositePsiElement; //导入依赖的package包/类
@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;
}
 
开发者ID:consulo,项目名称:consulo-xml,代码行数:82,代码来源:XmlASTCompositeFactory.java


注:本文中的com.intellij.psi.impl.source.tree.CompositePsiElement类示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。