| Red Hat Documentation |
|
|||||||||||||||||||||||||
|
*.[hHcC] *.[ch]xx *.[ch]pp *.cc *.hh *.[CH]XX *.[CH]PP *.CC *.HH |
|
After each of the languages is an External Editor text box; you may type in the executable (shell) command for an external editor, or you may click the "..." button to browse. If you leave the text box blank, Source-Navigator uses its built-in editor.
Macros make the task of source code analysis more complicated, and there is no single right way to handle them. By default, Source-Navigator treats them as opaque symbols and, aside from recording where they are defined, it ignores them completely. This behavior not only makes parsing substantially faster than true compilation, but it also preserves the layer of source code abstraction that is presented in the Editor. This behavior is particularly useful when maintaining software that must run on multiple platforms, and you would like to see all of the impacts that a change might have, regardless of a macro's platform definition.
For some projects and/or tasks, this layer of abstraction is a barrier to code comprehension. For these cases, you can direct Source-Navigator to define and expand macros in one of four ways:
define
define
is used to insert a symbol into Source-Navigator's preprocessor namespace. If you
define FOO
(or
#define FOO, the leading
#
is optional), then conditionals that test
#ifdef/#ifndef
are scanned according to the
#ifdef/#ifndef
test.
FOO
will be replaced with the empty string.
define can also be used to give a symbol a value (such as define FOO BAR). This will not only inject the symbol into the namespace, but will cause Source-Navigator to scan BAR whenever it sees the FOO macro. This is particularly useful for DEFUN or PROTO macros that are used to bridge between K&R and ANSI C but which otherwise are not interesting at the source code comprehension level. It is also useful when macros test numerical results, such as #if (X >= Y) or #if X.
define macros can take arguments, just as in C and C++, and they can expand recursively (i.e., FOO might expand to BAR (5) which might then expand to mumble (5, 5, 0); in this case Source-Navigator would only see mumble (5, 5, 0)).
replace
replace
is just like
define, except that the symbol is not injected into the namespace. Thus, if you want to expand macros, but not have conditional code compiled away, use
replace.
delete
Source-Navigator lets you use more than one macro file in a project. You can specify a macro in one file and then delete it from the preprocessor namespace using
delete
in a second macro file.
undef
undef
doesn't do any substitution, it just affects the evaluation of
#if,
#ifdef, and
#ifndef
statements.
The macro processor does not support include, token concatenation, ANSI stringification, or other pre-processor directives. These may be implemented in a future release.
As explained above, Source-Navigator parses, but does not interpret, macro definitions in your project files. It only interprets macro definitions from files you specify explicitly in the parser preferences of your project. Because multiple files may be specified, you may want to organize your macro files according to global, per-user, and per-project divisions. This order is important, because Source-Navigator uses the last encountered definition for the macro.
Macro files are ASCII files and every non-blank line is a macro directive. Leading blanks and # characters are stripped, and if the first character of a line is an apostrophe ( ' ), the line is treated as a comment. The macro file can contain continuation lines, for example:
define ABC\ \ 5
Otherwise, the directives are interpreted as documented above.
Others Tab of the Preferences Dialog
Build
Enter the executable (shell) command used to start your
make
system.
HTML viewer
Enter the HTML viewer to display online help. From
Help, select
Online Manuals
to open the viewer, which must be included in your path.
Mailhost
Source-Navigator supports sending bug report emails by SMTP. Enter the name of your SMTP mail server in this field.
ASCII Print Command
Enter the command you use when printing a source file from the command line.
Print Command
Enter the print command appropriate for your system. For example, Linux-based systems use
lpr.
Enter the executable (shell) command to start Insight, which is usually gdb.
Do not display the warning dialog for multiple matches
Select this if you don't want to be warned when the
Retriever
finds more than one symbol with the name you're searching for. See Retriever for more information about the
Retriever.
Source-Navigator assigns a different default color to each component of your source code. To customize these colors or choose different fonts, click the Colors & Fonts tab of the Preferences dialog.
Colors & Fonts Tab of the Preferences Dialog
From the list of components, choose the item you want to change. The current settings appear in the Font, Foreground, and Background text boxes, and the word "Sample" displays the text with these settings.
Click the "..." button at the end of the Font text entry box. The Choose Font dialog appears:
Choose the Family, Name, and Size of font that you would like, as well as Bold or Italics, if you want to use those properties. Click the Apply button to see the effect of your changes and, when you are satisfied, click OK. Your changes take effect the next time you start Source-Navigator.
You may want to change the Foreground or Background colors from their default settings if they do not show up well on your laptop or CRT display, or if your code colorization conventions do not match Source-Navigator's default colors.
To choose a different color for any component, you must set new RGB (Red-Green-Blue) values. Click the Foreground or Background "..." button. The Choose Color dialog appears.
Move the red, green, and blue sliders until the color you want appears in the box at the top of the dialog. Click the Apply button to see how your text or background looks with the new color. If you are satisfied, click OK. Your changes take effect the next time you start Source-Navigator.
|
| ||
|---|---|---|
|
© 2001 Red Hat, Inc. All rights reserved. About Red Hat : Legal statement : Privacy statement : Y2K statement : Contact Red Hat |