Changeset 1486
- Timestamp:
- 07/10/08 22:43:06 (7 weeks ago)
- Location:
- trunk/peppy
- Files:
-
- 2 modified
-
lib/userparams.py (modified) (3 diffs)
-
plugins/project.py (modified) (19 diffs)
Legend:
- Unmodified
- Added
- Removed
-
trunk/peppy/lib/userparams.py
r1468 r1486 1432 1432 hier = cls.__mro__ 1433 1433 for cls in hier: 1434 dprint("checking %s" % cls)1434 #dprint("checking %s" % cls) 1435 1435 if 'default_prefs' not in dir(cls): 1436 1436 continue … … 1443 1443 hier = self.__class__.__mro__ 1444 1444 for cls in hier: 1445 dprint("checking %s" % cls)1445 #dprint("checking %s" % cls) 1446 1446 if 'default_prefs' not in dir(cls): 1447 1447 continue … … 1483 1483 hier = self.__class__.__mro__ 1484 1484 for cls in hier: 1485 dprint("checking %s" % cls)1485 #dprint("checking %s" % cls) 1486 1486 if 'default_prefs' not in dir(cls): 1487 1487 continue -
trunk/peppy/plugins/project.py
r1483 r1486 65 65 def regenerateTags(self): 66 66 # need to operate on the local filesystem 67 dprint(self.project_top_dir)67 self.dprint(self.project_top_dir) 68 68 if self.project_top_dir.scheme != "file": 69 69 raise TypeError("Can only process ctags on local filesystem") … … 78 78 args = "%s %s %s -o %s" % (ProjectPlugin.classprefs.ctags_args, self.ctags_extra_args, excludes, ctags_file) 79 79 cmd = "%s %s" % (ProjectPlugin.classprefs.ctags_command, args) 80 dprint(cmd)80 self.dprint(cmd) 81 81 82 82 output = JobOutputSaver(self.regenerateFinished) … … 84 84 85 85 def regenerateFinished(self, output): 86 dprint(output)86 self.dprint(output) 87 87 if output.exit_code == 0: 88 88 self.loadTags() … … 114 114 self.dprint(line) 115 115 except LookupError, e: 116 dprint("Tag file %s not found" % filename)116 self.dprint("Tag file %s not found" % filename) 117 117 pass 118 118 … … 187 187 self.readConfig(fh) 188 188 for param in self.iterPrefs(): 189 dprint("%s = %s" % (param.keyword, getattr(self, param.keyword)))190 dprint(self.configToText())189 self.dprint("%s = %s" % (param.keyword, getattr(self, param.keyword))) 190 self.dprint(self.configToText()) 191 191 except LookupError: 192 dprint("Project file not found -- using defaults.")192 self.dprint("Project file not found -- using defaults.") 193 193 self.setDefaultPrefs() 194 194 … … 199 199 fh.write(text) 200 200 except: 201 dprint("Failed writing project config file")201 self.dprint("Failed writing project config file") 202 202 203 203 def registerProcess(self, job): … … 211 211 212 212 def build(self, frame): 213 dprint("Compiling %s in %s" % (self.build_command, self.build_dir))213 self.dprint("Compiling %s in %s" % (self.build_command, self.build_dir)) 214 214 output = JobOutputSidebarController(frame, self.registerProcess, self.deregisterProcess) 215 215 ProcessManager().run(self.build_command, self.build_dir, output) 216 216 217 217 def run(self, frame): 218 dprint("Running %s in %s" % (self.run_command, self.run_dir))218 self.dprint("Running %s in %s" % (self.run_command, self.run_dir)) 219 219 output = JobOutputSidebarController(frame, self.registerProcess, self.deregisterProcess) 220 220 ProcessManager().run(self.run_command, self.run_dir, output) … … 237 237 def getNonInlineName(self): 238 238 lookup = self.mode.check_spelling[0] 239 dprint(lookup)239 self.dprint(lookup) 240 240 return lookup or "ctags unavailable" 241 241 … … 245 245 if self.mode.project_info: 246 246 lookup = self.mode.check_spelling[0] 247 dprint(lookup)247 self.dprint(lookup) 248 248 self.tags = self.mode.project_info.getTag(lookup) 249 249 if self.tags: … … 265 265 file = self.tags[index][0] 266 266 addr = self.tags[index][1] 267 dprint("opening %s at line %s" % (file, addr))267 self.dprint("opening %s at line %s" % (file, addr)) 268 268 try: 269 269 line = int(addr) … … 315 315 def action(self, index=-1, multiplier=1): 316 316 pathname = ProjectPlugin.getFilename(self.mode.keyword) 317 dprint(pathname)317 self.dprint(pathname) 318 318 self.mode.save(pathname) 319 319 … … 396 396 pm = wx.GetApp().plugin_manager 397 397 plugins = pm.getPluginInfo(ProjectPlugin) 398 dprint(plugins)398 self.dprint(plugins) 399 399 400 400 self.plugin = PluginPanel(self.notebook, plugins[0]) … … 429 429 if retval == wx.ID_OK: 430 430 path = dlg.GetPath() 431 dprint(path)431 self.dprint(path) 432 432 info = ProjectPlugin.createProject(path) 433 433 else: … … 530 530 for configname in names: 531 531 try: 532 dprint("Trying to load template %s" % configname)532 cls.dprint("Trying to load template %s" % configname) 533 533 fh = vfs.open(configname) 534 534 template = fh.read() … … 551 551 @classmethod 552 552 def findProjectTemplate(cls, mode): 553 dprint(mode)553 cls.dprint(mode) 554 554 if mode.project_info: 555 555 url = mode.project_info.getSettingsRelativeURL(cls.classprefs.template_directory) 556 dprint(url)556 cls.dprint(url) 557 557 if vfs.is_folder(url): 558 558 template = cls.findTemplate(url, mode, mode.buffer.url) … … 573 573 # Look for a new project path 574 574 last = vfs.normalize(vfs.get_dirname(url)) 575 dprint(str(last.path))575 cls.dprint(str(last.path)) 576 576 while not last.path.is_relative() and True: 577 577 path = last.resolve2("%s" % (cls.classprefs.project_directory)) 578 dprint(path.path)578 cls.dprint(path.path) 579 579 if vfs.is_folder(path): 580 580 cls.known_project_dirs[url] = path … … 582 582 path = vfs.get_dirname(path.resolve2('..')) 583 583 if path == last: 584 dprint("Done!")584 cls.dprint("Done!") 585 585 break 586 586 last = path … … 599 599 if mode: 600 600 mode.project_info = info 601 dprint("found project %s" % info)601 cls.dprint("found project %s" % info) 602 602 return info 603 603 elif mode: … … 620 620 info = cls.registerProject(None, proj_dir) 621 621 info.savePrefs() 622 dprint(info)622 cls.dprint(info) 623 623 buffers = BufferList.getBuffers() 624 624 for buffer in buffers: 625 625 if buffer.url.scheme != "file": 626 626 continue 627 dprint("prefix=%s topdir=%s" % (buffer.url.path.get_prefix(url.path), url.path))627 cls.dprint("prefix=%s topdir=%s" % (buffer.url.path.get_prefix(url.path), url.path)) 628 628 if buffer.url.path.get_prefix(url.path) == url.path: 629 dprint("belongs in project! %s" % buffer.url.path)629 cls.dprint("belongs in project! %s" % buffer.url.path) 630 630 for mode in buffer.iterViewers(): 631 631 mode.project_info = info 632 632 else: 633 dprint("not in project: %s" % buffer.url.path)633 cls.dprint("not in project: %s" % buffer.url.path) 634 634 return info 635 635
