CEDET 
 User Tools 
  Simple Setup 
  Project Management 
  Smart Completion 
  Find References 
  Code Generation 
  UML Graphs 
  Language Support 
  Project Support 
 Developer Primers 
  Add a Language 
  Add external tool 
 Parts of CEDET 
  EDE 
  Semantic 
  SRecode 
  Cogre 
  Speedbar 
  EIEIO 
  Misc Tools 
  Documentation 
 Releases 
  1.0.1 
  1.1 
 Source Forge 
  Project 
  Mailing Lists 
   cedet-devel 
   cedet-semantic 
   cedet-eieio 
  Screenshots 
  Git Repository 
 More Tools 
  JDEE 
  ECB 
  CompletionUI 
 
<< Files >>

Symbol References

CEDET can Analyze where symbols are referenced in your code base. The Symbol References tool in CEDET can use external tools such as GNU Global, ID Utils, CScope, or even find/grep to locate usages of your symbols. Every location is analyzed and displayed hierarchically showing you the file and function the reference occurs in, instead of a flat list of locations.

The image to the right shows integration with GNU Global running in the GNU Global source code.

How it works

The symbol reference tool is based on the Semantic module in CEDET. Semantic is a tool that starts with lexical and syntactic analysis and builds up to a symbol referencing engine called semantic-symref.

Semantic does not, however, analyze all your code and build indexes of every symbol used. This is a task not appropriate for an Emacs Lisp program. Instead, external tools are utilized that can do that indexing more quickly.

Tools supported by semantic-symref include GNU Global, ID Utils, CScope, and a combination of find/grep.

Unlike the raw interface to these tools, semantic-symref takes the output, and builds an output buffer that sorts the hits first by file, then by tag-name. Thus, you can quickly identify where the symbols are being used without having to visit each hit yourself.

There are two interfaces to semantic-symref. The first is:

M-x semantic-symref RET

This will search for usages of the symbol the cursor is currently in. The second interface is:

M-x semantic-symref-symbol RET

This command will prompt for the symbol to search for.


 
Get CEDET at SourceForge.net.
gnu Eric's homepage
Return to CEDET.
Send mail to cedet-devel to contact the developers.
Visit Siege-engine.com to see what I do in analog land.

Copyright(C) 1997,98,99,2000,01,02,03,04,05,06,07,08,09,10,11 Eric M. Ludlam
Verbatim copying and distribution is permitted in any medium, provided this notice is preserved.