Exemplo n.º 1
0
 public LeafElement rawReplaceWithText(String newText) {
   LeafElement newLeaf = ASTFactory.leaf(getElementType(), newText);
   copyUserDataTo(newLeaf);
   rawReplaceWithList(newLeaf);
   newLeaf.clearCaches();
   return newLeaf;
 }
Exemplo n.º 2
0
 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);
 }