Update of /cvsroot/happydoc/HappyDoc3/happydoclib
In directory usw-pr-cvs1:/tmp/cvs-serv2208/happydoclib
Modified Files:
appclass.py
Log Message:
Reworking to use the new scanner module.
Index: appclass.py
===================================================================
RCS file: /cvsroot/happydoc/HappyDoc3/happydoclib/appclass.py,v
retrieving revision 1.1.1.1
retrieving revision 1.2
diff -C2 -d -r1.1.1.1 -r1.2
*** appclass.py 17 Nov 2002 00:26:19 -0000 1.1.1.1
--- appclass.py 17 Nov 2002 14:59:08 -0000 1.2
***************
*** 60,64 ****
import string
import re
- import parser
import traceback
--- 60,63 ----
***************
*** 141,161 ****
return
- def ignoreDirectoryTest(self, dirName):
- """Determines whether 'dirName' matches pattern to be ignored.
-
- Arguments
-
- 'dirName' -- Full path of the directory to be tested.
-
- Returns true value if 'dirName' should be ignored, false value
- otherwise.
-
- """
- dir_base = happydoclib.path.basename(dirName)
- if dir_base in self._ignore_dir_patterns:
- return 1
- else:
- return 0
-
def set_format(self, format):
"Set the formatter to be used."
--- 140,143 ----
***************
*** 327,330 ****
--- 309,324 ----
##
+ def scanForInput(self, inputModules):
+ scanner = Scanner(inputModules, self._ignore_dir_patterns)
+ return scanner
+
+ def parseInputs(self, scanner):
+ package_trees = scanner.getPackageTrees()
+
+ for package_tree in package_trees:
+ pass
+
+ return
+
def main(self, *args):
***************
*** 349,361 ****
# Create the scanner, and get the package trees.
#
! scanner = Scanner(input_modules, self._ignore_dir_patterns)
package_trees = scanner.getPackageTrees()
- for package_tree in package_trees:
- package_tree.walk(self.showPackageTree)
return
! def showPackageTree(self, packageTreeNode):
path = packageTreeNode.getPath()
indent = ' ' * len(path)
--- 343,359 ----
# Create the scanner, and get the package trees.
#
! scanner = self.scanForInput(input_modules)
! self.showPackageTree(scanner)
!
! return
+ def showPackageTree(self, scanner):
package_trees = scanner.getPackageTrees()
+ for package_tree in package_trees:
+ package_tree.walk(self.showPackageTreeCB)
return
! def showPackageTreeCB(self, packageTreeNode):
path = packageTreeNode.getPath()
indent = ' ' * len(path)
|