0

I use emacs as a C++ IDE. I have CEDET and EDE configured and working nicely, but i have a minor problem.

In my project header files are spread all over the project tree, so i need to write a function to help ede to find my headers. I have been looking for an example for some time, but I have not found anything. Would anyone be so kind to help me?

Thanks in advance.

thamurath
  • 765
  • 8
  • 24

2 Answers2

1

Here's an example for a "quick find file" in a project using EDE and ido:

(defun DE-ido-find-files-in-project ()
  (interactive)
  (let ((allfiles nil)
 choice)
    (ede-map-all-subprojects
     ede-object-root-project
     (lambda (p)
       (let ((targets (oref p targets)))
  (dolist (target targets)
    (setq allfiles (append allfiles (oref target source)))))))
    (setq choice
   (ido-completing-read
    (format "File in project %s: " (oref ede-object-root-project name))
    allfiles nil t))
    (when choice
      (ede-find-file choice))))
pokita
  • 1,241
  • 10
  • 12
0

The command 'ede-find-file' is bound to "C-c . f". Depending on the type of project you have, you may need to enable a tool like gnu-global, or idutils. See the CEDET manual on setup for some of those tools. CEDET integrates in these tools to help finding things like files and symbols.

If you refer instead to having #include statements "found" from a C file so that symbol completion works, you will need to setup a project level include path. How that works depends on the type of EDE project you are using.

Eric
  • 3,959
  • 17
  • 15