]> code.delx.au - gnu-emacs/blobdiff - lisp/cedet/semantic/db-typecache.el
Update copyright year to 2015
[gnu-emacs] / lisp / cedet / semantic / db-typecache.el
index 0096c1aab09dfe6706b4fee75c8b0c9fe3962a1a..eb00a57cddd580120ea16a9583f67f219119318a 100644 (file)
@@ -1,6 +1,6 @@
 ;;; 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>
 
@@ -97,7 +97,7 @@ Said object must support `semantic-reset' methods.")
   (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
@@ -368,7 +368,7 @@ a master list."
                  (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
@@ -473,7 +473,7 @@ found tag to be loaded."
        ;;       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
@@ -483,6 +483,11 @@ found tag to be loaded."
            (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.
@@ -511,7 +516,7 @@ found tag to be loaded."
          ;; 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))
@@ -577,7 +582,11 @@ If there isn't one, create it.
   (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 ()