use of org.jacoco.report.IReportGroupVisitor in project jacoco by jacoco.
the class ReportTask method createReport.
private void createReport(final IReportGroupVisitor visitor, final GroupElement group) throws IOException {
if (group.name == null) {
throw new BuildException("Group name must be supplied", getLocation());
}
if (group.children.isEmpty()) {
final IBundleCoverage bundle = createBundle(group);
final SourceFilesElement sourcefiles = group.sourcefiles;
final AntResourcesLocator locator = new AntResourcesLocator(sourcefiles.encoding, sourcefiles.tabWidth);
locator.addAll(sourcefiles.iterator());
if (!locator.isEmpty()) {
checkForMissingDebugInformation(bundle);
}
visitor.visitBundle(bundle, locator);
} else {
final IReportGroupVisitor groupVisitor = visitor.visitGroup(group.name);
for (final GroupElement child : group.children) {
createReport(groupVisitor, child);
}
}
}
Aggregations