Function: semantic-decoration-all-include-summary
semantic-decoration-all-include-summary is an interactive and
byte-compiled function defined in include.el.gz.
Signature
(semantic-decoration-all-include-summary)
Documentation
Provide a general summary for the state of all includes.
Key Bindings
Source Code
;; Defined in /usr/src/emacs/lisp/cedet/semantic/decorate/include.el.gz
;;; General Includes Information
;;
(defun semantic-decoration-all-include-summary ()
"Provide a general summary for the state of all includes."
(interactive)
(require 'semantic/dep)
(let* ((table semanticdb-current-table)
(tags (semantic-fetch-tags))
(inc (semantic-find-tags-by-class 'include table))
)
(with-output-to-temp-buffer (help-buffer) ;"*Help*"
(help-setup-xref (list #'semantic-decoration-all-include-summary)
(called-interactively-p 'interactive))
(princ "Include Summary for File: ")
(princ (file-truename (buffer-file-name)))
(princ "\n")
(when (oref table db-refs)
(princ "\nExternal Database References to this buffer:")
(dolist (r (oref table db-refs))
(princ "\n ")
(princ (oref r file)))
)
(princ (format "\nThis file contains %d tags, %d of which are includes.\n"
(length tags) (length inc)))
(let ((ok 0)
(unknown 0)
(unparsed 0)
(all 0))
(dolist (i inc)
(let* ((fileinner (semantic-dependency-tag-file i))
(tableinner (when fileinner
(semanticdb-file-table-object fileinner t))))
(cond ((not fileinner)
(setq unknown (1+ unknown)))
((number-or-marker-p (oref tableinner pointmax))
(setq ok (1+ ok)))
(t
(setq unparsed (1+ unparsed))))))
(setq all (+ ok unknown unparsed))
(when (not (= 0 all))
(princ (format " Unknown Includes: %d\n" unknown))
(princ (format " Unparsed Includes: %d\n" unparsed))
(princ (format " Parsed Includes: %d\n" ok)))
)
(princ "\nInclude Path Summary:\n\n")
(when (and (boundp 'ede-object)
(boundp 'ede-object-project)
ede-object)
(princ (substitute-command-keys
" This file's project include search is handled by the EDE object:\n"))
(princ " Buffer Target: ")
(princ (cl-prin1-to-string ede-object))
(princ "\n")
(when (not (eq ede-object ede-object-project))
(princ " Buffer Project: ")
(princ (cl-prin1-to-string ede-object-project))
(princ "\n")
)
(when ede-object-project
(let ((loc (ede-get-locator-object ede-object-project)))
(princ " Backup in-project Locator: ")
(princ (cl-prin1-to-string loc))
(princ "\n")))
(let ((syspath (ede-system-include-path ede-object-project)))
(if (not syspath)
(princ " EDE Project system include path: Empty\n")
(princ " EDE Project system include path:\n")
(dolist (dir syspath)
(princ " ")
(princ dir)
(princ "\n"))
)))
(princ (substitute-command-keys
"\n This file's system include path is:\n"))
(dolist (dir semantic-dependency-system-include-path)
(princ " ")
(princ dir)
(princ "\n"))
(let ((unk semanticdb-find-lost-includes))
(when unk
(princ "\nAll unknown includes:\n")
(dolist (tag unk)
(princ " ")
(princ (semantic-tag-name tag))
(when (not (eq (semantic-tag-name tag) (semantic-tag-include-filename tag)))
(princ " -> ")
(princ (semantic-tag-include-filename tag)))
(princ "\n"))
))
(let* ((semanticdb-find-default-throttle
(if (featurep 'semantic/db-find)
(remq 'unloaded semanticdb-find-default-throttle)
nil))
(path (semanticdb-find-translate-path nil nil)))
(if (<= (length path) (length inc))
(princ "\nThere are currently no includes found recursively.\n")
;; List the full include list.
(princ "\nSummary of all includes needed by ")
(princ (buffer-name))
(dolist (p path)
(if (slot-boundp p 'tags)
(princ (format "\n %s :\t%d tags, %d are includes. %s"
(eieio-object-name-string p)
(length (oref p tags))
(length (semantic-find-tags-by-class
'include p))
(cond
((condition-case nil
(oref p dirty)
(error nil))
" dirty.")
((not (number-or-marker-p (oref table pointmax)))
" Needs to be parsed.")
(t ""))))
(princ (format "\n %s :\tUnparsed"
(eieio-object-name-string p))))
)))
)))