use of org.eclipse.n4js.jsdoc2spec.adoc.SpecIndexFile in project n4js by eclipse.
the class TaskGenerateAdoc method getPackagesCountTotal.
int getPackagesCountTotal() {
File docRootDir = configAdocPage.getConfig().getDocRootDir();
String packagesDir = docRootDir + SEP + DIR_ADOC_GEN + SEP + DIR_PACKAGES;
List<String> packageFileNames = FileSystem.getAdocFileNames(packagesDir);
Collections.sort(packageFileNames);
int changedPackageFiles = 0;
int updated = 0;
if (specChangeSet != null)
for (SpecFile specFile : specChangeSet) {
if (specFile instanceof SpecIndexFile) {
// This is an approximation since e.g. the overview files are also SpecIndexFiles
// Error: 0..+2
changedPackageFiles++;
if (packageFileNames.contains(specFile.getFile().getName()))
updated++;
}
}
return packageFileNames.size() + changedPackageFiles - updated;
}
Aggregations