////
/// Run the preparation pass through all modules, and build up the direct dependency information
//
for (int i = 0, n = moduleNames.size(); i < n; i++) {
ModuleName moduleName = moduleNames.get(i);
ModuleTypeInfo moduleTypeInfo = programModelManager.getModuleTypeInfo(moduleName);
for (int j = 0, nImportedModules = moduleTypeInfo.getNImportedModules(); j < nImportedModules; j++) {
ModuleName importedModuleName = moduleTypeInfo.getNthImportedModule(j).getModuleName();
addDirectModuleDependency(importedModuleName, moduleName);
}
prepareGenerationForModule(moduleTypeInfo);
}
////
/// Run the actual documentation generation pass
//
beginDoc();
// first portion: main documentation
for (int i = 0, n = moduleNames.size(); i < n; i++) {
ModuleName moduleName = moduleNames.get(i);
ModuleTypeInfo moduleTypeInfo = programModelManager.getModuleTypeInfo(moduleName);
logger.fine(CALDocMessages.getString("STATUS.generatingDocumentationForModule", moduleName));
generateModuleDoc(moduleTypeInfo);
}
// optional: usage documentation
if (shouldGenerateUsageIndices) {
for (int i = 0, n = moduleNames.size(); i < n; i++) {
ModuleName moduleName = moduleNames.get(i);
ModuleTypeInfo moduleTypeInfo = programModelManager.getModuleTypeInfo(moduleName);
logger.fine(CALDocMessages.getString("STATUS.generatingUsageDocumentationForModule", moduleName));
generateUsageIndices(moduleTypeInfo);
}
}
endDoc();