On 04/30/2010 08:31 PM, David Ventimiglia wrote:
> Thanks, Eric. I've a few, more-specific questions spliced in below.
>> The basic strategy is to get an EDE project pointing to the root of
>> your code. I'm assuming all the languages you mentioned are in one
>> mega-project. That top level project then needs to know about all the
>> targets. For simplicity sake, you could have one target per language
>> type, or more detailed, one target per language/directory.
> So far, I just started with ede-simple-project, which I created with the
> command ede-new while visiting a Java file buried deep in that part of
> our source-tree. This put a file in my $HOME/.ede directory defining
> that ede-simple-project. I also have run GNU Global in my project root.
> What do I do now to enable completion, lookup, and cross-references for
Ah, good idea with the simple project. I'd forgotten about that.
If you look in cedet/common/cedet.info in the node:
(cedet.info)Top:: > GNU Global
It lists all the options for enabling GNU Global in a CEDET project.
>> As for the symbol references, you can use any of the different tools
>> prefer, or none. If you try it (once you have an EDE project
>> the root) with the find/grep solution and it is fast enough, then you
>> can consider yourself done.
> I made these customizations:
> (require 'cedet)
> (global-ede-mode 1)
> (semanticdb-enable-gnu-global-databases 'java-mode)
> (semanticdb-enable-gnu-global-databases 'jde-mode)
> (setq ede-locate-setup-options
> But when I invoke the command semantic-symref-symbol on some symbol in a
> Java file, I get the message:
> semantic-symref-tool-grep - Needs to be configured for jde-mode
> What does this mean?
That means that semantic-symref-filepattern-alist needs to be
customized. If you have a good customization, I'll add it to the
Probably something like:
I'll fix the error message to be more obvious.
Of course, this also means that it failed to auto-detect the GNU Global
tags file at the root of your project. Use M-x
cedet-gnu-global-show-root to determine if the detection is working. If
it fails, then there is something in the Global doc that might help,
since CEDET just calls global with "-pq" options.
> Finally, must one use Global, idutils, locate, etc., to do symbol
> lookups? Is it possible just to rely on the CEDET tools alone?
The symref tool relies on at least one external tool, but it can use
find/grep commands to do it, so the other tools are not required, but
will instead provide better and faster results.
> mean is, I gather that semantic is parsing and caching the tags for,
> say, the Java files that I visit. Is it possible to have semantic parse
Semantic only parses the tags (like ctags) and not the contents.
> ALL my Java source files ahead of time (a la Global, idutils, ctags,
> etc.), then just use semanticdb to support completion, lookup, and
> cross-referencing? This isn't a huge deal, but I'm trying to evangelize
> Emacs+CEDET+JDEE at my company, which is a Windows shop, and the more
> external tools I have to integrate (like finding Windows versions of
> Global, idutils, etc.), the harder that sell becomes. Or, would it
> simply be too much of a performance hit to ask semantic to do what
> Global et al are optimized to do very fast?
Semantic parses it's own tags because tools like global and ctags
provide only "quickie" information, and take many short-cuts to do so.
To do what CEDET does with tags, it needs to be much more careful.
Semantic also already has trouble with really huge projects, and Emacs
Lisp is just the wrong language to implement symbol cross-reference
database in do the shear size.
Instead, things like Global do a pretty good job on references, so I use
those instead, and deal with the inaccuracy of it. I'm hoping to
double-check each "hit" with a real analysis to prove that the hit is
really a reference to a given symbol, and not some side-effect of
polymorphism or other trick.
Anyway, Global is probably your best bet unless find/grep is fast enough