Function: semantic-ia-speedbar
semantic-ia-speedbar is a byte-compiled function defined in
ia-sb.el.gz.
Signature
(semantic-ia-speedbar DIRECTORY ZERO)
Documentation
Create buttons in speedbar which define the current analysis at POINT.
DIRECTORY is the current directory, which is ignored, and ZERO is 0.
Source Code
;; Defined in /usr/src/emacs/lisp/cedet/semantic/ia-sb.el.gz
(defun semantic-ia-speedbar (_directory _zero)
"Create buttons in speedbar which define the current analysis at POINT.
DIRECTORY is the current directory, which is ignored, and ZERO is 0."
(let ((analysis nil)
(scope nil)
(buffer nil)
(completions nil)
(cf (selected-frame))
(cnt nil)
(mode-local-active-mode nil)
)
;; Try and get some sort of analysis
(condition-case nil
(progn
(speedbar-select-attached-frame)
(setq buffer (current-buffer))
(setq mode-local-active-mode major-mode)
(save-excursion
;; Get the current scope
(setq scope (semantic-calculate-scope (point)))
;; Get the analysis
(setq analysis (semantic-analyze-current-context (point)))
(setq cnt (semantic-find-tag-by-overlay))
(when analysis
(setq completions (semantic-analyze-possible-completions analysis))
)
))
(error nil))
(select-frame cf)
(with-current-buffer speedbar-buffer
;; If we have something, do something spiff with it.
(erase-buffer)
(speedbar-insert-separator "Buffer/Function")
;; Note to self: Turn this into an expandable file name.
(speedbar-make-tag-line 'bracket ? nil nil
(buffer-name buffer)
nil nil 'speedbar-file-face 0)
(when cnt
(semantic-ia-sb-string-list cnt
'speedbar-tag-face
'semantic-sb-token-jump))
(when analysis
;; If this analyzer happens to point at a complete symbol, then
;; see if we can dig up some documentation for it.
(semantic-ia-sb-show-doc analysis))
(when analysis
;; Let different classes draw more buttons.
(semantic-ia-sb-more-buttons analysis)
(when completions
(speedbar-insert-separator "Completions")
(semantic-ia-sb-completion-list completions
'speedbar-tag-face
'semantic-ia-sb-complete))
)
;; Show local variables
(when scope
(semantic-ia-sb-show-scope scope))
)))