Package com.google.debugging.sourcemap

Examples of com.google.debugging.sourcemap.FilePosition


      int originalLine = position.getLine();
      int originalChar = position.getColumn();
      if (originalLine == lineIndex && originalChar >= characterPosition) {
        // If the position falls on the line itself, then normalize it
        // if it falls at or after the place the newline was inserted.
        return new FilePosition(
            originalLine + 1, originalChar - characterPosition);
      } else {
        return position;
      }
    }
View Full Code Here


    return this;
  }

  protected void startPosition(AstNode node) {
    if (generateSourceMap) {
      javaPosition = new FilePosition(RhinoJavaScriptBuilder.getLineNumber(node) - 1, RhinoJavaScriptBuilder.getColumnNumber(node) - 1);
      javaScriptPosition = new FilePosition(currentLine, currentColumn);
    }
  }
View Full Code Here

   */
  protected void endPosition(AstNode node) {
    if (generateSourceMap) {
      boolean hasPosition = javaScriptPosition != null && javaScriptPosition.getLine() != currentLine;
      if (hasPosition) {
        javaPosition = new FilePosition(RhinoJavaScriptBuilder.getEndLineNumber(node) - 1,
            RhinoJavaScriptBuilder.getEndColumnNumber(node) - 1);
        javaScriptPosition = new FilePosition(currentLine, currentColumn);
      }
    }
  }
View Full Code Here

    }
  }

  protected void addMapping() {
    if (generateSourceMap) {
      FilePosition endJavaScriptPosition = new FilePosition(currentLine, currentColumn);
      if (javaPosition != null && javaPosition.getLine() >= 0 && javaPosition.getColumn() >= 0) {
        sourceMapGenerator.addMapping(inputFile.getName(), null, javaPosition, javaScriptPosition, endJavaScriptPosition);
        javaPosition = null;
      }
    }
View Full Code Here

TOP

Related Classes of com.google.debugging.sourcemap.FilePosition

Copyright © 2018 www.massapicom. 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.