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.
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
"Method called before the symref search is performed."
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.