Examples of resetTo()


Examples of org.eclipse.jdt.core.compiler.IScanner.resetTo()

     * found, accumulate any additional comments up to the stop condition.
     * The stop condition is reaching a package declaration, import container,
     * or the end of the input.
     */
    IScanner scanner = ctx.getScanner();
    scanner.resetTo(start, end);

    int headerStart = -1;
    int headerEnd = -1;
    try {
      boolean foundComment = false;
View Full Code Here

Examples of org.eclipse.jdt.core.compiler.IScanner.resetTo()

        }
      }

      final int shift = range.getOffset();
      IScanner scanner = ctx.getScanner();
      scanner.resetTo(shift, shift + range.getLength());

      int start = shift;
      while (true) {

        int token = scanner.getNextToken();
View Full Code Here

Examples of org.eclipse.jdt.core.compiler.IScanner.resetTo()

     * found, accumulate any additional comments up to the stop condition.
     * The stop condition is reaching a package declaration, import container,
     * or the end of the input.
     */
    IScanner scanner = ctx.getScanner();
    scanner.resetTo(start, end);

    int headerStart = -1;
    int headerEnd = -1;
    try {
      boolean foundComment = false;
View Full Code Here

Examples of org.eclipse.jdt.core.compiler.IScanner.resetTo()

          scanner.setSource(buffer.getText(start, length).toCharArray());
          int token= scanner.getNextToken();
          if (token != ITerminalSymbols.TokenNameEOF) {
            int tStart= scanner.getCurrentTokenStartPosition();
            if (tStart == result.getStartPosition() - start) {
              scanner.resetTo(tStart + result.getLength(), length - 1);
              token= scanner.getNextToken();
              if (token == ITerminalSymbols.TokenNameEOF)
                return result;
            }
          }
View Full Code Here

Examples of org.eclipse.jdt.core.compiler.IScanner.resetTo()

          scanner.setSource(buffer.getText(start, length).toCharArray());
          int token= scanner.getNextToken();
          if (token != ITerminalSymbols.TokenNameEOF) {
            int tStart= scanner.getCurrentTokenStartPosition();
            if (tStart == result.getStartPosition() - start) {
              scanner.resetTo(tStart + result.getLength(), length - 1);
              token= scanner.getNextToken();
              if (token == ITerminalSymbols.TokenNameEOF)
                return result;
            }
          }
View Full Code Here

Examples of org.eclipse.jdt.core.compiler.IScanner.resetTo()

        }
      }

      final int shift = range.getOffset();
      IScanner scanner = ctx.getScanner();
      scanner.resetTo(shift, shift + range.getLength());

      int start = shift;
      while (true) {

        int token = scanner.getNextToken();
View Full Code Here

Examples of org.eclipse.jdt.internal.compiler.parser.Scanner.resetTo()

    int trimRightPosition = expression.sourceEnd;
    boolean first = true;
    Scanner removeBlankScanner = this.ast.scanner;
    try {
      removeBlankScanner.setSource(this.compilationUnitSource);
      removeBlankScanner.resetTo(start, end);
      while (true) {
        token = removeBlankScanner.getNextToken();
        switch (token) {
          case TerminalTokens.TokenNameCOMMENT_JAVADOC :
          case TerminalTokens.TokenNameCOMMENT_LINE :
View Full Code Here

Examples of org.eclipse.jdt.internal.compiler.parser.Scanner.resetTo()

  DOMNode first = (DOMNode) getFirstChild();
  DOMNode lastNode = null;
  // look for the open body
  Scanner scanner = new Scanner();
  scanner.setSource(this.fDocument);
  scanner.resetTo(this.fNameRange[1] + 1, this.fDocument.length);

  try {
    int currentToken = scanner.getNextToken();
    while(currentToken != TerminalTokens.TokenNameLBRACE &&
        currentToken != TerminalTokens.TokenNameEOF) {
View Full Code Here

Examples of org.eclipse.jdt.internal.compiler.parser.Scanner.resetTo()

      while (lastNode.getNextNode() != null) {
        lastNode = (DOMNode) lastNode.getNextNode();
      }
    }
    scanner.setSource(this.fDocument);
    scanner.resetTo(lastNode.getEndPosition() + 1, this.fDocument.length);
    try {
      int currentToken = scanner.getNextToken();
      while(currentToken != TerminalTokens.TokenNameRBRACE &&
          currentToken != TerminalTokens.TokenNameEOF) {
        currentToken = scanner.getNextToken();
View Full Code Here

Examples of org.eclipse.jdt.internal.compiler.parser.Scanner.resetTo()

    } catch(InvalidInputException e) {
      closeBodyStart = this.fDocument.length;
      closeBodyEnd = this.fDocument.length;
    }
  } else {
    scanner.resetTo(openBodyEnd, this.fDocument.length);
    try {
      int currentToken = scanner.getNextToken();
      while(currentToken != TerminalTokens.TokenNameRBRACE &&
          currentToken != TerminalTokens.TokenNameEOF) {
        currentToken = scanner.getNextToken();
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.