Updates to CEDET/CVS
Eric M. Ludlam <eric <at> siege-engine.com>
2007-08-25 02:19:22 GMT
For those on the cedet-devel list, this is some duplicate
There have been several changes in CEDET/CVS since pre4 was
released. One of the reasons I'm posting this is because I believe I
found the completion problem reported here this past spring which was
not reproducible in a small example program. For large collections of
source, if a baseclass was not found in the databases, an error would
get thrown and caught, but it would disable completion on any members
of the known classes.
Anyway, suffice it to say, that CEDET/CVS has much better support
for the smart completion feature that pre4 does with this and a couple
Next, for your large piles of C++ source code, there is support
for creating a special cpp-root EDE project. This project won't
interfere with any existing build system, but allows you to customize
how semantic finds source-code in your project. Spending some time
setting up a cpp-root project will allow semantic to automatically
find and load the files it needs to make smart completion
reliable... if somewhat slow the first time through. To try it out,
look in the commentary section of the file ede-cpp-root.el. Please
send comments on this so I can get the kinks worked out before I put
it in the regular doc path. Thanks.
There are also two new commands that were put together as prototypes
based on some questions on the ECB mailing list. They are:
semantic-ia-fast-jump - analyze the current context, and jump right to
semantic-ia-describe-class - Show all members of some class, including
those inherited. You have to type in the name though.
Using the above new features, I was able to get Semantic to do smart
completion and jumping on almost anything (other than a templated
variable) in my source tree at work, which is a couple gig of C++.
Be warned though, the first pass through can be a bit slow, and
having such a massive amount of data at it's disposal also makes
semantic slow down. You can follow one of two options:
1) Customize `semanticdb-find-default-throttle' to throw out bits
you don't want.
2) Disable the `idle' summaries and completion, and bind keys for
the semantic-ia equivalent commands and just ask for the help
when you need it.
Statistics: Right now, for a typical file for me at work, it can
take about 5-10 seconds to find an answer in a a file that has perhaps
100 or so includes (most nested) on a dual A64 Linux box.
In investigating the speed problems I found several opportunities
for optimization through caching of results. Managing these caches
requires some core-work to provide the right kind of hooks to make
sure the caches are kept up to date. Stay tuned.
Lastly, there is also some new "pulsing" features which are fun. Try
`pulse-toggle-integration-advice' to pulse stuff outside of semantic,
like the `goto-line' command.
Eric Ludlam: zappo <at> gnu.org, eric <at> siege-engine.com
Home: http://www.ludlam.net Siege: www.siege-engine.com
Emacs: http://cedet.sourceforge.net GNU: www.gnu.org
This SF.net email is sponsored by: Splunk Inc.
Still grepping through log files to find problems? Stop.
Now Search log events and configuration files using AJAX and a browser.
Download your FREE copy of Splunk now >> http://get.splunk.com/