ctag support now usable

Roland Krause rokrau at yahoo.com
Thu Apr 26 15:46:15 UTC 2001


Friends, 

I am happy to announce, that the ctag support in KDEVELOP_1_4 is now
actually usable. 

Please note that the implementation is not in its final stage,
especially with regard to "ease of use", suggestions are heartily
welcomed. 

To enable ctags based functionality, currently you need to first create
a tags file (once) by Project->Make tags file. Then, you must load the
tags file (everytime when KDevelop loads a Project) by Project->Load
tags. 

I would like to get this to be done automagically, possibly just couple
it to the loading of a project. It is quite fast compared to the
parsing of all source files when a project is opened but will add to
startup time. 

Then, there are 2 new functions when the cursor is over a word in an
editor window, "Goto Definition" and "Goto Declaration". Additionally
there is one new function when a filename is selected in an editor
window. The functions are currently only available upon "right mouse
click" (RMC), but shall later be available from the Edit Menu and
through "keyboard shortcuts".

They have an almost identical functionality as those provided in M$'s
VCStudio, i.e. they find the declaration and definition of "tags", but
they are (others than in VCStudio) implemented in a "smart" way so
that, if only the "Declaration" is a available, the options "Goto
Definition" and "Open File" aren't enabled. Additionally the use of
ctags lets us distinguish between different "kind's" of tags.
Implementation details can be found in the source
($kdevelop/kdevelop/ctags/*.{cpp,h}).

Finally, if multiple tags are found, a dialog that closely resembles,
the grepDialog, will let the user choose between multiple destinations.
While I do have the dialog ready (my first one build w/ designer) this
is not yet in cvs. So, currently, if multiple destinations are found
for a tag, they will all be opened :-). 

The best available tags implementation is Darren Hiebert's "Exuberant
Ctags" which is assumed for all this to work, plain Unix tags will not
do. There are many options for Darren's ctags program and I am working
on a GUI frontend that shall be integrated in KDevelop's setup options.

Maybe you can give this a spin and tell me what you think.

Roland
PS: with this, btw., code completion is absolutely straightforward, in
fact, it is halfway there. 
PPS: someone oughta pick up on the original idea to generate the class
tree from the tags file, this would cut startup time by a factor of 10.



=====
--
Roland Krause
In the garage of life there are mechanics and 
there are drivers. Mechanics wanted!

__________________________________________________
Do You Yahoo!?
Yahoo! Auctions - buy the things you want at great prices
http://auctions.yahoo.com/

-
to unsubscribe from this list send an email to kdevelop-devel-request at kdevelop.org with the following body:
unsubscribe »your-email-address«



More information about the KDevelop-devel mailing list