AW: AW: [CEDET-devel] problems with the Class Browser of semantic/speedbar
Brought to you by:
zappo
From: <kla...@sd...> - 2005-01-19 14:44:11
|
Hi david, thanks for your very helpful answer and your effort! I agree with you concerning the understandability of the=20 semanticdb-code ;-)) Well, the need and usage (and also when is needed) of the settings in `semanticdb-project-roots' and `semanticdb-project-root-functions' are one of the biggest mysteries in using cedet ;-) But i admit - i have not really digged deep into this stuff but i can at least say, its not intuitively... Well, i will try your patch... maybe Eric can give us more savetiness how to use and setup these things.... ;-) Ciao, Klaus -----Urspr=FCngliche Nachricht----- Von: David PONCE [mailto:dav...@wa...] Gesendet: Mi 19.01.2005 15:11 An: Berndl, Klaus Cc: er...@si...; ced...@li... Betreff: Re: AW: [CEDET-devel] problems with the Class Browser of = semantic/speedbar =20 Hi Klaus, > Hmm, no success for me... if i have opened the file semanticdb.el for > example with active senator-minor-mode and then use the menu > "Senator --> Analyse --> Class Browser" then a speedbar appears but > the only thing displayed is the string "> Empty display" :-( > (see also attached png-screenshot) Same result here. I tried with semanticdb.el and a java file in a project db. After looking thoroughly at the [complex and hard to understand ;)] semantic db code, I found that the function `semanticdb-current-database-list' could be the culprit, because it returns nil when there are no `semanticdb-project-roots' nor `semanticdb-project-root-functions' defined in the current project. I made the following change to `semanticdb-current-database-list' so that it tries to return something based on the passed DIR when there are no project roots nor root functions defined, and with that change `semantic-cb-speedbar-mode' seems to return useful things ;) However, I would prefer Eric to have a look at my patch because I am not sure it is the right thing to do! As I already said the semantic db code is difficult to debug and understand :-( Hope it will help. David Index: semanticdb.el =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D RCS file: /cvsroot/cedet/cedet/semantic/semanticdb.el,v retrieving revision 1.71 diff -c -r1.71 semanticdb.el *** semanticdb.el 12 Jan 2005 22:43:23 -0000 1.71 --- semanticdb.el 19 Jan 2005 13:52:08 -0000 *************** *** 383,400 **** (roots semanticdb-project-roots) ;all user roots (dir (or dir default-directory)) ) ! ;; Find the root based on project functions. ! (setq root (run-hook-with-args-until-success ! 'semanticdb-project-root-functions ! dir)) ! ;; Find roots based on strings ! (while (and roots (not root)) ! (if (string-match (concat "^" ! (regexp-quote ! (expand-file-name (car roots)))) ! (expand-file-name dir)) ! (setq root (car roots))) ! (setq roots (cdr roots))) ;; Find databases based on the root directory. (when root ;; The rootlist allows the root functions to possibly --- 383,402 ---- (roots semanticdb-project-roots) ;all user roots (dir (or dir default-directory)) ) ! (if (and (not roots) (not semanticdb-project-root-functions)) ! (setq root dir) ! ;; Find the root based on project functions. ! (setq root (run-hook-with-args-until-success ! 'semanticdb-project-root-functions ! dir)) ! ;; Find roots based on strings ! (while (and roots (not root)) ! (if (string-match (concat "^" ! (regexp-quote ! (expand-file-name (car roots)))) ! (expand-file-name dir)) ! (setq root (car roots))) ! (setq roots (cdr roots)))) ;; Find databases based on the root directory. (when root ;; The rootlist allows the root functions to possibly |