use of com.google.devtools.intellij.ideinfo.IntellijIdeInfo.PackageManifest in project intellij by bazelbuild.
the class PackageManifestReader method parseManifestFile.
private static Map<ArtifactLocation, String> parseManifestFile(File packageManifest) {
Map<ArtifactLocation, String> outputMap = Maps.newHashMap();
InputStreamProvider inputStreamProvider = InputStreamProvider.getInstance();
try (InputStream input = inputStreamProvider.getFile(packageManifest)) {
try (BufferedInputStream bufferedInputStream = new BufferedInputStream(input)) {
PackageManifest proto = PackageManifest.parseFrom(bufferedInputStream);
for (JavaSourcePackage source : proto.getSourcesList()) {
outputMap.put(fromProto(source.getArtifactLocation()), source.getPackageString());
}
}
return outputMap;
} catch (IOException e) {
logger.error(e);
return outputMap;
}
}
Aggregations