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;