From: Eric M. L. <er...@si...> - 2007-02-05 16:44:38
|
>Folks, > >The problem is that when I have a .cpp file open, ECB displays all >methods in the methods buffer as public. > >When I have the header file for the same class open, ECB displays the >methods correctly. > >When the cursor rests on a method in a .cpp file, the symboldef buffer >shows the prototype correctly from the header file. This suggests >IMenu and/or Semantic are working OK, but ECB has a problem. In your C++ file with the methods, but not the class decl, when ECB is exposing this problem, try: M-x semanticdb-find-test-translate-path RET In the output window, look to see if the header file is listed as a searched table. I'll guess that it is not there, and that the variable semanticdb-find-throttle-custom-list is either missing the 'recursive' option, or perhaps needs the 'unloaded' option added to force loading of unloaded dependencies. The doc for that variable may help. Semantic has the option of being pretty accurate, but many items need to be throttled off to keep the speed up. More below. >Here's an example with details: ECB IDs the class as a "struct" when >focus is in the class's .cpp file. When I'm working in the .h file, >the same class is labeled as a "class." E.g. for a cpp file: > > >[+] Variables >[-] sub1class1:struct > | +sub1class1 (controlService):sub1class1 // (constructor) > | +~sub1class1 (void):void > | +aPrivateMethod (void):void > | +aPublicMethod (void):void > | +aProtectedMethod (void):void > | +aVirtualProtectedMethod (void):void > | .... > > >for the matching .h file: > > >[-] sub1class1:class > | [+] Attributes > | [+] Parents > | +sub1class1 (controlService):sub1class1 // constructor > | +~sub1class1 (void):void // destructor > | -aPrivateMethod (void):void > | +aPublicMethod (void):void > | #aProtectedMethod (void):void > | #aVirtualProtectedMethod (void):void > | .... > > > > >I have the following set-up: > > >[-] ProjectDir > | [-] subdir1 > | | [x] includeFilesDir > | | | sub1class1.h > | | | sub1class2.h > | | | sub1Other.h > | | `- .... > | | [x] sourceFilesDir > | | | sub1class1.cpp > | | | sub1class2.cpp > | | `- .... > | `- .... > | [-] subdir2 > | | [+] includeFilesDir > | | | sub2class1.h > | | `- .... > | | [+] sourceFilesDir > | | | sub2class1.cpp > | | `- .... > | `- .... > | [+] subdir3 > | [+] ... > `- .... > >I have semanticdb-project-roots set for `ProjectDir' > >On related notes > > nothing I've been able to configure has led to me being able to >distinguish prototypes from functions (methods) when I do show both in >the methods list. I've found nothing useful in the documentation, >except the comment that the project should be "well set up." One of >the ECB/CEDET/IMenu entities displays the tag properties in the echo >area (minibuffer) after the point sits on a tag briefly. This display >is correct for the .cpp files. I was getting the following error in >*Messages* for both .cpp & .h files: > >semantic-dependency-tag-file: > > idle error: "# - Symbol's function definition is void: >semantic-dependency-find-file-on-path" I think you are running from CEDET/CVS, that bug was fixed with an autoload cookie, so fetching a new version from CVS should help. Good Luck Eric >I seem to have corrected this error by adding > >(setq-mode-local c-mode semantic-dependency-include-path (quote ("../include" "../inc"))) >(load-file "c:/Progra~1/gnu/emacs-21.3/site-lisp/cedet/semantic/semantic-dep.elc") -- 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 |