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