The CEDET-suite contains the semantic analyzer1 which is a library tool that performs context analysis and can derive useful information.
Please see the related node in the info-manual of cedet/semantic for more detailed informations about this tool and how to setup it for best performance for your project needs.
The semantic-analyzer output can be used through a special ECB-window. This
interface lists details about the analysis, such as the current function,
local arguments and variables, details on the prefix (the symbol the cursor is
on), and a list of all possible completions (see
semantic-analyze-possible-completions for more details about
completions available via the semantic-analyser).
The analyser-ECB-window is of type tree-buffer. See Tree-buffer basics for basic informations how to use such a tree-buffer.
ecb-mouse-click-destination) will jump to the related entry. For strongly typed languages, this means you will jump to the definition of the variable, slot, or type definition.
Per default the content of the analyser-ECB-window is automatically
synchronized and updated with current point of the current source-buffer in
the edit-area (see
ecb-analyse-buffer-sync and most notably
ecb-analyse-buffer-sync-delay) and ECB-window synchronizing).
In contrary to the sync-options of the basic ECB-windows2 the default synchronisation delay of the
ECB-analyse-window is quite high: 2 seconds (see
What is the reason for this: a small value like 0.25 as for the basic windows would make the analyse-window quite unusable because then more or less after each type (depends on how fast you are typing) the analyse window would be synchronized with current point, which can be really annoying when there would be hundreds of completions for the current point.
Imagine the following scenario: programming in emacs-lisp, typing
and then you make a short break, just a moment, but immediately ECB would call the semantic-analyzer to analyse the current context for possible completions (a.o.). You can imagine that there are even thousands of possible function completions in emacs-lisp which beginns with “e”. Getting all these and displaying them in the analyse-window can take some time! Of course the whole stuff is interruptable by any key-press so ECB will not be blocked but nevertheless the will be a noticeable break in your typing.
Therefore it is strongly recommended to choose one of the following possibilities:
ecb-analyse-buffer-sync-delay to a value which is suitable for your
programing and typing style, default is already to seconds.
ecb-analyse-buffer-syncto nil. Use always customize for this, never setq!
ecb-analyse-buffer-syncto a conveniant shortcut
But note that semantic already offers some intellisense commands which can help you on demand too! See the documentation of the semantic analyzer.
ECB offers the following commands for the analyser-ECB-window:
See Interactive ECB commands for details about these commands.
Either use one of the predefined layouts "left-analyse" or
“leftright-analyse” (e.g. via C-c . l c) or create a new
ecb-layout via the command
ecb-create-new-layout and add a
buffer of type “other” and name “analyse” into this new layout
(see Creating a new ECB-layout).
See ecb-analyse for a list of all options currently available for customizing this ECB-window to your needs.