diff options
Diffstat (limited to 'lisp/cedet/ede/locate.el')
-rw-r--r-- | lisp/cedet/ede/locate.el | 28 |
1 files changed, 27 insertions, 1 deletions
diff --git a/lisp/cedet/ede/locate.el b/lisp/cedet/ede/locate.el index 099e193f010..c2ca81c668b 100644 --- a/lisp/cedet/ede/locate.el +++ b/lisp/cedet/ede/locate.el @@ -121,7 +121,7 @@ based on `ede-locate-setup-options'." ;; Basic setup. (call-next-method) ;; Make sure we have a hash table. - (oset loc hash (make-hash-table :test 'equal)) + (ede-locate-flush-hash loc) ) (defmethod ede-locate-ok-in-project :static ((loc ede-locate-base) @@ -129,6 +129,10 @@ based on `ede-locate-setup-options'." "Is it ok to use this project type under ROOT." t) +(defmethod ede-locate-flush-hash ((loc ede-locate-base)) + "For LOC, flush hashtable and start from scratch." + (oset loc hash (make-hash-table :test 'equal))) + (defmethod ede-locate-file-in-hash ((loc ede-locate-base) filestring) "For LOC, is the file FILESTRING in our hashtable?" @@ -160,6 +164,13 @@ that created this EDE locate object." nil ) +(defmethod ede-locate-create/update-root-database :STATIC + ((loc ede-locate-base) root) + "Create or update the database for the current project. +You cannot create projects for the baseclass." + (error "Cannot create/update a database of type %S" + (object-name loc))) + ;;; LOCATE ;; ;; Using the standard unix "locate" command. @@ -242,6 +253,11 @@ that created this EDE locate object." (let ((default-directory (oref loc root))) (cedet-gnu-global-expand-filename filesubstring))) +(defmethod ede-locate-create/update-root-database :STATIC + ((loc ede-locate-global) root) + "Create or update the GNU Global database for the current project." + (cedet-gnu-global-create/update-database root)) + ;;; IDUTILS ;; (defclass ede-locate-idutils (ede-locate-base) @@ -280,6 +296,11 @@ that created this EDE locate object." (let ((default-directory (oref loc root))) (cedet-idutils-expand-filename filesubstring))) +(defmethod ede-locate-create/update-root-database :STATIC + ((loc ede-locate-idutils) root) + "Create or update the GNU Global database for the current project." + (cedet-idutils-create/update-database root)) + ;;; CSCOPE ;; (defclass ede-locate-cscope (ede-locate-base) @@ -315,6 +336,11 @@ that created this EDE locate object." (let ((default-directory (oref loc root))) (cedet-cscope-expand-filename filesubstring))) +(defmethod ede-locate-create/update-root-database :STATIC + ((loc ede-locate-cscope) root) + "Create or update the GNU Global database for the current project." + (cedet-cscope-create/update-database root)) + (provide 'ede/locate) ;; Local variables: |