# Path: sourceutils/pythonASTFilter/PythonPrunedASTProcessor.py
# class PythonPrunedASTProcessor():
#     def __init__(self):
#         self.currentFile = None
#     
#     def process(self, treefilename):
#         self.loadTreeFromFile(treefilename)
#         self.handlePrunedTree()
#     
#     def loadTreeFromFile(self, treefilename):
# 
#         self.currentFile = self._treefileToSourceFile(treefilename)
#         self.tree = pickle.load(open(treefilename, "rb"))   
#         self.functionId = treefilename
#     
#     def _treefileToSourceFile(self, treefile):
#         return ('/'.join(treefile.split('/')[:-2]))
#     
#     # overload this
#     def handlePrunedTree(self):
#         pass


from sourceutils.pythonASTFilter.PythonPrunedASTProcessor import PythonPrunedASTProcessor
from DotDrawer import DotDrawer


class ASTPlotter(PythonPrunedASTProcessor):
    def __init__(self):
        PythonPrunedASTProcessor.__init__(self)
        self.drawer = DotDrawer()
        
    def handlePrunedTree(self):
        
        prunedTree = self.tree
        
        self.drawer.beginDraw()

# Path: sourceutils/pythonASTFilter/PythonPrunedASTProcessor.py
# class PythonPrunedASTProcessor():
#     def __init__(self):
#         self.currentFile = None
#     
#     def process(self, treefilename):
#         self.loadTreeFromFile(treefilename)
#         self.handlePrunedTree()
#     
#     def loadTreeFromFile(self, treefilename):
# 
#         self.currentFile = self._treefileToSourceFile(treefilename)
#         self.tree = pickle.load(open(treefilename, "rb"))   
#         self.functionId = treefilename
#     
#     def _treefileToSourceFile(self, treefile):
#         return ('/'.join(treefile.split('/')[:-2]))
#     
#     # overload this
#     def handlePrunedTree(self):
#         pass


# Path: sourceutils/plotting/ASTPlotter.py
from sourceutils.pythonASTFilter.PythonPrunedASTProcessor import PythonPrunedASTProcessor
from DotDrawer import DotDrawer



class ASTPlotter(PythonPrunedASTProcessor):
    def __init__(self):
        PythonPrunedASTProcessor.__init__(self)
        self.drawer = DotDrawer()
        
    def handlePrunedTree(self):
        
        prunedTree = self.tree
        
        self.drawer.beginDraw()

        self.drawer.drawHeader()