Re: [cedet-semantic] Semantic search and intellisense completion.
Brought to you by:
zappo
From: Eric M. L. <er...@si...> - 2007-05-15 15:31:02
|
Hi, Thanks for your example. I use a relatively vanilla cedet install procedure in my .emacs file with my development version of CEDET active. At this time, I don't have many active changes over what is in CVS. I did the following: 1) Start a fresh emacs 2) Put your sample in /tmp/test.cpp 3) Used M-x semantic-analyze-possible-completions on the two lines you indicated. I did not get completions. 4) M-x semanticdb-create-ebrowse-database RET /usr/include/ RET (This took a little while to finish. 5) Verified that completions are listed correctly on the two lines you indicated. You should be able to do the same. I'm using Emacs 22 from CVS from a couple months back. Ebrowse had changed a little between that and Emacs 21. Hopefully the semantic code will work between those two versions. Eric >>> Hadron <had...@go...> seems to think that: > >Just while on the subject and Jamie is involved, here is my biggest >issue at the moment with regard to paths and selective parsing. In the >following "joke/testbed code" notice > >1) inclusion of fstab.h. This is in /usr/include. >2) the inclusion of <asm/thread_info.h>. This is in >~/programming/c/linux..... > >All files have been "cscope'd" for easy file opening from structure references. > >I open my test file and move to the line "pfstabEntry->". I try inline >completion. I do not get the structure values. I open the >/usr/include/fstab.h using cscope navigation command, and *then* >completion works. Semantic is now aware of fstab. > >However, if I move to the "pti->" line having opened the thread_info.h >file in a similar way, then completion does not work. I know this is >going to be down to some path issue, but I tried Jamie's suggestion >earlier specifying the complete directory as well as header root for the >thread_info file in the c-mode-hook e.g > >,---- >| (defun semantic-c-mode-hook () >| (semantic-add-system-include "/home/programming/c/linux-source-2.6.20/include/asm")) >| (add-hook 'c-mode-common-hook 'semantic-c-mode-hook) >| (add-hook 'c-mode-hook 'semantic-c-mode-hook) >`---- > > >C test Code below. > > >#include <stdio.h> >#include <stdlib.h> >#include <fstab.h> >#include <gtk/gtk.h> >#include <sched.h> >#include <asm/thread_info.h> > >#include "filesystems.h" > >/* START GLOBALS */ >/* The head of the fstab copies */ >GList * pfstab; >struct fstab * pfstabEntry = p; >struct thread_info * pti; >/* END GLOBALS */ > > >/* release all memory reserved for a temporary fstab structure */ >void fstabFreeEntry(gpointer p, gpointer ignore){ > pti-> > pfstabEntry-> > g_free(pfstabEntry->fs_spec); > g_free(pfstabEntry->fs_file); > g_free(pfstabEntry->fs_vfstype); > g_free(pfstabEntry->fs_); > g_free(p); >} > [ ... ] -- Eric Ludlam: za...@gn..., er...@si... Home: http://www.ludlam.net Siege: www.siege-engine.com Emacs: http://cedet.sourceforge.net GNU: www.gnu.org |