How to get the effect of an Eclipse project from Emacs?

Through school, I used Eclipse with Java, but I'm going to deploy and build C and Emacs. I am looking for a way to implement several project features in Eclipse. In particular, the functions that I missed are searching for the declaration of the function declared in another file, and searching for all function calls. Is there any way to achieve this? I am not opposed to using makefiles for compilation, since it seems like the right tool to work (in addition, I understand that if you use eclipse or visual studio for C, they simply automatically generate a makefile for you). I just can't help but feel that some of the things mentioned above should also have solutions in this editor, as they are just convenient.

+4
source share
4 answers

I would suggest a combination of projectile + ctags + ECB (or just CEDET) + cscope .

The projectile offers easy navigation in the project, files and some interesting functions, such as text search, rebirth tags, etc. The ECB is an Emacs code browser that makes Emacs look more IDE-like, Cedet will give you smart code completion and Cscope will give you can find ways to use it (among other interesting features).

+5
source

If you know Eclipse well, you can check out Eclim , which uses Eclipse as a backend to provide intelligent character search, termination, etc. for emacs or vim.

+2
source

For navigation in the source code, you can look at Ctags in emacs .

After you configure it, you can use the following commands to jump to the implementation implementation or declare variables / macros:

M-. <RET> Jump to the tag underneath the cursor M-. <tag> <RET> Search for a particular tag Cu M-. Find the next definition for the last tag M-* Pop back to where you previously invoked "M-." 

For other features you mentioned, check out Cedet .

+1
source

Download XCsope.el and all your problems will be addressed by emacs.

I worked on Source Insight to view, but now emacs + cscope is much better.

+1
source

Source: https://habr.com/ru/post/1394089/


All Articles