;;; semantic/db-typecache.el --- Manage Datatypes
-;; Copyright (C) 2007-2011 Free Software Foundation, Inc.
+;; Copyright (C) 2007-2015 Free Software Foundation, Inc.
;; Author: Eric M. Ludlam <eric@siege-engine.com>
(when (semantic-find-tags-by-class 'type new-tags)
;; Reset our index
(oset tc filestream nil)
- t ;; Return true, our core file tags have changed in a relavant way.
+ t ;; Return true, our core file tags have changed in a relevant way.
)
;; NO CODE HERE
(semanticdb-typecache-merge-streams
incstream
;; Getting the cache from this table will also cause this
- ;; file to update it's cache from it's decendants.
+ ;; file to update its cache from its descendants.
;;
;; In theory, caches are only built for most includes
;; only once (in the loop before this one), so this ends
;; find a type/namespace because everything else is excluded.
;; If this is not the last entry from the list, then it
- ;; must be a type or a namespace. Lets double check.
+ ;; must be a type or a namespace. Let's double check.
(when (cdr type)
;; From above, there is only one tag in ans, and we prefer
(setq ans nil)))
)
+ ;; The typecache holds all the known types and elements. Some databases
+ ;; may provide tags that are simplified by name, and are proxies. These
+ ;; proxies must be resolved in order to extract type members.
+ (setq ans (semantic-tag-resolve-proxy ans))
+
(push ans calculated-scope)
;; Track most recent file.
;; This won't liven up the tag since we have a copy, but
;; we ought to be able to get there and go to the right line.
(find-file-noselect lastfile)
- ;; We don't want to find-file match, so instead lets
+ ;; We don't want to find-file match, so instead let's
;; push the filename onto the return tag.
(when lastans
(setq lastans (semantic-tag-copy lastans nil lastfile))
(interactive)
(let* ((path (semanticdb-find-translate-path nil nil)))
(dolist (P path)
- (oset P pointmax nil)
+ (condition-case nil
+ (oset P pointmax nil)
+ ;; Pointmax may not exist for all tables discovered in the
+ ;; path.
+ (error nil))
(semantic-reset (semanticdb-get-typecache P)))))
(defun semanticdb-typecache-dump ()