[Contents] [Prev. Chapter] [Next Section] [Next Chapter] [Index] [Help]

13    Editors

This chapter provides an overview of the features and capabilities of the editors supported in FUSE. For more detailed information on how to use these tools, choose Help: On Editor from the Help menu or Using Emacs and the vi Editors topic within the Editing Source Files topic from the FUSE online Help. You can print Help topics using the HyperHelp Viewer.

FUSE supports the following editors:


[Contents] [Prev. Chapter] [Next Section] [Next Chapter] [Index] [Help]

13.1    Starting the Editors

You can start the editors in several ways:


[Contents] [Prev. Chapter] [Prev. Section] [Next Section] [Next Chapter] [Index] [Help]

13.1.1    Use the Command Line

You can start the editors from the command line using the following command:

% fusedit [-cwd] [-emacs] [-vi] [-fuse] [-Xt-Options] [editor-options] [path]

See Appendix Appendix D and the specific reference pages for the command syntax and options.

If the Control Panel is not running, it starts automatically as a minimized icon. If FUSE is already running, the editor is placed in the current project.


[Contents] [Prev. Chapter] [Prev. Section] [Next Section] [Next Chapter] [Index] [Help]

13.1.2    Use the Editor Icon from CDE

When you have CDE installed, FUSE provides a FUSE application group icon and icons for the individual tools that make up the FUSE environment.

To invoke an editor:

  1. Double click on the Application Manager icon in the CDE Front Panel to display the application group icons.

  2. Double click on the FUSE application group icon to display the icons in the FUSE application group.

  3. Double click on the desired editor icon to start that editor.


[Contents] [Prev. Chapter] [Prev. Section] [Next Section] [Next Chapter] [Index] [Help]

13.1.3    Use the FUSE Control Panel

To start editors from the FUSE Control Panel, select the appropriate editor from the Tools menu. Like all tools, the editors inherits their configuration data from the project settings. See Section Section 9.4 for more information on working with projects.

Note

By default, the Emacs and vi editors do not appear on the Tools menu. To add either of these editors to the Tools menu, use the Modify Tools Menu... option on the Control Panel's Tool menu.


[Contents] [Prev. Chapter] [Prev. Section] [Next Section] [Next Chapter] [Index] [Help]

13.1.4    Use the Tools Menu from Most FUSE Tools

Most FUSE tools have a Tools menu. To start an editor, select the appropriate editor from the Tools menu.


[Contents] [Prev. Chapter] [Prev. Section] [Next Section] [Next Chapter] [Index] [Help]

13.1.5    Invoke the Editor from Another Tool

Many FUSE tools, such as the Call Graph Browser and the Program Visualizer, are integrated with the editors. The tools provide you with the ability to click or double click on an element within the tool's display area or transcript area and display the element's source code in the editor.


[Contents] [Prev. Chapter] [Prev. Section] [Next Section] [Next Chapter] [Index] [Help]

13.2    FUSE Editor

Figure Figure 13-1 shows the FUSE Editor main window.

Figure 13-1:  FUSE Editor Main Window

Key elements are the major window panes running from the top to the bottom of the window:

Configuration area

Displays the current project, source file, and target (executable file set for integration with the Debugger).

Annotation area

Displays line numbers if you choose and annotations to easily locate code associated with data from another FUSE tool.

Buffer area

Displays the file you are editing.

Navigation area

Provides information that lets you check the status of your buffer and navigate within your buffer.

Information area

Displays information messages and Quick Help on menu items when you press and hold MB1 on the item.


[Contents] [Prev. Chapter] [Prev. Section] [Next Section] [Next Chapter] [Index] [Help]

13.2.1    Summary of Features

All editors associated with a project can respond to directives from FUSE tools in the same project. If no editor is running in a project, your default editor is invoked. (For information on how to choose a default editor, see Section Section 1.2.2.)

If more than one editor is running in a project, each editor responds to directives from other tools.

For example, if there is no active editor in the current project and you double click on an occurrence of a symbol in the Cross-Referencer query results area, your default editor is started and the source file associated with that entry is displayed in a buffer. The source code is annotated to point to the specific line in the file where the symbol occurs. If you are running the FUSE Editor and Emacs and you double click on an entry in the Cross-Referencer, both editors will display the associated source code.


