Re: AW: [CEDET-devel] problems with the Class Browser of semantic/speedbar
Brought to you by:
zappo
From: David P. <dav...@wa...> - 2005-01-19 14:12:01
|
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 =================================================================== 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 |