Function: semantic-decoration-include-describe

semantic-decoration-include-describe is an interactive and byte-compiled function defined in include.el.gz.

Signature

(semantic-decoration-include-describe)

Documentation

Describe the current include tag.

Argument EVENT is the mouse clicked event.

Key Bindings

Source Code

;; Defined in /usr/src/emacs/lisp/cedet/semantic/decorate/include.el.gz
;;; Regular Include Functions
;;
(defun semantic-decoration-include-describe ()
  "Describe the current include tag.
Argument EVENT is the mouse clicked event."
  (interactive)
  (let* ((tag (or (semantic-current-tag)
		  (error "No tag under point")))
	 (file (semantic-dependency-tag-file tag))
	 (table (when file
		  (semanticdb-file-table-object file t))))
    (with-output-to-temp-buffer (help-buffer) ; "*Help*"
      (help-setup-xref (list #'semantic-decoration-include-describe)
		       (called-interactively-p 'interactive))
      (princ "Include File: ")
      (princ (semantic-format-tag-name tag nil t))
      (princ "\n")
      (princ "This include file was found at:\n  ")
      (princ (semantic-dependency-tag-file tag))
      (princ "\n\n")
      (princ "Semantic knows where this include file is, and has parsed
its contents.

")
      (let ((inc (semantic-find-tags-by-class 'include table))
	    (ok 0)
	    (unknown 0)
	    (unparsed 0)
	    (all 0))
	(dolist (i inc)
	  (let* ((fileinner (semantic-dependency-tag-file i))
		 )
	    (cond ((not fileinner)
		   (setq unknown (1+ unknown)))
		  ((number-or-marker-p (oref table pointmax))
		   (setq ok (1+ ok)))
		  (t
		   (setq unparsed (1+ unparsed))))))
	(setq all (+ ok unknown unparsed))
	(if (= 0 all)
	    (princ "There are no other includes in this file.\n")
	  (princ (format "There are %d more includes in this file.\n"
			 all))
	  (princ (format "   Unknown Includes:  %d\n" unknown))
	  (princ (format "   Unparsed Includes: %d\n" unparsed))
	  (princ (format "   Parsed Includes:   %d\n" ok)))
	)
      ;; Get the semanticdb statement, and display it's contents.
      (princ "\nDetails for header file...\n")
      (princ "\nMajor Mode:          ")
      (princ (oref table major-mode))
      (princ "\nTags:                ")
      (princ (format "%s entries" (length (oref table tags))))
      (princ "\nFile Size:           ")
      (princ (format "%s chars" (oref table pointmax)))
      (princ "\nSave State:          ")
      (cond ((oref table dirty)
	     (princ "Table needs to be saved."))
	    (t
	     (princ "Table is saved on disk."))
	    )
      (princ "\nExternal References:")
      (dolist (r (oref table db-refs))
	(princ "\n    ")
	(princ (oref r file)))
      )))