oidZddlZddlZddlmZddlmZmZddlm Z m Z dZ Gdd ej Z Gd d ej Z Gd d ZdS)z(Management of documents for AXDebugging.N)unwrap)axdebuggateways)_wraptracecF|ddkrtj|S|S)Nr<)win32apiGetFullPathName)fnames MC:\PYTHON\Scheduler\python\Lib\site-packages\win32comext/axdebug/documents.pyGetGoodFileNamers% Qx3'... Lc&eZdZdZdZdZdZdS)DebugDocumentProviderc||_dSNdoc)selfrs r__init__zDebugDocumentProvider.__init__s rc6|j|Sr)rGetNamerdnts rrzDebugDocumentProvider.GetNamesx$$$rc4|jSr)rGetDocumentClassIdrs rrz(DebugDocumentProvider.GetDocumentClassIdsx**,,,rc|jSrrrs r GetDocumentz!DebugDocumentProvider.GetDocuments xrN)__name__ __module__ __qualname__rrrr!rrrrsP%%%---rrceZdZejjejjzejjzZejjejjzejjzZdZ dZ dZ dZ dZ dZdZdZd Zd Zd S) DebugDocumentTextctj|tj|tj|||_dSr)rr'rDebugDocumentInfo DebugDocument codeContainer)rr+s rrzDebugDocumentText.__init__0sU"++D111"++D111''---*rc"d|_d|_dSr) docContextsr+rs r_ClosezDebugDocumentText._Close6s!rc6|j|Sr)r+rrs rrzDebugDocumentText.GetName<s!))#...rcdS)Nz&{DF630910-1C1D-11d0-AE36-8C0F5E000000}r%rs rrz$DebugDocumentText.GetDocumentClassId?s77rcf|j|jfSr)r+ GetNumLines GetNumCharsrs rGetSizezDebugDocumentText.GetSizeGs+!--//1C1O1O1Q1QQQrc6|j|Sr)r+GetPositionOfLine)r cLineNumbers rr6z#DebugDocumentText.GetPositionOfLineKs!33K@@@rc6|j|Sr)r+GetLineOfPosition)rcharPoss rr9z#DebugDocumentText.GetLineOfPositionNs!33G<<rrcs rGetContextOfPositionz&DebugDocumentText.GetContextOfPosition_sAD'455   8 8 A A  !BCCCrN)r"r#r$rr)_com_interfaces_r'r*_public_methods_rr.rrr4r6r9r=rCrMr%rrr'r'"s "3  $ 5 6  1 2 "3  $ 5 6  1 2+++ """ ///888RRRAAA===$$$... DDDDDrr'c,eZdZdZdZddZdZdZdS)CodeContainerProvidera(An abstract Python class which provides code containers! Given a Python file name (as the debugger knows it by) this will return a CodeContainer interface suitable for use. This provides a simple base implementation that simply supports a dictionary of nodes and providers. ci|_dSr) ccsAndNodesrs rrzCodeContainerProvider.__init__psrNcFt|j}||f|j|<dSr)rfileNamerS)rccnoder s rAddCodeContainerz&CodeContainerProvider.AddCodeContainerss( ,,"$d(rc\|jt|d\}}|S)N)NN)rSgetr)rr rVrWs r FromFileNamez"CodeContainerProvider.FromFileNamews-#''(>(> MMD rc|jD]E\}} |||1#tj$rYBwxYwi|_dSr)rSvaluesCloser. pythoncom com_error)rrVrWs rr^zCodeContainerProvider.Close}s~(//11  HB #JJLLL &    s*A  AAr)r"r#r$__doc__rrXr[r^r%rrrQrQfs_++++     rrQ)rar_r win32com.server.utilrrrutilrrrrr'rQr%rrres..''''''      H:   ADADADADAD2ADADADH!!!!!!!!!!r