Changeset 1483 for trunk/peppy/plugins/error_log.py
- Timestamp:
- 07/10/08 18:14:45 (4 months ago)
- Files:
-
- 1 modified
-
trunk/peppy/plugins/error_log.py (modified) (3 diffs)
Legend:
- Unmodified
- Added
- Removed
-
trunk/peppy/plugins/error_log.py
r1459 r1483 16 16 from peppy.sidebar import * 17 17 from peppy.minor import * 18 from peppy.lib.processmanager import Job 18 19 19 20 class LoggingSTC(PeppySTC, ClassPrefs, debugmixin): … … 88 89 #sys.stdout.write("match ends at %d" % i) 89 90 self.last_matched_filename = pos + i 91 92 def findAbsolutePath(self, line): 93 """If the filename specified on the line is a relative path, search 94 upwards in the stc to locate a cwd specifier. 95 96 """ 97 while line > 0: 98 line -= 1 99 text = self.GetLine(line) 100 if text.startswith(Job.arrow): 101 #dprint("Found a candidate at %d: %s" % (line, text)) 102 cwd = Job.matchCwd(text) 103 if cwd is None: 104 return "" 105 elif cwd: 106 return cwd 107 return "" 90 108 91 109 def OnDoubleClick(self, evt): … … 100 118 if match: 101 119 filename = match.group(1) 120 if not filename.startswith("/"): 121 path = self.findAbsolutePath(line) 122 filename = os.path.join(path, filename) 102 123 line = match.group(2) 103 124 self.open("%s#%s" % (filename, line))