[Contents] [Prev. Chapter] [Prev. Section] [Next Section] [Next Chapter] [Index] [Help]

13.2.2    Using the FUSE Editor

The FUSE Editor provides support for the following common editing tasks. (For more information on performing these tasks with the FUSE Editor, see the online Help.)

The FUSE Editor also has features that are specific to the FUSE environment:


[Contents] [Prev. Chapter] [Prev. Section] [Next Section] [Next Chapter] [Index] [Help]

13.2.3    Key Bindings for FUSE Editor Commands

Key bindings for FUSE Editor commands (see Table Table 13-1) are defined in the file $FUSE_TOP/rundata/resources/DFEditor. (FUSE_TOP is an environment variable defined as the directory in which FUSE was installed and is automatically available in any Host Shell you invoke from the Control Panel.) The information provided in Table Table 13-1 is also available in the online Help in the topic Table 1: Key Bindings for FUSE Editing Commands.

Note that the key bindings for some systems and window managers may override those defined for the FUSE Editor.

You can change or add key bindings by editing the DFEditor resource file. See the Translations section of the reference page for the XmText widget for a description of action procedures you can use to define keys for editing commands. For example, to redefine the default tab setting to four spaces:

<Key>Tab: insert-string("    ") \n\

To modify the behavior of the Return key so that the cursor is placed at the indention of the previous line (rather than at the beginning of the line):

<Key>Return: newline-and-indent() \n\

To define the key sequence Ctrl+F6 to insert four spaces, move the cursor to the beginning of the current line, and then move the cursor down one line:

Ctrl<Key>F6: insert-string("    ") beginning-of-line() process-down() \n\

You can override the existing binding for a key by modifying the line on which it is defined in the DFEditor file or by placing the new definition after the existing one. The last definition encountered for a key supersedes all previous definitions.

Table 13-1:  Key Bindings for Editing Commands

Key Binding Command

Ctrl+(

Move cursor to beginning of file

Ctrl+)

Move cursor to end of file

Ctrl+@

Set a mark in file

Ctrl+^

Go to mark

Ctrl+*

Swap mark

Ctrl+#

Select text from cursor position to mark

Ctrl+~

Delete text from cursor position to mark

Ctrl+[

Move back one paragraph

Ctrl+]

Move forward one paragraph

Ctrl+ -> or Ctrl+t

Move forward one word

Ctrl+<- or Ctrl+w

Move back one word

Ctrl+a

Move to start of line

Ctrl+e

Move to end of line

Ctrl+b

Move back one character

Ctrl+f

Move forward one character

Ctrl+n

Move to next page

Ctrl+p

Move to previous page

Ctrl+g

Move buffer up one line (equivalent to clicking on the scroll bar up arrow)

Ctrl+h

Move buffer down one line (equivalent to clicking on the scroll bar down arrow)

Ctrl+m

Split line and move to start of new line

Ctrl+o

Create a new line and move to end of last line

Ctrl+j

Create a new line and move to first tab position

Ctrl+d or Delete

Delete previous character

Ctrl+q

Delete next character

Ctrl+r or Shift+Delete

Delete previous word

Ctrl+x

Delete next word

Ctrl+k

Delete from current position to end of line

Ctrl+u

Delete from current position to start of line

Ctrl+z

Delete selected text

Ctrl+y

Undo deletion

Ctrl+l

Redisplay text in buffer

Shift+up-arrow

Select text moving up one line

Shift+down-arrow

Select text moving down one line

Shift+right-arrow

Select text moving to end of line

Shift+left-arro

Select text moving to start of line


[Contents] [Prev. Chapter] [Prev. Section] [Next Section] [Next Chapter] [Index] [Help]

13.2.4    Accessing and Using Language Templates

Key bindings are available for expanding C, Pascal, and FORTRAN statements based on a set of language templates. Before you can use key bindings to expand the language templates, you must specify which set you want - C, Pascal, or FORTRAN - using either of the following methods:

To append the FUSE Editor resource file to the FUSE defaults file, follow these steps. This method affects the FUSE Editor for all users on your system.

Step Action

1

Log in as a superuser (login name of root).

2

Start FUSE and start the Host Shell.

3

