Re: [cedet-semantic] Auto-create GNU GLOBAL database hook before using Semantic Symref
Brought to you by:
zappo
From: Eric M. L. <er...@si...> - 2010-04-21 22:21:58
|
On 04/21/2010 03:51 PM, Per Nordlöw wrote: > If we choose the GNU GLOBAL backend for Symref, I believe it should > automatically on-demand create (gtags) and update (global -u) a GNU > GLOBAL database in current project root. We could use advices for that > but it would be cleaner if we add a hook, say (defun symref-pre-hook > (backend directory)), in some suitable place. Hi, The simplest method for you would be to use CLOS to do what you want as a one off configuration. For example: (defmethod semantic-symref-perform-search :BEFORE ((tool semantic-symref-tool-global)) "Method called before the symref search is performed." (cedet-global-update)) though someone needs to write 'cedet-global-update'. As a general feature, this is a pretty good idea. Updating tags tables seems like a feature for EDE to handle, as I assume gtags databases are related to projects. Symref could then dispatch to EDE, which it already does in semantic-symref-calculate-rootdir. When contemplating where to put "update tags", the "Project" menu of EDE seems logical, which also indicates that EDE may be a good place for it. I've also never gotten ETAGS support in. ETAGS can do some things that GLOBAL and CSCOPE do, just slower, and ETAGS is something that shows up in a lot of Makefiles with a "tags" target, making it a good candidate for EDE support in this concept also. Stuff to think about. Eric |