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

项目:intellij-ce-playground    文件:ASTFactory.java   
@NotNull
public static LazyParseableElement lazy(@NotNull final ILazyParseableElementType type, CharSequence text) {
  final ASTNode node = type.createNode(text);
  if (node != null) return (LazyParseableElement)node;

  if (type == TokenType.CODE_FRAGMENT) {
    return new CodeFragmentElement(null);
  }
  else if (type == TokenType.DUMMY_HOLDER) {
    return new DummyHolderElement(text);
  }

  final LazyParseableElement customLazy = factory(type).createLazy(type, text);
  return customLazy != null ? customLazy : DefaultFactoryHolder.DEFAULT.createLazy(type, text);
}
项目:tools-idea    文件:ASTFactory.java   
@NotNull
public static LazyParseableElement lazy(@NotNull final ILazyParseableElementType type, final CharSequence text) {
  final ASTNode node = type.createNode(text);
  if (node != null) return (LazyParseableElement)node;

  if (type == TokenType.CODE_FRAGMENT) {
    return new CodeFragmentElement(null);
  }
  else if (type == TokenType.DUMMY_HOLDER) {
    return new DummyHolderElement(text);
  }

  final LazyParseableElement customLazy = factory(type).createLazy(type, text);
  return customLazy != null ? customLazy : DefaultFactoryHolder.DEFAULT.createLazy(type, text);
}