Append one of the following template definition files to the FUSEdefaults file. These files and the FUSEdefaults file are located in the directory $FUSE_TOP/rundata/resources. (FUSE_TOP is an environment variable set to the directory in which FUSE was installed and is automatically defined in any Host Shell you invoke from the Control Panel.)

        c_DFEditor for the C language templates
        pascal_DFEditor for the Pascal language templates
        fortran_DFEditor for the FORTRAN language templates

4

From the Host Shell, enter this command to add FUSE defaults to the X defaults on your server:

% xrdb -merge FUSEdefaults

5

Start the FUSE Editor to use the language templates.

To create and modify a local copy of the DFEditor resource file:

Step Action

1

Start FUSE and the FUSE Editor.

2

Change one or more customization options (such as a color or font) in the Editor by using the Editor's Options menu.

3

Choose Options: Save Options. FUSE creates a resource file containing your customizations in a file named $HOME/.fuse-defaults/<locale>/DFEditor.

4

Append one of the language-specific template definition files (c_DFEditor, pascal_DFEditor, or fortran_DFEditor) to your local copy of DFEditor.

5

Start the FUSE Editor and use the language templates.

You can change or add key bindings by editing the DFEditor resource file. You can override the existing binding for a key by modifying its definition in the language-specific template definition file or by placing the new definition after the existing one. The last definition encountered for a key supersedes all previous definitions.

The key bindings for language templates are provided in Table Table 13-2 for C, Table Table 13-3 for Pascal, and Table Table 13-4 for FORTRAN. You can also find this information in the online Help.

Table 13-2:  C Language Templates

Key Binding Inserts

Ctrl+F1 or Ctrl+\ /

/* { comment } */

Ctrl+F2 or Ctrl+\ *

/*
   { comment }
*/

Ctrl+F3 or Ctrl+\ i

if ({ expression }) {
     { statement }
}

Ctrl+F4 or Ctrl+\ e

if ({ expression }) {
    {  statement }
   else
    {  statement }
}

Ctrl+F5 or Ctrl+\ f

for ({ init }; { test };;{ incr }) {
    { statement }
}

Ctrl+F6 or Ctrl+\ s

switch ({ expression }) {
case { expression }
     { statement }
     break;
default
     { statement }
     break;
}

Ctrl+F7 or Ctrl+\ w

while ({ expression }) {
     { statement }
}

Ctrl+F8 or Ctrl+\ d

do {
   { statement }
} while ({ expression })

