Changeset 3735
- Timestamp:
- 05/29/08 05:07:53 (3 months ago)
- Files:
-
- doxygenplugin/0.11/doxygentrac/doxygentrac.py (modified) (5 diffs)
- doxygenplugin/0.11/setup.py (modified) (1 diff)
Legend:
- Unmodified
- Added
- Removed
- Modified
- Copied
- Moved
doxygenplugin/0.11/doxygentrac/doxygentrac.py
r3550 r3735 70 70 encoding = Option('doxygen', 'encoding', 'iso-8859-1', 71 71 """Default encoding used by the generated documentation files.""") 72 73 default_namespace = Option('doxygen', 'default_namespace', '', 74 """Default namespace to search for named objects in.""") 72 75 73 76 SUMMARY_PAGES = """ … … 193 196 194 197 def get_search_results(self, req, keywords, filters): 198 self.log.debug("DOXYBUG: kw=%s f=%s" % (keywords, filters)) 195 199 if not 'doxygen' in filters: 196 200 return … … 203 207 path = os.path.join(self.base_path, doc) 204 208 path = os.path.join(path, self.html_output) 209 self.log.debug("looking in doc (%s) dir: %s:" % (doc, path)) 205 210 if os.path.isdir(path): 206 211 index = os.path.join(path, 'search.idx') … … 216 221 index = os.path.join(self.base_path, self.html_output) 217 222 index = os.path.join(index, 'search.idx') 223 self.log.debug("looking in doc (%s) search.idx: %s:" % (doc, index)) 218 224 if os.path.exists(index): 219 225 creation = os.path.getctime(index) … … 324 330 # - expand with enum, defs, etc. 325 331 # - this doesn't work well with the CREATE_SUBDIRS Doxygen option 326 path, link = lookup('class%s.html' % file, 'class') 332 333 # do doxygen-style name->file mapping 334 # this is a little different than doxygen, but I don't see another way 335 # way to make doxygen:Type<bool> links work, as it inserts a ' ' (or 336 # '_01') after/before the type name. 337 charmap = { '_':'__', ':':'_1', '/':'_2', '<':'_3_01', '>':'_01_4', \ 338 '*':'_5', '&':'_6', '|':'_7', '.':'_8', '!':'_9', \ 339 ',':'_00',' ':'_01' } 340 mangledfile = '' 341 for i in file: 342 if i in charmap.keys(): 343 mangledfile += charmap[i] 344 else: 345 mangledfile += i 346 347 path, link = lookup('class%s.html' % mangledfile, 'class') 327 348 if not path: 328 path, link = lookup('struct%s.html' % file, 'struct')349 path, link = lookup('struct%s.html' % mangledfile, 'struct') 329 350 if path: 330 351 return 'view', path, link 352 353 # Try in the default_namespace 354 if self.default_namespace != "": 355 mangledfile = self.default_namespace + '_1_1' + mangledfile 356 path, link = lookup('class%s.html' % mangledfile, 'class') 357 if not path: 358 path, link = lookup('struct%s.html' % mangledfile, 'struct') 359 if path: 360 return 'view', path, link 361 331 362 332 363 # Revert to search... doxygenplugin/0.11/setup.py
r3251 r3735 8 8 description='Doxygen plugin for Trac', 9 9 keywords='trac doxygen', 10 version='0.11.0. 1',10 version='0.11.0.2dev', 11 11 url='http://trac-hacks.org/wiki/DoxygenPlugin', 12 12 license = """Copyright (C) 2005 Jason Parks <jparks@jparks.net>
