Show
Ignore:
Timestamp:
11/21/08 20:50:59 (7 weeks ago)
Author:
Daniel Poelzleithner <poelzi@…>
Message:

document Document object

Files:
1 modified

Legend:

Unmodified
Added
Removed
  • pida-plugins/python/python.py

    r1636 r1679  
    5454from ropebrowser import ModuleParser 
    5555 
     56RE_MATCHES = ( 
     57    # traceback match 
     58    (r'''File\s*"([^"]+)",\s*line\s*[0-9]+''', 
     59    # internal 
     60     re.compile(r'\s*File\s*\"(?P<file>[^"]+)\",\s*line\s*(?P<line>\d+).*')) 
     61    , 
     62    #FIXME: how to handle localisation of this ??? 
     63) 
     64 
     65 
    5666class PythonEventsConfig(EventsConfig): 
    5767 
     
    7080        self.subscribe_foreign('filemanager', 'file_hidden_check', 
    7181            self.python) 
     82        for match in RE_MATCHES: 
     83            self.subscribe_foreign('commander', 'matches', 
     84            (match[0], self.svc.match_call)) 
    7285 
    7386    @filehiddencheck.fhc(filehiddencheck.SCOPE_PROJECT,  
     
    355368 
    356369 
    357 RE_MATCHES = ( 
    358     # traceback match 
    359     (r'''File\s*"([^"]+)",\s*line\s*[0-9]+''', 
    360     # internal 
    361      re.compile(r'\s*File\s*\"(?P<file>[^"]+)\",\s*line\s*(?P<line>\d+).*')) 
    362     , 
    363     #FIXME: how to handle localisation of this ??? 
    364 ) 
    365  
    366370class Python(LanguageService): 
    367371 
     
    383387        self.execute_action.set_sensitive(False) 
    384388 
    385     def start(self): 
    386         for match in RE_MATCHES: 
    387             self.boss.get_service('commander').register_matcher( 
    388                 match[0], self.match_call) 
    389  
    390     def stop(self): 
    391         for match in RE_MATCHES: 
    392             self.boss.get_service('commander').unregister_matcher( 
    393                 match[0], self.match_call) 
     389#     def start(self): 
     390#         for match in RE_MATCHES: 
     391#             self.boss.get_service('commander').register_matcher( 
     392#                 match[0], self.match_call) 
     393# 
     394#     def stop(self): 
     395#         for match in RE_MATCHES: 
     396#             self.boss.get_service('commander').unregister_matcher( 
     397#                 match[0], self.match_call) 
    394398 
    395399    def match_call(self, term, event, match):