if (moduleName.equals(CALPlatformTestModuleNames.CALDocTest)) {
// CALDocTest is allowed to have unresolved references (because it tests CALDoc!)
continue;
}
final ModuleTypeInfo moduleInfo = calServices.getWorkspaceManager().getModuleTypeInfo(moduleName);
// Gather all the CALDoc comments in the module
final Map<String, CALDocComment> caldocComments = new LinkedHashMap<String, CALDocComment>();
caldocComments.put("module " + moduleName, moduleInfo.getCALDocComment());
for (int i = 0, n = moduleInfo.getNFunctions(); i < n; i++) {
final Function function = moduleInfo.getNthFunction(i);
caldocComments.put("function " + function.getName().getQualifiedName(), function.getCALDocComment());
}
for (int i = 0, n = moduleInfo.getNTypeConstructors(); i < n; i++) {
final TypeConstructor typeCons = moduleInfo.getNthTypeConstructor(i);
caldocComments.put("type cons " + typeCons.getName().getQualifiedName(), typeCons.getCALDocComment());
for (int j = 0, m = typeCons.getNDataConstructors(); j < m; j++) {
final DataConstructor dataCons = typeCons.getNthDataConstructor(j);
caldocComments.put("data cons " + dataCons.getName().getQualifiedName(), dataCons.getCALDocComment());
}
}
for (int i = 0, n = moduleInfo.getNTypeClasses(); i < n; i++) {
final TypeClass typeClass = moduleInfo.getNthTypeClass(i);
caldocComments.put("class " + typeClass.getName().getQualifiedName(), typeClass.getCALDocComment());
for (int j = 0, m = typeClass.getNClassMethods(); j < m; j++) {
final ClassMethod method = typeClass.getNthClassMethod(j);
caldocComments.put("class method " + method.getName().getQualifiedName(), method.getCALDocComment());
}
}
for (int i = 0, n = moduleInfo.getNClassInstances(); i < n; i++) {
final ClassInstance instance = moduleInfo.getNthClassInstance(i);
final TypeClass typeClass = instance.getTypeClass();
caldocComments.put("instance " + instance.getNameWithContext(), instance.getCALDocComment());
for (int j = 0, m = typeClass.getNClassMethods(); j < m; j++) {