Search in sources :

Example 1 with SourceFile

use of com.android.common.ide.common.blame.SourceFile in project buck by facebook.

the class Actions method getResultingSourceMapping.

public ImmutableMultimap<Integer, Record> getResultingSourceMapping(@NonNull XmlDocument xmlDocument) throws ParserConfigurationException, SAXException, IOException {
    SourceFile inMemory = SourceFile.UNKNOWN;
    XmlDocument loadedWithLineNumbers = XmlLoader.load(xmlDocument.getSelectors(), xmlDocument.getSystemPropertyResolver(), inMemory, xmlDocument.prettyPrint(), XmlDocument.Type.MAIN, Optional.<String>absent());
    ImmutableMultimap.Builder<Integer, Record> mappingBuilder = ImmutableMultimap.builder();
    for (XmlElement xmlElement : loadedWithLineNumbers.getRootNode().getMergeableElements()) {
        parse(xmlElement, mappingBuilder);
    }
    return mappingBuilder.build();
}
Also used : SourceFile(com.android.common.ide.common.blame.SourceFile) ImmutableMultimap(com.google.common.collect.ImmutableMultimap)

Aggregations

SourceFile (com.android.common.ide.common.blame.SourceFile)1 ImmutableMultimap (com.google.common.collect.ImmutableMultimap)1