| ||Source Code Browsing Interface|
Epsilon User's Manual and Reference >
Commands by Topic >
Moving Around >
Source Code Browsing Interface
access source code browsing data generated by Microsoft compilers.
To set this up, first you must make sure your
compiler generates such data, in the form of a .bsc file. From Visual
Studio, ensure the "Generate browse info" option (Project/Settings,
on the C/C++ tab in the General category) and the "Build browse info
file" option (Project/Settings, on the Browse Info tab are both
enabled. Or if you build from the command line, compile with the /FR
or /Fr flag to generate .sbr files, then use the bscmake utility to
combine the .sbr files into a .bsc file.
Next, set up Epsilon to use the generated browser file. To do this,
run the Alt-x configure-epsilon command and select the option to
install source code browser support. This retrieves a DLL file from
Microsoft's web site and installs it. Or you can install the
necessary DLL manually; see
http://www.lugaru.com/links.html#bsc for details.
You can use the browser database only for source code browsing, or you
can tell Epsilon to use it for tagging as well, instead of using its
own tagging methods. To have Epsilon use the same browser database
file for both purposes, use the select-tag-file command on
Ctrl-X Alt-<Comma> to select your .bsc file. To use Epsilon's
built-in tagging, and utilize the browser database only for source
code browsing, select your .bsc file with the select-browse-file
command, which sets the browser-file variable.
Once you've set up source code browsing,
press Ctrl-<NumSlash> (using the
/ key on the numeric keypad)
to run the browse-symbol command. It will prompt for the name
of a symbol (the name of a function, variable, macro, class, or
similar), using the symbol at point as the default. Then it will set
a temporary bookmark at your old position, just like the
set-bookmark command on Alt-/. (After using
browse-symbol to navigate to a different part of your code,
you can use Alt-J or Ctrl-<NumStar> to move back to your original
location.) Finally, it builds a
#symbols# buffer showing all
available information on the symbol.
#symbols# buffer contains a header section, followed by one
section for each distinct use of the symbol. For instance, if you use
the name "
cost" for a function, and also use it elsewhere as a
local variable name, and as a structure name somewhere else, there
will be three sections, one for each use.
Browser File: c:\Project\project.bsc
Filter all but: Var Func Macro Type Class
Filter all Uses/UsedBy but: Var Func Macro Type Class
qsort (public function) is defined at:
qsort (public function) is used at:
- C:\Program Files\Microsoft Visual Studio\VC98\include\stdlib.h(302):
-- _CRTIMP void __cdecl qsort(void *, size_t, size_t, int (__cdecl *)
- prep_env.c(79): qsort(order, cnt, sizeof(char *), env_compare);
- token.cpp(174): qsort(le, sizeX + sizeY, sizeof(line_entry), hash_cmp);
qsort (public function) is used by:
- make_proc_env (public function)
- tokenize(int *,int *) (static function)
The header section displays the name of the .bsc file used to generate
the listing and the symbol being displayed. It also shows the current
filters, which may be used to hide certain uses of a symbol.
Next you will see a list of those lines in your source code that
define the specified symbol, followed by those lines that reference
it. In the example above,
qsort(), a library function, isn't
defined within the project source code, so its "is defined at"
section is empty. It's defined in a standard header file, and called
from two places in the project source code. You can position to any
of these source code lines and press <Enter>, or double-click the
line, and Epsilon will go to the corresponding source file and line.
In the following section, you will see a list of functions that use
qsort() function. You can look up any one of these symbol
names with <Enter> or double-clicking, and Epsilon will display
the symbol listing for that symbol, replacing the current listing.
Afterwards, press the L key to return to viewing the original symbol.
Repeated presses go to earlier symbols. With a
numeric argument, the L key displays a list of
recently-viewed symbols; you can select one and have it displayed
If the symbol has a definition within the current project, the next
section will show the functions and variables it uses in its
You can set filters, as shown in the header section, to skip over
certain kinds of definitions and uses. For instance, if
were the name of a macro as well as a function, you could use the
first filter to see only the macro uses by pressing
f. The second
filter controls which symbols appear in the uses/used-by section;
b to set it. You can also set the filters by pressing
<Enter> while on the corresponding "Filter:" line in the browser
buffer. These set the browser-filter and
The browser-options variable lets you omit some of the above
sections, or simplify the data shown in other ways, to make browsing
quicker. The browse-current-symbol command is a variation on
browse-symbol that doesn't prompt for a symbol name, but
uses the name at point without prompting.
Copyright (C) 1984, 2018 Lugaru Software Ltd. All Rights Reserved.