下面列出了怎么用com.intellij.psi.tree.ICompositeElementType的API类实例代码及写法,或者点击链接到github查看源代码。
@Nonnull
@Override
public CompositeElement createComposite(@Nonnull IElementType type) {
if (type instanceof IFileElementType) {
return new FileElement(type, null);
}
if (type instanceof ICompositeElementType) {
return (CompositeElement)((ICompositeElementType)type).createCompositeNode();
}
return new CompositeElement(type);
}