Howdy,
There are problems with the feature you are trying to use in the
released version which have been fixed in CVS.
All comments below are against the CVS version of semantic unless
otherwise stated.
>>> Joakim Verona <joakim@...> seems to think that:
>Hello,
>
>I have some newbie semanticdb questions.
>
>I wanteed to generate tags for wxWidgets and did this:
>
>cd /net/builds/wxWidgets-2.5.3
>export SEMANTIC_PATH=~/.elisp/cedet/semantic/
>find . -name "*h" |xargs ~/.elisp/cedet/semantic/semanticdb.sh
You can use this method, or you can use the
semanticdb-create-system-database command. They are vaguely
equivalent, though the system databases are automatically loaded when
you restart Emacs.
>Ok, so that generated tags for all wxWidget .h files.
>
>- Must I load the corresponding .h file in the running emacs to make
> the tags load and jump to definitions with c , J ? Or is there some
> other way?
Nope. Though you do need the CVS code which fixes the search path
mechanism.
>- Should I have used the systemdb method instead in this case, since
> its an api rather than code I modify? If so, how do I load generated
> systemdb files?
System databases are auto-loaded at startup. You need the CVS code
which fixes some problems with system database loading, and the
semanticdb.sh script.
>- in the wxWidgets case there is a wx.h file that loads all other .h
> files. Will loading this .h file load all other tags?
In the new system, recursive searches are disabled due to speed
issues. In the released beta version system headers were not loaded
because of speed issues. The CVS version has a throttle variable
which lets you turn various parts on or off depending on your
preference.
>- class defintions like the one below doesnt seem to get parsed:
>
>class WXDLLIMPEXP_XRC wxPanelXmlHandler : public wxXmlResourceHandler
>{
>DECLARE_DYNAMIC_CLASS(wxPanelXmlHandler)
>public:
> wxPanelXmlHandler();
> virtual wxObject *DoCreateResource();
> virtual bool CanHandle(wxXmlNode *node);
>};
>
>are there any obvious reasons why this shouldnt be parsed?
The C parser needs a means for stripping unusual macros at the
lexical level. The parser doesn't know what your keyword is.
>- Ok so I'm a semanticdb newbie, but it would be fun to learn more
> about the system by doing. For instance by implementing the
> javascript builtins backend you mentioned.
>
> To begin with, it would be nice to make a tiny backend that just
> reported the query it got, and returned "no tag found" to the
> caller. (im assuming you can have a searchable list of backend
> implementations). What would be the simplest existing backend to
> look at to achieve this?
[ ... ]
Lucky you, I wrote a semanticdb skeleton .el file this weekend which
could be used to bootstrap a new system database. I have checked it
in just now so you can get a copy.
I had not yet fully commented it. Try it out, and add more comments
to the original as you discover things that are unclear. That will
be the best test of its usefulness. I was fiddling with a separate
copy for use as an ebrowse back-end.
http://sourceforge.net/cvs/?group_id=17886
Developer updates can take up to an hour to synchronize with the
anonymous CVS server so semanticdb-skel.el may not appear right away.
I am hoping to release the official 1.0 version soon. That should
make getting the changes above easier.
Eric
--
Eric Ludlam: zappo@..., eric@...
Home: http://www.ludlam.net Siege: http://www.siege-engine.com
Emacs: http://cedet.sourceforge.net GNU: http://www.gnu.org
|