示例#1
0
 def getPackageApi(self, packageId):
     if not packageId in self._docs:
         self._console.debug("Missing package docs: %s" % packageId)
         return None
         
     packageEntry = self._docs[packageId]
     
     text = filetool.read(packageEntry["path"])
     node = api.createPackageDoc(text, packageId)
     
     return node
示例#2
0
    def getPackageApi(self, packageId):
        if not packageId in self._docs:
            self._console.debug("Missing package docs: %s" % packageId)
            return None

        packageEntry = self._docs[packageId]

        text = filetool.read(packageEntry["path"])
        node = api.createPackageDoc(text, packageId)

        return node
示例#3
0
文件: ApiLoader.py 项目: lite/empweb
 def getPackageApi(self, packageId):
     if not packageId in self._docs:
         if packageId:  # don't complain empty root namespace
             self._console.warn("Missing package docs: %s" % packageId)
         return None
         
     packageEntry = self._docs[packageId]
     
     text = filetool.read(packageEntry["path"])
     node = api.createPackageDoc(text, packageId)
     
     return node
示例#4
0
 def getPackageApi(self, packageId):
     if not self._docs.has_key(packageId):
         self._console.debug("Missing package docs: %s" % packageId)
         return None
         
     packageEntry = self._docs[packageId]
     
     text = filetool.read(packageEntry["path"])
     # Add surrounding comment markers for non-javascript files
     if not packageEntry["path"].endswith(".js"):
         text = "/*\n" + text + "\n*/"
     node = api.createPackageDoc(text, packageId)
     
     return node