Package org.chromium.debug.core.sourcemap

Examples of org.chromium.debug.core.sourcemap.SourcePositionMapBuilder$CannotAddException


      VmResource formattedResource =
          workspaceRelations.createTemporaryFile(metadata, proposedFileName);

      SourcePositionMapBuilder.MappingHandle mappingHandle;
      try {
        SourcePositionMapBuilder builder =
            data.getConnectedTargetData().getSourcePositionMapBuilder();

        // Unformatted text is a VM text.
        StringMappingData vmTextData = result.getInputTextData();

        // Formatter text is *like* original text in our case.
        StringMappingData originalTextData = result.getFormattedTextData();

        SourcePositionMapBuilder.ResourceSection vmResourceSection =
            new SourcePositionMapBuilder.ResourceSection(data.getVmResource().getId(), 0, 0,
                vmTextData.getEndLine(), vmTextData.getEndColumn());

        SourcePositionMapBuilder.ResourceSection originalResourceSection =
            new SourcePositionMapBuilder.ResourceSection(formattedResource.getId(), 0, 0,
                originalTextData.getEndLine(), originalTextData.getEndColumn());

        TextSectionMapping mapTable =
            new TextSectionMappingImpl(originalTextData, vmTextData);

        mappingHandle = builder.addMapping(originalResourceSection, vmResourceSection, mapTable);
      } catch (SourcePositionMapBuilder.CannotAddException e) {
        formattedResource.deleteResourceAndFile();
        throw new RuntimeException(e);
      }
      metadata.mappingHandle = mappingHandle;
View Full Code Here

TOP

Related Classes of org.chromium.debug.core.sourcemap.SourcePositionMapBuilder$CannotAddException

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.