On Wed, 5 Mar 2008 16:35:40 +0000, Nick Treleaven nick.treleaven@btinternet.com wrote:
On Tue, 04 Mar 2008 23:12:51 +0200 Yura Siamashka yurand2@gmail.com wrote:
[...]
The main reason why I can't stand using native project manager is Project session support (IMHO, it is annoying to have all opened files nuked on project close). But since it can be disabled I think it will be nice to split geanyprj in 2 part.
- Add "go to tag def/decl" code to geany native project.
- Extract rest part "auto switch project based on current file" in
separate plugin.
I think this sounds good, but I haven't had a chance to test the geanyprj plugin yet. It would be cool to have (1) in the core, but I'm not sure how much code it is or how much extra memory would be used typically. Memory probably isn't an issue so long as there's a preference not to load tags from unopen files under the project base dir, and IMO it should be off by default.
Enrico, should this be in the core?
Depends on the way of implementation. I don't like what geanyprj is doing currently. I didn't have a deeper look but Yura, you call reload_project() on every document-activate event? So, everytime a user switch between files, the plugin searches for ".geanyprj" and checks the type of the current project. I really don't like this. Disk-IO on every tab change. Furthermore, I don't like the .geanyprj files at all. But of course, some kind of cache is necessary. I'm not sure.
And just while testing the plugin a little bit, it crashed away ;-). Backtrace is attached, steps to reproduce: - open geany with an open project and some project session files - load the geanyprj with the plugin manager - Tools->Project->New - Name: "tmp" Location: "/tmp" Base path: "/tmp" Generate files: yes Type: All -> crash on Create.
Regards, Enrico