public LeafElement rawReplaceWithText(String newText) { LeafElement newLeaf = ASTFactory.leaf(getElementType(), newText); copyUserDataTo(newLeaf); rawReplaceWithList(newLeaf); newLeaf.clearCaches(); return newLeaf; }
public TreeElement createContentLeafElement(CharSequence leafText) { if (myContentElementType instanceof ILazyParseableElementType) { return ASTFactory.lazy((ILazyParseableElementType) myContentElementType, leafText); } return ASTFactory.leaf(myContentElementType, leafText); }
@Override public ASTNode parseContents(ASTNode chameleon) { final CharSequence chars = chameleon.getChars(); return ASTFactory.leaf(PlainTextTokenTypes.PLAIN_TEXT, chars); }