LeafElement (@NotNull IElementType type, @NotNull CharSequence buffer, int startOffset, int endOffset, CharTable table, @NotNull PsiManager manager, boolean generatedFlag) { FileElement holderElement = DummyHolderFactory.createHolder(manager, table, type.getLanguage()).getTreeElement(); LeafElement newElement = ASTFactory.leaf(type, holderElement.getCharTable().intern( buffer, startOffset, endOffset)); holderElement.rawAddChildren(newElement); if(generatedFlag) CodeEditUtil.setNodeGenerated(newElement, true); return newElement; }