Function: vhdl-speedbar-insert-hierarchy

vhdl-speedbar-insert-hierarchy is a byte-compiled function defined in vhdl-mode.el.gz.

Signature

(vhdl-speedbar-insert-hierarchy ENT-ALIST-ARG CONF-ALIST-ARG PACKAGE-ALIST ENT-INST-LIST DEPTH)

Documentation

Insert hierarchy of ENT-ALIST, CONF-ALIST, and PACKAGE-ALIST.

Source Code

;; Defined in /usr/src/emacs/lisp/progmodes/vhdl-mode.el.gz
(defun vhdl-speedbar-insert-hierarchy ( ent-alist-arg conf-alist-arg
                                        package-alist ent-inst-list depth)
  "Insert hierarchy of ENT-ALIST, CONF-ALIST, and PACKAGE-ALIST."
  (if (not (or ent-alist conf-alist package-alist))
      (vhdl-speedbar-make-title-line "No VHDL design units!" depth)
    (let ((ent-alist ent-alist-arg)
          (conf-alist conf-alist-arg)
          ent-entry conf-entry pack-entry)
      ;; insert entities
      (when ent-alist (vhdl-speedbar-make-title-line "Entities:" depth))
      (while ent-alist
	(setq ent-entry (car ent-alist))
	(speedbar-make-tag-line
	 'bracket ?+ 'vhdl-speedbar-expand-entity (nth 0 ent-entry)
	 (nth 1 ent-entry) 'vhdl-speedbar-find-file
	 (cons (nth 2 ent-entry) (nth 3 ent-entry))
	 'vhdl-speedbar-entity-face depth)
	(unless (nth 2 ent-entry)
	  (end-of-line 0) (insert "!") (forward-char 1))
	(unless (member (nth 0 ent-entry) ent-inst-list)
	  (end-of-line 0) (insert " (top)") (forward-char 1))
	(setq ent-alist (cdr ent-alist)))
      ;; insert configurations
      (when conf-alist (vhdl-speedbar-make-title-line "Configurations:" depth))
      (while conf-alist
	(setq conf-entry (car conf-alist))
	(speedbar-make-tag-line
	 'bracket ?+ 'vhdl-speedbar-expand-config (nth 0 conf-entry)
	 (nth 1 conf-entry) 'vhdl-speedbar-find-file
	 (cons (nth 2 conf-entry) (nth 3 conf-entry))
	 'vhdl-speedbar-configuration-face depth)
	(setq conf-alist (cdr conf-alist)))
      ;; insert packages
      (when package-alist (vhdl-speedbar-make-title-line "Packages:" depth))
      (while package-alist
	(setq pack-entry (car package-alist))
	(vhdl-speedbar-make-pack-line
	 (nth 0 pack-entry) (nth 1 pack-entry)
	 (cons (nth 2 pack-entry) (nth 3 pack-entry))
	 (cons (nth 7 pack-entry) (nth 8 pack-entry))
	 depth)
	(setq package-alist (cdr package-alist))))))