The Source Code Viewer

Return to Introduction  Previous page  Next page

The Source Code viewer can be used to view any source code you are opening. If a class is selected, it shows the source code for that class, provided it has already been generated. For C++ a second tab displays to show the implementation file.

A number of options change the way the Source Code viewer works.  They can be altered via the Options dialog (select the Tools | Options | Source Code Engineering | Code Editors menu option).

By default the Source Code viewer is set to:

·Parse all opened files, and show a tree of the results.
·Show line numbers
·Have outlining enabled.

File Parsing

The Source Code viewer parses files for a number of reasons.  The first is to enable it to jump to the location in the file at which the currently selected item is found.

Additionally, parsing displays a structure tree showing an overview of the file in a similar fashion to the main Project Browser window.  You can also select anything in that and jump to the appropriate line in the editor.

SourceCodeViewer

The Source Code Viewer Menu Buttons

The menu buttons in the Source Code viewer enable you to edit, view and interact with the code contained in the Source Code viewer. The function of each button is described below:

SourceTool

·Open button - opens the source code from an existing file.
·Save button - saves the changes to the currently loaded source code.
·Copy button - copies the highlighted text.
·Paste button - pastes the text that is currently contained in the buffer to the source code viewer.
·Undo button - cancels the previous action.
·Generate and Reload - button generates and reloads the current object source.
·Save and Resynch button - save the source code and resynchronizes the class.
·Code Templates button - accesses the Code Templates Editor.
·Build and Run button - Provides quick access to the following commands:
·Build - run package build scripts
·Test - run package test scripts
·Run - run debug
·Package Build Scripts - Configure package build scripts.
·Set Font button - sets the font  for the text contained in the Source Code viewer.

See Also