Search in sources :

Example 1 with SpecModuleFile

use of org.eclipse.n4js.jsdoc2spec.adoc.SpecModuleFile in project n4js by eclipse.

the class TaskGenerateAdoc method getModulesCountTotal.

int getModulesCountTotal() {
    File docRootDir = configAdocPage.getConfig().getDocRootDir();
    String modulesDir = docRootDir + SEP + DIR_ADOC_GEN + SEP + DIR_MODULES;
    List<String> moduleFileNames = FileSystem.getAdocFileNames(modulesDir);
    Collections.sort(moduleFileNames);
    int changedModuleFiles = 0;
    int updatedModuleFiles = 0;
    if (specChangeSet != null) {
        for (SpecFile specFile : specChangeSet) {
            if (specFile instanceof SpecModuleFile) {
                changedModuleFiles++;
                if (moduleFileNames.contains(specFile.getFile().getName())) {
                    updatedModuleFiles++;
                }
            }
        }
    }
    return moduleFileNames.size() + changedModuleFiles - updatedModuleFiles;
}
Also used : SpecModuleFile(org.eclipse.n4js.jsdoc2spec.adoc.SpecModuleFile) SpecModuleFile(org.eclipse.n4js.jsdoc2spec.adoc.SpecModuleFile) SpecFile(org.eclipse.n4js.jsdoc2spec.SpecFile) File(java.io.File) SpecIndexFile(org.eclipse.n4js.jsdoc2spec.adoc.SpecIndexFile) SpecFile(org.eclipse.n4js.jsdoc2spec.SpecFile)

Aggregations

File (java.io.File)1 SpecFile (org.eclipse.n4js.jsdoc2spec.SpecFile)1 SpecIndexFile (org.eclipse.n4js.jsdoc2spec.adoc.SpecIndexFile)1 SpecModuleFile (org.eclipse.n4js.jsdoc2spec.adoc.SpecModuleFile)1