diff --git a/Utilities/Dox/PythonScripts/CrossReference.py b/Utilities/Dox/PythonScripts/CrossReference.py index 37beba054..88c264eb7 100755 --- a/Utilities/Dox/PythonScripts/CrossReference.py +++ b/Utilities/Dox/PythonScripts/CrossReference.py @@ -95,7 +95,11 @@ def __init__(self, routineName, package=None): self._originalName = routineName self._hasSourceCode = True self._structuredCode = [] - self._objType="Routine" + self._objType = "Routine" + + def getObjectType(self): + return self._objType + def setName(self, routineName): self._name = routineName def getName(self): @@ -766,6 +770,8 @@ def __init__(self, globalName, self._totalReferencedRoutines = 0 self._totalReferencedGlobals = 0 self._totalReferredGlobals = 0 + self._objType = "Global" + def setName(self, globalName): self._name = globalName def getName(self): @@ -843,8 +849,10 @@ def isFileManFile(self): return self.getFileNo() != None def getPackage(self): return self._package + def getObjectType(self): - return "Global" + return self._objType + #=========================================================================== # operator #=========================================================================== @@ -1454,11 +1462,11 @@ def __categorizeVariableNameByNamespace__(self, variableName, isGlobal = False): if hasMatch: return (matchNamespace, package) return (None, None) + def routineHasSourceCodeByName(self, routineName): routine = self.getRoutineByName(routineName) - if "getObjectType" in dir(routine): - return True return routine and routine.hasSourceCode() + def __generatePlatformDependentRoutineDependencies__(self): for genericRoutine in self._platformDepRoutines.itervalues(): genericRoutine.setHasSourceCode(False) diff --git a/Utilities/Dox/PythonScripts/WebPageGenerator.py b/Utilities/Dox/PythonScripts/WebPageGenerator.py index 60af086fa..6aa66bce6 100755 --- a/Utilities/Dox/PythonScripts/WebPageGenerator.py +++ b/Utilities/Dox/PythonScripts/WebPageGenerator.py @@ -2193,10 +2193,11 @@ def generateAllSourceCodePage(self): def getPackageComponentDisplayName(self, routine): routineName = routine.getName() if "componentType" in dir(routine): - componentType = routine.componentType.strip() - if componentType in COMPONENT_TYPE_DICT: - return "%s(%s)" % (routineName, componentType) + componentType = routine.componentType.strip() + if componentType in COMPONENT_TYPE_DICT: + return "%s(%s)" % (routineName, COMPONENT_TYPE_DICT[componentType]) return routineName + #=============================================================================== # utility method to show routine name #=============================================================================== @@ -2447,7 +2448,7 @@ def generateTablizedItemList(self, sortedItemList, outputFile, htmlMappingFunc, linkName = htmlMappingFunc(displayName, keyVal) if nameFunc: displayName = nameFunc(displayName) - outputFile.write("%s    " + outputFile.write("%s    " % (borderColorString, linkName, displayName)) if self._generatePDFBundle: # format name for pdf @@ -2603,7 +2604,7 @@ def generateIndividualPackagePage(self): else: globalList.append(globalVar) # - routinesList = package.getAllRoutines().keys() + routinesList = package.getAllRoutines().values() # Build list of sections with data indexList = ["Namespace", "Doc"] @@ -2668,7 +2669,8 @@ def generateIndividualPackagePage(self): sortedICRList = sorted(icrList, key=lambda item: float(item["NUMBER"])) self.generatePackageSection("ICR Entries", getICRHtmlFileName, getICRDisplayName, "icrVals", - sortedICRList, outputFile, pdf) + sortedICRList, outputFile, pdf, + useColor=False) # FileMan files if len(fileManList) > 0: @@ -2692,8 +2694,10 @@ def generateIndividualPackagePage(self): # Routines if len(routinesList) > 0: - sortedRoutinesList = sorted(routinesList) - self.generatePackageSection("Routines", getRoutineHtmlFileName, + # sorted by routine Name + sortedRoutinesList = sorted(routinesList, key=lambda item: item.getName()) + self.generatePackageSection("Routines", + getRoutineHtmlFileName, self.getRoutineDisplayNameByName, "rtns", sortedRoutinesList, outputFile, pdf) @@ -2720,7 +2724,7 @@ def generateIndividualPackagePage(self): def generatePackageSection(self, sectionName, htmlMappingFunction, nameFunction, classid, sortedDataList, outputFile, pdf, pdfColumnWidths=None, - keyVal=None): + keyVal=None, useColor=True): if self._generatePDFBundle: pdfSection = [] else: @@ -2731,9 +2735,9 @@ def generatePackageSection(self, sectionName, htmlMappingFunction, pdfData = self.generateTablizedItemList(sortedDataList, outputFile, htmlMappingFunction, nameFunction, - keyVal = keyVal, classid=classid, - useColor=False) + keyVal = keyVal, + useColor=useColor) if pdfData and self._generatePDFBundle: table = self.__generatePDFTable__(pdfData, pdfColumnWidths) pdfSection.append(table)