;;; ede/locate.el --- Locate support
-;; Copyright (C) 2008-2011 Free Software Foundation, Inc.
+;; Copyright (C) 2008-2014 Free Software Foundation, Inc.
;; Author: Eric M. Ludlam <eric@siege-engine.com>
;; when it is available.
(require 'ede)
-(eval-when-compile (require 'data-debug)
- (require 'eieio-datadebug)
- (require 'cedet-global)
- (require 'cedet-idutils)
- (require 'cedet-cscope))
-
-(require 'locate)
+(eval-when-compile (require 'locate))
;;; Code:
(defcustom ede-locate-setup-options
"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)))
+ (eieio-object-name loc)))
;;; LOCATE
;;
;;; GLOBAL
;;
+
+(declare-function cedet-gnu-global-version-check "cedet-global")
+(declare-function cedet-gnu-global-root "cedet-global")
+(declare-function cedet-gnu-global-expand-filename "cedet-global")
+(declare-function cedet-gnu-global-create/update-database "cedet-global")
+
(defclass ede-locate-global (ede-locate-base)
()
"EDE Locator using GNU Global.
;;; IDUTILS
;;
+
+(declare-function cedet-idutils-version-check "cedet-idutils")
+(declare-function cedet-idutils-support-for-directory "cedet-idutils")
+(declare-function cedet-idutils-expand-filename "cedet-idutils")
+(declare-function cedet-idutils-create/update-database "cedet-idutils")
+
(defclass ede-locate-idutils (ede-locate-base)
()
"EDE Locator using IDUtils.
;;; CSCOPE
;;
+
+(declare-function cedet-cscope-version-check "cedet-cscope")
+(declare-function cedet-cscope-support-for-directory "cedet-cscope")
+(declare-function cedet-cscope-expand-filename "cedet-cscope")
+(declare-function cedet-cscope-create/update-database "cedet-cscope")
+
(defclass ede-locate-cscope (ede-locate-base)
()
"EDE Locator using Cscope.
;; Get ourselves initialized.
(call-next-method)
;; Do the checks.
+ (require 'cedet-cscope)
(cedet-cscope-version-check)
(when (not (cedet-cscope-support-for-directory (oref loc root)))
(error "Cannot use Cscope in %s"
(defmethod ede-locate-ok-in-project :static ((loc ede-locate-cscope)
root)
"Is it ok to use this project type under ROOT."
+ (require 'cedet-cscope)
(cedet-cscope-version-check)
(when (cedet-cscope-support-for-directory root)
root))
Searches are done under the current root of the EDE project
that created this EDE locate object."
(let ((default-directory (oref loc root)))
+ (require 'cedet-cscope)
(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."
+ (require 'cedet-cscope)
(cedet-cscope-create/update-database root))
(provide 'ede/locate)