I tried your example, and got the failed ability to jump between the
two parts. I guessed it was because not all the files had been parsed,
so I ran:
M-x semantic-debug-idle-work-function RET
which I know just happens to parse all the files next to the file you
are in. Once this was done, I can now jump between the impl and
prototype and back again.
For more complex projects, you would need to get Semantic to parse your
key files ahead of time. The above function only helps for files in the
same directory as the current buffer. The semanticdb.sh script could be
used to initialize things ahead of time. It might help to use GNU
Global integration, though I haven't tried these two tools together in
this way. I'm guessing it would work.
This is a bit of a hairy problem, since one of the strengths in CEDET
for massive projects is that it will only parse the bits you use, which
is incompatible with the need for a global table of symbols. If CEDET
were to load in everything for a big project, it can overload your Emacs
session with big piles of useless tags you never access.
Hopefully these tricks can help get your working. The EDE trick you
have below is great for compilation and such, or for finding files by
name from includes.
The database output you have below indicates that you did successfully
parse all the files in your examples, so most of my advice above may be
moot. You can try:
on the offending location to see what the reference analyzer output is.
I don't think there are any caches to flush, but if so, you can always
use the Senator menu item "Force Tag Refresh" to clear stuff.
On Mon, 2009-08-31 at 18:54 +0200, Michal wrote:
> David Engster <deng@...> writes:
> > Yes, that feature is a bit tricky.
> > If Semantic has never seen the file Human.cpp, it will indeed not find
> > the implementation of Human.cpp. It should work if you load Human.cpp
> > and give Semantic the time to parse it (call 'M-x bovinate' to enforce
> > it).
> Did as You suggested.
> > You can get a dump of the current database by calling
> > M-x semanticdb-dump-all-table-summary
> this is my result:
> *#<semanticdb-project-database-file example/ (4 tables)>
> ] Name: "example/"
> ] Class: #'semanticdb-project-database-file
> ] reference-directory "/mnt/truecr/misc/mobile/CXX-trainingCode/example/"
> ] new-table-class #'semanticdb-table
> ] cache : nil
> ] :tables #<list o' stuff: 4 entries>
> > #<semanticdb-table example.cpp (3 tags)>
> > #<semanticdb-table Human.h (1 tags)>
> ] Name: "Human.h"
> ] Class: #'semanticdb-table
> ] parent-db #<semanticdb-project-database-file example/ (4 tables)>
> ] :major-mode #'c-mode
> ] :tags #<TAG LIST: 1 entries>
> ] index #<semanticdb-find-search-index #<semanticdb-table Human.h> index>
> ] cache #<list o' stuff: 1 entries>
> ] :file "Human.h"
> ] buffer #<buffer Human.h>
> ] dirty : nil
> ] db-refs : nil
> ] :pointmax 51
> ] :fsize 50
> ] :lastmodtime #<list o' stuff: 2 entries>
> ] :unmatched-syntax : nil
> ] :lexical-table : nil
> > #<semanticdb-table Human.cpp (3 tags)>
> > #<semanticdb-table Project.ede (1 tags)>
> ] :file "/home/mkwap/.semanticdb/!mnt!truecr!misc!mobile!CXX-trainingCode!example!semantic.cache"
> ] :semantic-tag-version "2.0pre7"
> ] :semanticdb-version "2.0pre7"
> > You can easily add Human.h to the project (in fact, EDE should ask you
> > as soon as you open it). It will then get added to 'auxsource'.
> I also added it as You suggested:
> ;; Object example
> ;; EDE project file.
> (ede-proj-project "example"
> :name "example"
> :file "Project.ede"
> :targets (list
> (ede-proj-target-makefile-program "example"
> :name "example"
> :path ""
> :source '("example.cpp" "Human.cpp")
> :auxsource '("Human.h")
> Unfortunately it does not work, ie.
> M-x semantic-analyze-proto-impl-toggle does not switch from declaration to