Examples of SourceMapConsumerV3


Examples of com.github.sommeri.sourcemap.SourceMapConsumerV3

    validateSourceMap(compilationResult, mapdataFile, null);
  }

  public void validateSourceMap(CompilationResult compilationResult, File mapdataFile, File cssFileLocation) {
    initializeGeneratedCss(compilationResult);
    SourceMapConsumerV3 sourceMap = parseGeneratedMap(compilationResult);

    Mapdata mapdata = checkAgainstMapdataFile(sourceMap, mapdataFile);
    loadMappedSourceFiles(sourceMap.getOriginalSources(), getSourceRoot(cssFileLocation));

    validateSymbolMappings(sourceMap, mapdata);
  }
View Full Code Here

Examples of com.github.sommeri.sourcemap.SourceMapConsumerV3

    return "";
  }

  private SourceMapConsumerV3 parseGeneratedMap(CompilationResult compilationResult) {
    try {
      SourceMapConsumerV3 sourceMap = new SourceMapConsumerV3();
      sourceMap.parse(compilationResult.getSourceMap());
      return sourceMap;
    } catch (SourceMapParseException e) {
      throw new RuntimeException(e);
    }
  }
View Full Code Here

Examples of com.google.debugging.sourcemap.SourceMapConsumerV3

   */
  public SourceMapConsumerV3 getSourceMap() {
    if (parsedSourceMap == null) {
      synchronized (this) {
        if (parsedSourceMap == null) {
          parsedSourceMap = new SourceMapConsumerV3();
          try {
            parsedSourceMap.parse(sourceFile.getCode());
          } catch (IOException | SourceMapParseException parseFailure) {
            logger.log(
                Level.WARNING, "Failed to parse sourcemap", parseFailure);
View Full Code Here

Examples of com.google.debugging.sourcemap.SourceMapConsumerV3

    return Format.V3;
  }

  @Override
  protected SourceMapConsumer getSourceMapConsumer() {
    return new SourceMapConsumerV3();
  }
View Full Code Here

Examples of com.google.gwt.thirdparty.debugging.sourcemap.SourceMapConsumerV3

  /**
   * Reads a source map from disk and parses it into an in-memory representation.
   * If it can't be loaded, logs a warning and returns an empty source map.
   */
  static ReverseSourceMap load(TreeLogger logger, File sourceMapFile) {
    SourceMapConsumerV3 consumer = new SourceMapConsumerV3();
    String unparsed = Util.readFileAsString(sourceMapFile);
    try {
      consumer.parse(unparsed);
      return new ReverseSourceMap(consumer);
    } catch (SourceMapParseException e) {
      logger.log(TreeLogger.WARN, "can't parse source map", e);
      return new ReverseSourceMap(null);
    }
View Full Code Here

Examples of com.google.gwt.thirdparty.debugging.sourcemap.SourceMapConsumerV3

        new FilePosition(99, 0), new FilePosition(99, 1));

    StringBuilder generated = new StringBuilder();
    generator.appendTo(generated, "test");

    SourceMapConsumerV3 consumer = new SourceMapConsumerV3();
    consumer.parse(generated.toString());

    final StringBuilder out = new StringBuilder();
    out.append("Mappings:\n");

    consumer.visitMappings(new EntryVisitor() {
      @Override
      public void visit(String javaFile, String javaName, FilePosition javaStart,
          FilePosition jsStart, FilePosition jsEnd) {

        if (javaFile.equals("Dummy")) {
View Full Code Here

Examples of com.google.gwt.thirdparty.debugging.sourcemap.SourceMapConsumerV3

  private void checkSourceMap(File symbolMap, List<File> sourceMapFiles)
      throws Exception {
    final Map<String, SimpleSymbolData> symbolTable = SimpleSymbolData.readSymbolMap(symbolMap);
    boolean firstIteration = true;
    for (File sourceMapFile : sourceMapFiles) {
      SourceMapConsumerV3 sourceMap = new SourceMapConsumerV3();
      sourceMap.parse(stringContent(sourceMapFile));
      if (firstIteration) {
        Integer permutationId = (Integer) sourceMap.getExtensions().get("x_gwt_permutation");
        assertNotNull(permutationId);
        mapping.put(permutationId, symbolTable);
        firstIteration = false;
      }
      sourceMap.visitMappings(new  SourceMapConsumerV3.EntryVisitor() {
        @Override
        public void visit(String sourceName, String symbolName,
            FilePosition srcStartPos, FilePosition startPosition,FilePosition endPosition) {
          if (symbolName == null || symbolName.isEmpty()) {
            return;
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.