Examples of adjustLength()


Examples of org.eclipse.wst.sse.core.internal.provisional.text.IStructuredDocumentRegion.adjustLength()

          // DW 4/16/2003 regions no longer have parents
          // region.setParent(container);
          region.adjustStart(container.getLength() - region.getStart());
        }
        currentNode.getLastRegion().adjustLength(region.getLength());
        currentNode.adjustLength(region.getLength());
      }
      else if (type == DOMRegionContext.UNDEFINED && currentNode != null) {
        // skip on a very-first region situation as the default
        // behavior is good enough
        // combine with previous if also undefined
View Full Code Here

Examples of org.eclipse.wst.sse.core.internal.provisional.text.IStructuredDocumentRegion.adjustLength()

        // skip on a very-first region situation as the default
        // behavior is good enough
        // combine with previous if also undefined
        if (currentNode.getLastRegion() != null && currentNode.getLastRegion().getType() == DOMRegionContext.UNDEFINED) {
          currentNode.getLastRegion().adjustLength(region.getLength());
          currentNode.adjustLength(region.getLength());
        }
        // previous wasn't undefined
        else {
          currentNode.addRegion(region);
          currentNode.setLength(region.getStart() + region.getLength() - currentNode.getStart());
View Full Code Here

Examples of org.eclipse.wst.sse.core.internal.provisional.text.IStructuredDocumentRegion.adjustLength()

          // DW, 4/16/2003 token regions no longer have parents
          // region.setParent(container);
          region.adjustStart(container.getLength() - region.getStart());
        }
        currentNode.getLastRegion().adjustLength(region.getLength());
        currentNode.adjustLength(region.getLength());
      }
      else if (type == DOMRegionContext.UNDEFINED && currentNode != null) {
        // skip on a very-first region situation as the default
        // behavior is good enough
        // combine with previous if also undefined
View Full Code Here

Examples of org.eclipse.wst.sse.core.internal.provisional.text.IStructuredDocumentRegion.adjustLength()

        // skip on a very-first region situation as the default
        // behavior is good enough
        // combine with previous if also undefined
        if (currentNode.getLastRegion() != null && currentNode.getLastRegion().getType() == DOMRegionContext.UNDEFINED) {
          currentNode.getLastRegion().adjustLength(region.getLength());
          currentNode.adjustLength(region.getLength());

          //if adding this region to a previous container then need to add this
          //region to the container and update its start location
          if(currentNode.getLastRegion() instanceof ITextRegionContainer) {
            region.adjustStart(-currentNode.getLastRegion().getStart() - currentNode.getStart());
View Full Code Here

Examples of org.eclipse.wst.sse.core.internal.provisional.text.ITextRegion.adjustLength()

    assert phpTokens.size() > 0;
    // if we can only adjust the previous token size
    if (yylex == AbstractPhpLexer.WHITESPACE) {
      final ITextRegion last = phpTokens.getLast();
      last.adjustLength(yylength);
    } else { // else - add as a new token
      final ContextRegion contextRegion = new ContextRegion(yylex, start,
          yylengthLength, yylength);
      phpTokens.addLast(contextRegion);
    }
View Full Code Here

Examples of org.eclipse.wst.sse.core.internal.provisional.text.ITextRegion.adjustLength()

    // if state was change - we add a new token and add state
    if (lexerStateChanges.size() != 0
        && getLastChange().state.equals(lexerState)) {
      final ITextRegion last = phpTokens.getLast();
      last.adjustLength(yylength);
    }
  }

  /**
   * This node represent a change in the lexer state during lexical analysis
View Full Code Here

Examples of org.eclipse.wst.sse.core.internal.provisional.text.ITextRegion.adjustLength()

        // if state was change - we add a new token and add state
        if (lexerStateChanges.size() != 0
                && getLastChange().state.equals(lexerState)) {
            final ITextRegion last = twigTokens.getLast();
            last.adjustLength(yylength);
        }
    }

    public void reset()
    {
View Full Code Here

Examples of org.eclipse.wst.sse.core.internal.provisional.text.ITextRegion.adjustLength()

        assert twigTokens.size() > 0;
        // if we can only adjust the previous token size
        if (yylex == AbstractTwigLexer.WHITESPACE) {
            final ITextRegion last = twigTokens.getLast();
            last.adjustLength(yylength);
        } else { // else - add as a new token
            final ContextRegion contextRegion = new ContextRegion(yylex, start,
                    yylengthLength, yylength);
            twigTokens.addLast(contextRegion);
        }
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.