Class XtendPartialParsingHelper

  • All Implemented Interfaces:
    org.eclipse.xtext.parser.antlr.IPartialParsingHelper

    public class XtendPartialParsingHelper
    extends org.eclipse.xtext.xbase.parser.TokenSequencePreservingPartialParsingHelper
    A customized partial parsing helper that falls eagerly back to a full parse as soon as the new token sequence would be different from the old one. This approach allows to benefit from partial parsing whenever a token content is edited (e.g. the content of a comment, identifier or string literal) while not producing bogus lookahead information. Mostly copied and refactored from the default implementation.
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      protected boolean isSameTokenSequence​(java.lang.String originalText, java.lang.String newText, int expectedLength)  
      • Methods inherited from class org.eclipse.xtext.xbase.parser.TokenSequencePreservingPartialParsingHelper

        calculatePartialParsingPointers, doParseRegion, filterInvalidRootNodes, fullyReparse, getAllParents, getLeftNode, getOldSemanticElement, getReplacedNode, getRightNode, insertChangeIntoReplaceRegion, internalFindValidReplaceRootNodeForChangeRegion, isActionNode, isBrokenPreviousState, isInvalidRootNode, isSameTokenSequence, reparse, replaceOldSemanticElement, unloadSemanticObject
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Constructor Detail

      • XtendPartialParsingHelper

        public XtendPartialParsingHelper()
    • Method Detail

      • isSameTokenSequence

        protected boolean isSameTokenSequence​(java.lang.String originalText,
                                              java.lang.String newText,
                                              int expectedLength)
        Overrides:
        isSameTokenSequence in class org.eclipse.xtext.xbase.parser.TokenSequencePreservingPartialParsingHelper