On Tue, 20 Apr 2010 11:48:30 -0400, jordan wrote:
On 04/20/2010 10:45 AM, Colomban Wendling wrote:
Nick Treleaven a écrit :
On Tue, 20 Apr 2010 10:10:33 -0400 jordan phosphor@primus.ca wrote:
How does Monodevelop handle it's tag manager as unlike Anjuta and Geany the tags always point to the correct line?
IDEs reparse the tags from memory in idle time.
Yeah, but it means that they can. Then the question is: what Monodevelop use then to do so? An enhanced version of CTags, a completely other thing or what? (if nobody knows, I'll perhaps take a look at the code later)
Had a quick look and it looks to me like Monodevelop may use a temporary file with the current buffer. It does use CTags though, however the code for the most part is sparsely commented. However it looks as if it creates a new thread and ctags is run against the tmp file containing the buffer and then the output parsed.
This is similar to what we do: we tell the tagmanager(which is more or less an extension of CTags) to parse the file. The main differences are: - we parse the source file itself, not a temporary file - we don't do it in a separate thread
I'm not sure we can easily change the behaviour to use a temp file, probably yes, technically also but it might have side effects. Needs to be examined. About threads: we probably could do this but I doubt it will gain much performance because the parsing itself is probably way faster than the GUI part. I.e. we first parse the file and then retrieve the list of symbols from the tagmanager and fill the Symbol List with the results. Filling the Symbol List can't be done in a thread because GTK doesn't allow this. So, we only could do the real parsing in a thread not the GUI stuff which probably takes way more time.
Regards, Enrico