Ctrl+F9 or Ctrl+\ {

{
{ statement }
}

Table 13-3:  Pascal Language Templates

Key Binding Inserts

Ctrl+F1 or Ctrl+\ {

{* { comment } *}

Ctrl+F2 or Ctrl+\ *

{*
   { comment }
*}

Ctrl+F3 or Ctrl+\ i

if({ expression }) {
then
   begin
   { statement }
   end;

Ctrl+F4 or Ctrl+\ e

if({ expression }) {
then
   begin
   { statement }
   end;
else
   begin
   { statement }
   end;

Ctrl+F5 or Ctrl+\ f

for { variable } := { first} to { last } do
    begin
    { statement }
    end;

Ctrl+F6 or Ctrl+\ w`

while ({ expression }) do
   begin
   { statement }
   end;

Ctrl+F7 or Ctrl+\ r

repeat
   { statement }
until  expression };

Ctrl+F8 or Ctrl+\ c

case  expression } of
   { label }:
       { statement }
   otherwise
       { statement }
   end;

Ctrl+F9 or Ctrl+\ b

begin
{ statement }
end;

Table 13-4:  FORTRAN Language Templates

Key Binding Inserts

Ctrl+F1 or Ctrl+\ c

C    { comment }

Ctrl+F2 or Ctrl+\ s

IF ({ expression }) { statement }

Ctrl+F3 or Ctrl+\ g

IF ({ expression }) GOTO { label }

Ctrl+F4 or Ctrl+\ e

IF ({ expression }) THEN
     statement }
ELSE
    { statement }
END IF

Ctrl+F5 or Ctrl+\ i

IF ({ expression }) THEN
     statement }
END IF

Ctrl+F6 or Ctrl+\ w

DO WHILE ({ expression })
   { statement }
END DO

Ctrl+F7 or Ctrl+\ d

DO { variable }={ first },{ last },{ incr }
   { statement }
END DO


[Contents] [Prev. Chapter] [Prev. Section] [Next Section] [Next Chapter] [Index] [Help]

13.2.4.1    Replacing Placeholder Text in Language Templates

A placeholder is a delimited string in a language template that provides a hint for what text you must enter to complete the statement. For example, in the following template, {init}, {test}, {incr}, and {statement} are placeholders:

       for ({init}); {test}; {incr}) {
            {statement}
       }

When you position the cursor on a placeholder, it is automatically selected and highlighted. Any text you type or paste at that point replaces the placeholder (including the {. and .} delimiters).


[Contents] [Prev. Chapter] [Prev. Section] [Next Section] [Next Chapter] [Index] [Help]

13.2.4.2    Creating and Binding Custom Language Templates

You can create your own language templates and bind the template to a key by adding the template definition and key binding to the appropriate language-specific c_DFEditor resource file (see Section 13.2.4).

For example, you can define the key sequence Ctrl+/ to insert a C language comment placeholder by adding the following line to the c_DFEditor resource file:

Ctrl<Key>/: insert-template("/*\n** {.comment.}\n*/") \n\

When you press Ctrl+/ in the Editor, the template is expanded as follows:

       /*
       ** {.comment.}
       */

Note

The middle dot character is ASCII code 037 octal and can be created on some keyboards by the key sequence Ctrl+&. When specifying placeholder text, you can substitute the string /037 for the middle dot character.

By default, when you expand a language template, the cursor is placed at the beginning of the expanded text. Before you can replace placeholder text, you need to move the cursor onto the placeholder. You can modify the template definitions to make the Editor move the cursor onto a placeholder automatically, so you can immediately begin typing after expanding the template. Consider the following example:

       Ctrl<Key>/: insert-template("/*\n** { comment }\n*/") forward-
       character() forward-character() forward-character() forward-
       character() forward-character() \n\

When you press Ctrl+/ in the Editor, the template is exanded and the cursor is positioned over the c in comment. The placeholder is selected and highlighted.

       /*
       ** { comment }
       */


[Contents] [Prev. Chapter] [Prev. Section] [Next Section] [Next Chapter] [Index] [Help]

13.2.5    Customizing the FUSE Editor

You can customize the FUSE Editor by using its Options menu. Use this menu to specify fonts, colors, and window size for the Editor, or to add or change definitions for environment variables used by FUSE. See Chapter 1 for more information on how to customize FUSE tools.


[Contents] [Prev. Chapter] [Prev. Section] [Next Section] [Next Chapter] [Index] [Help]

13.3    Emacs Editors

You have several choices in the Emacs editor you choose to work with as your default editor:

The Emacs Editor in FUSE is the standard GNU Emacs Editor and has all the Emacs editing capabilities plus additional FUSE-specific functionality. The Emacs Editor main window displays an empty scratch buffer (if started from the Tools menu) or the scratch buffer containing the source code associated with a selection in another tool.

The more current alternative versions of Emacs such as Xemacs have a menu bar and often a graphical user interface. Detailed information on XEmacs and Mule, including how to obtain them, is included in the online Help. Use the Text Search button to locate the "XEmacs" or "Mule" string.


[Contents] [Prev. Chapter] [Prev. Section] [Next Section] [Next Chapter] [Index] [Help]

13.3.1    Starting an Emacs Editor

You can start one or more Emacs editors from the Tools menu. If the Emacs editor does not appear as an option in the Tools menu, you must modify the Tools menu and add the appropriate editor to the menu. See Section Section 9.7 for information about modifying the Tools menu.


[Contents] [Prev. Chapter] [Prev. Section] [Next Section] [Next Chapter] [Index] [Help]

13.3.2    Setting the Emacs Path for Use in FUSE

You can manually change the path to any of the Emacs editors by reassigning the following environment variables to point to the current path before you start FUSE or using the FUSE Control Panel (choose Options: Global Environment...):

Environment Variable Editor

FUSE_EMACS

Emacs Editor

FUSE_XEMACS

XEmacs Editor

FUSE_MULE

Mule Editor

If you or your system manager need to change the default path for all users of FUSE, you can edit the following file:

/usr/opt/FUS400/bin/fuse.sh


[Contents] [Prev. Chapter] [Prev. Section] [Next Section] [Next Chapter] [Index] [Help]

13.3.3    Entering X Default Values

You can specify X default values for your Emacs windows in your .Xdefaults file using the following format:

fuse_emacs.keyword:value

Refer to the Emacs reference page for keywords and legal values.

To specify X default values for XEmacs (formerly Lucid Emacs), use the following format:

Emacs.keyword.value


[Contents] [Prev. Chapter] [Prev. Section] [Next Section] [Next Chapter] [Index] [Help]

13.3.4    Using LISP Commands

You can also use LISP commands to direct actions in other FUSE tools as follows:

Table Table 13-5 summarizes the LISP commands and their key bindings. See Section Section 13.5 for more information about using other FUSE tools with Emacs.

Table 13-5:  LISP Commands Supported in Emacs

Key Binding LISP Command Description

C-c C-b

mserver-debug-binary

Configure to an executable binary.

C-c C-r

mserver-send-remove-break

Remove breakpoint at the current line. (Note: You must first enter mserver-debug-binary before using this command.)

C-c C-a

mserver-send-add-break

Add a breakpoint at the current line. (Note: You must first enter mserver-debug-binary before using this command.)

C-c C-q

mserver-show-references

Invoke the Cross-Referencer and show references to the current symbol.

C-c C-d

mserver-goto-declaration

Go to the declaration of the current symbol or list declarations in the Cross-Referencer (if more than one).

C-c C-g

mserver-show-call-graph

Invoke the Call Graph Browser and show the node of the current function.

C-c C-c

mserver-show-class

Invoke the C++ Class Browser and show the class information for the current class.

C-c C-m

mserver-man-page

Invoke the Man Page Browser and show the reference page for the current system call.

C-C C-f

mserver-send-build-file

Start a build and track build errors.

C-c C-k

mserver-emacs-help

Display information about FUSE Emacs commands in the HyperHelp Viewer.

C-c C-u

mserver-find-function

Find an equivalent function on a different platform and place the cursor on the function.

C-c C-l

mserver-send-build-default

Build the default target in the working directory.

C-c C-z

mserver-search-libraries

Invoke the Search Libraries dialog box to identify shared/archived libraries that contain a specific function on which you place the cursor.

None

mserver-checkin-file

Invoke the Code Manager to check in the current file.

None

mserver-checkout-file

Invoke the Code Manager to check out the current file.

None

mserver-insert-file

Invoke the Code Manager to insert the current file into the library for the first time.

None

mserver-cancel-lock

Invoke the Code Manager to cancel the lock on the current file.

None

mserver-lock-file

Invoke the Code Manager to lock the current file.


[Contents] [Prev. Chapter] [Prev. Section] [Next Section] [Next Chapter] [Index] [Help]

13.4    vi Editor

The vi Editor in FUSE is the standard UNIX vi Editor and has all the vi editing capabilities.

The following restrictions apply to the vi Editor:


[Contents] [Prev. Chapter] [Prev. Section] [Next Section] [Next Chapter] [Index] [Help]

13.5    Using the Editors with Other Tools

The editors are tightly integrated with most FUSE tools. The FUSE Editor and the Emacs editors display annotations to visually identify debugging events and requests from other tools to show source code. In the case of the FUSE Editor, annotations appear as colored icons next to lines of source code in the annotation area. Table Table 13-6 describes the annotations that appear in the FUSE Editor and what each represents.

When an Emacs editor is running in a project with other FUSE tools, it responds to actions taken by other FUSE tools by annotating the appropriate line. Only the last annotation to be set is displayed. In the case of XEmacs, the annotation generally takes the form of an arrow icon in the annotation area. In the case of GNU Emacs, the line itself is highlighted. (For information on how to customize the highlighting, see the online Help topic Customizing Highlighting Style in Emacs.)

Table 13-6:  FUSE Editor Annotations

Annotation Description

Colored square

Marks the source code associated with the currently highlighted error in the Builder transcript area.

Colored square

Marks the source code associated with an item you have clicked on in either the graph or transcript area in the Call Graph Browser or C++ Class Browser.

Colored square

Marks the source code associated with a run-time statistic that you have clicked on in the Profiler run-time statistics graph.

Colored square

Marks a line that contains a matching literal or expression from a search operation in the Search tool.

Colored square

Marks the source code associated with a query result that you have clicked on in the Cross-Referencer transcript area.

Letter "i" in a circle

Marks the source code associated with a compilation informational message that you have clicked on in the Builder transcript area.

Exclamation mark in a colored triangle

Marks the source code associated with a compilation warning message that you have clicked on in the Builder transcript area.

Exclamation mark in a colored triangle

Marks the source code associated with a compilation error that you have clicked on in the Builder transcript area.

Hexagon

Marks a breakpoint that you set in the Editor.

Boxed <

Marks a difference line that Compare identified in the file on the left side of the Compare main window.

Boxed >

Marks a difference line that Compare identified in the file on the right side of the Compare main window.

Colored square

Marks the source code associated with an item you have clicked on in the Program Visualizer graph.

Colored square

Marks the source code associated with a memory leak or memory error that you have clicked on in the Heap Analyzer memory analysis graph.

>>

Indicates that another tool has requested a display of source code.

=>

Indicates the Debugger's focus point (when the Debugger and Emacs are configured to the same target).

*>

Indicates a breakpoint in the Debugger (when the Debugger and Emacs are configured to the same target).

The following sections provide instructions for using the editors with other tools. Unless otherwise stated, these instructions apply to the FUSE Editor, the Emacs editors, and vi.


[Contents] [Prev. Chapter] [Prev. Section] [Next Section] [Next Chapter] [Index] [Help]

13.5.1    Setting and Removing Breakpoints

You can use the annotation area in the FUSE Editor or Emacs to set a breakpoint for the Debugger. You can also remove breakpoints using these two editors. The Debugger and editor must be running in the same project and have the same executable target.

To set a breakpoint, position the pointer in the annotation area next to the line where you want the breakpoint and press MB1. The FUSE Editor annotates the breakpoint next to appropriate line using a hexagon icon in the annotation area. XEmacs uses an arrow icon and GNU Emacs highlights the line.

To remove a breakpoint, click on the icon in the annotation area.


[Contents] [Prev. Chapter] [Prev. Section] [Next Section] [Next Chapter] [Index] [Help]

13.5.2    Code Management Actions

You can initiate several Code Manager actions directly from the FUSE Editor and Emacs. For example, to check out a file and automatically load it into the editor, choose Utilities: Check Out... in the FUSE Editor or XEmacs and turn on the Invoke Editor check box. In GNU Emacs, choose the FUSE: Check Out... menu option. Other Code Manager actions are available on the Utilities or FUSE menu and operate in a similar way to checkout.


[Contents] [Prev. Chapter] [Prev. Section] [Next Section] [Next Chapter] [Index] [Help]

13.5.3    Displaying Code for Compared Files

After comparing two files using Compare, you can display either file in the FUSE Editor by double clicking on a difference line in the Compare window. If you want to see the difference lines annotated, use the Edit: Annotate Left and Edit: Annotate Right menu items.


[Contents] [Prev. Chapter] [Prev. Section] [Next Section] [Next Chapter] [Index] [Help]

13.5.4    Editing the Current Makefile

To bring the current makefile into the editor, choose Makefile: Edit Makefile... from the Builder or Modify Makefile from the Project Manager dialog box.


[Contents] [Prev. Chapter] [Prev. Section] [Next Section] [Next Chapter] [Index] [Help]

13.5.5    Viewing Code Associated with a Makefile or Build Error

To view code associated with a file reference in a makefile, double click on a node or click on the previously selected node in the build graph that represents the source file.

To view code associated with a build error, click on a Diagnostics button in the Builder or an error in the Builder transcript area.

In the following figure, the Builder shows an error message and the FUSE Editor shows the annotated source code associated with the error.


[Contents] [Prev. Chapter] [Prev. Section] [Next Section] [Next Chapter] [Index] [Help]

13.5.6    Viewing Code Associated with a Call Graph

To view source code associated with a file or function you are analyzing in a call graph:


[Contents] [Prev. Chapter] [Prev. Section] [Next Section] [Next Chapter] [Index] [Help]

13.5.7    Viewing Code Associated with a Class Graph

To view source code for a class, click on a previously selected node in the class graph or double click on a class in the transcript area. To view source code for a member, click on the member in the Members Information Pane and then use the MB3 pop-up menu to edit its declaration or definition.


[Contents] [Prev. Chapter] [Prev. Section] [Next Section] [Next Chapter] [Index] [Help]

13.5.8    Viewing Code Associated with a Run-Time Statistic

You can view and modify the source code associated with a run-time statistic in the Profiler by pressing MB2 on the statistic in the Profiler's display area.


[Contents] [Prev. Chapter] [Prev. Section] [Next Section] [Next Chapter] [Index] [Help]

13.5.9    Viewing the File Associated with Search Results

To view source code associated with the results of a search, double click on a file or a line in a file reported in the Search window's results display area.

When you double click on a file, the editor is positioned on the first line of the file. Otherwise, the editor is positioned on the selected line. In the FUSE Editor or Emacs, the line is annotated.


[Contents] [Prev. Chapter] [Prev. Section] [Next Section] [Next Chapter] [Index] [Help]

13.5.10    Displaying Information About Functions

When editing a file with the FUSE Editor or Emacs, you can select a function name in the editor's buffer and invoke the Call Graph Browser to display information about that function, highlighted in the call graph, with transcript information.

To invoke the Call Graph Browser from the editor:

Step Action

1

Select the name of the function you want to display by placing the cursor on the name (FUSE Editor or Emacs) or by highlighting it (FUSE Editor only).

2

In the FUSE Editor, choose the Utilities: Show Call Graph... menu option. In Emacs, press C-c C-g.

If the selected function exists and is visible in the call graph, it is highlighted and information about the function appears in the transcript area. If the selected function is not visible, then the file or directory containing its definition is highlighted in the call graph. If the Call Graph Browser is not running, FUSE invokes it.


[Contents] [Prev. Chapter] [Prev. Section] [Next Section] [Next Chapter] [Index] [Help]

13.5.11    Displaying Declarations of Programming Symbols

To invoke the Cross-Referencer from the editor to locate the declarations of a symbol:

Step Action

1

Select the name of the symbol by placing the cursor on the name (FUSE Editor or Emacs) or by highlighting it (FUSE Editor only).

2

In the FUSE Editor, choose Utilities: Go To Declaration to issue a declaration query for that symbol. In Emacs, press C-c C-d.

3

The Cross-Referencer is invoked if it is not already running.

4

If there is only one declaration for the symbol, the editor loads the associated source file positioned at the line of the declaration. If there are multiple declarations, the Cross-Referencer displays them in the query results area. To load the associated source code in the editor, double click on one of the declarations.


[Contents] [Prev. Chapter] [Prev. Section] [Next Section] [Next Chapter] [Index] [Help]

13.5.12    Displaying References to Programming Symbols

To use the Cross-Referencer from the editor for the purpose of locating references to a symbol:

Step Action

1

Select the name of the symbol by placing the cursor on the name (FUSE Editor or Emacs) or by highlighting it (FUSE Editor only).

2

In the FUSE Editor, choose Show References from the Utilities menu to issue a reference query for that symbol. In Emacs, press C-c C-q.

3

The Cross-Referencer is invoked if it is not already running.

4

The Cross-Referencer displays the references in the query results area. To load the associated source code in the editor, double click on one of the references.


[Contents] [Prev. Chapter] [Prev. Section] [Next Section] [Next Chapter] [Index] [Help]

13.5.13    Displaying a Reference Page While Editing a File

If you are using the FUSE Editor or Emacs, you can display the reference page (UNIX man page) for a selected word in the editor's buffer. This is particularly useful for reviewing the reference documentation on library routines, although you can select any word for which a reference page exists and display the text using the Man Page Browser.

To invoke the Man Page Browser from the FUSE Editor or emacs:

Step Action

1

Select a library or system call by placing the cursor on the name (FUSE Editor or Emacs) or by highlighting it (FUSE Editor only).

2

In the FUSE Editor, choose Show Man Page... from the Utilities menu. In Emacs, press C-c C-m.


[Contents] [Prev. Chapter] [Prev. Section] [Next Chapter] [Index] [Help]

13.5.14    Displaying Information About Classes

If you have the optional license for DEC FUSE Support for C++, you can display class information while editing a source file with either the FUSE Editor or Emacs. While editing a file, you can select a class name in the editor's buffer and invoke the C++ Class Browser to display information about that class and highlight it in the class graph.

To invoke the C++ Browser from the editor:

Step Action

1

Select the name of the class you want to view by placing the cursor on the name (FUSE Editor or Emacs) or by highlighting it (FUSE Editor only).

2

In the FUSE Editor, choose Show Class... from the Utilities menu. In Emacs, press C-c C-c.


[Contents] [Prev. Chapter] [Prev. Section] [Next Chapter] [Index] [Help]