Go to Glossary Search VisualAge C++ Help Go to VisualAge C++ Help Home Page Go to WWW VisualAge C++ Site

Source View

The Source view consists a working area with a number of optional elements:

These Editor elements can be altered so as not to display by accessing the View Settings - View Source.

When a Source view receives focus, the dynamic menu on the menu bar becomes the Source view menu. The Source view menu contains Editor actions such as cut and paste. You use the Editor to create, edit, or browse text files (and source code). The Editor can be customized through the use of commands, macros and parsers.

With the Editor, you can work with source files as follows:

Menu selections available when the Source view receives focus are listed below, along with a brief description of actions.

Find (live) allows you to find a specific item of text in your file.
Undo a set of changes made to the current file. This menu choice is available only when one or more sets of undoable changes exists. If several sets of changes have been done to the file, the Undo choice will undo those changes one at a time, starting with the most recent set of changes.
Redo a previously-undone set of changes to the current file. This menu choice is available only when one or more sets of redoable changes exists. If several sets of changes to a file have been undone, the Redo choice will redo those changes one at a time, starting with the most recent set of changes undone.
Cut will delete selected text from the Editor and copy it to the clipboard. You can then move this text elsewhere in the file by using the Edit->Paste operation.
Note: You cannot copy rectangular blocks to the clipboard - only character and line blocks.
Copy selected text in the file view to the clipboard. The copied text is left selected and unchanged. You can then place a copy of this text elsewhere in the file.
Paste will insert the text currently in the clipboard at the current cursor position in the Editor. Notes:
  1. You cannot use this choice when there is no text in the clipboard.
  2. If you paste text into a file that has a record length shorter than that of the text in the clipboard, the text may be truncated when you save the file back to its host. You will be warned that the file's record length has been exceeded in such a case.
Keystroke recorder records keystroke input to the RECORD.LX macro file. This file is found in the directory pointed to by the TMPDIR environment variable. Menu operations for the recorder are:
  • Start turns the recorder on, creating a new RECORD.LX macro file in which to store keystrokes.
  • Halt turns the recorder off.
  • Playback plays the recorded macro back into the Editor.
  • Continue Recording turns the recorder on again, appending recorded keystrokes at the end of the existing RECORD.LX macro file.
  • Load Recorder Macro File loads the RECORD.LX file into the Editor for editing.
Print opens a dialog box allowing you to print all or a part of the file you are editing. The Print dialog box lets you specify:
  • how many copies to print
  • which areas of text to print
  • if line numbers are required
  • if character emphasis used by the parser is printed
  • which printer to use
  • which printer fonts to use
Source Filter displays a cascading menu in which you can select one of the following menu selections:
  • Include All displays all lines of the file in the Source view.
  • Include will filter the contents of the Source view so it displays only those lines containing a specified string or pattern (character) match.
  • Outline Logic displays a logic outline of the code. This consists of all function definition headers.
  • Functions displays all function definition headers.
  • File Source displays the whole file.
  • Object Source allows you to display just the source associated with the current object.
Find displays a cascading menu in which you can select one of the following menu selections:
  • Find and Replace allows you to find a specific item of text in your file. The Editor - find and replace dialog box appears where you can specify find options including, if you want, new text to replace the found text.
  • Find Next will find the next occurrence (after the current cursor position) of a search item previously defined in the Editor - find and replace dialog box.
  • Find Previous will find the previous occurrence (before the current cursor position) of a search item previously defined in the Editor - find and replace dialog box.
  • Find Selection will find the character string currently selected in the Editor dialog box. This character string becomes the new search string in the Editor - find and replace dialog box.
    Note: If you select more than one line, the editor uses only the text from the first line.
Goto displays a cascading menu in which you can locate errors, line or sequence numbers, or text.
  • Line opens the Locate - Line dialog box, in which you can specify the line or sequence number at which you want to position the cursor. Date - selecting this choice opens the Locate - Date dialog box, in which you can specify the date you wish to locate.
  • Start of Block moves the cursor to the first character of a marked block.
  • End of Block moves the cursor to the last character of a marked block.
  • Previous Location locates the last cursor position where text was entered.
  • Quick Mark moves the cursor to the place in the text where you set a quick mark.
  • Mark lets you find a place in the text where you named a mark. The Locate - Mark dialog box appears listing all marks you set in the text, allowing you to select a specific mark. Previous error finds the previous error in the current file, and displays its error message in the error list window. (If you excluded error messages in the error list, their corresponding errors are ignored if you select this choice. However, if you hid any messages, their corresponding errors are located by this choice.) Next error finds the next error in the current file, and displays its error message in the error list window. (If you excluded error messages in the error list, their corresponding errors are ignored if you select this choice. However, if you hid any messages, their corresponding errors are located by this choice.)
  • Panes Input Object moves the cursor to the first character of a marked object.
Set quick mark to place a quick mark at the current cursor position. You can later use the quick mark to return to the current cursor position when you select Quick mark choice from the Edit->Locate cascaded menu. Since you can use one quick mark at a time, any previous quick mark you set is lost if you select this choice. Quick marks are not saved with files.
Name a mark at the current cursor position. The Name a mark dialog box appears, into which you can enter a name for the new mark. You can later use the mark name to return to the marked cursor position. Select Mark from the Edit->Locate cascaded menu, and select the name of the mark from the Locate - mark dialog box that appears. Marks are not saved with files.
Block marks and works with blocks of text. A cascaded menu appears, with the following block operation choices:
  • Mark line will marks the line the cursor is on, or if a line is already marked extends the selection from the marked line to the current line.
  • Mark character will mark all text in the file from where you first select this choice, to where you select it a second time.
  • Mark rectangle will mark all text in a rectangle from where you first select this choice, to where you select it a second time. Note: this choice is not available if the View->Wrap menu choice has been selected.
  • Unmark clears any currently marked block.
  • Copy will copy the marked text to the cursor position, without erasing it from its original place. (To copy a block, mark it in a file view and move the text cursor to where you want to put it before selecting this choice.)
  • Overlay copies the marked text to the cursor position, overlaying the new text over the original text rather than inserting it.
  • Move the currently marked block to the current cursor position, thereby erasing it from where it was before. (To move a block, mark it in a file view and move the text cursor to where you want to put it before selecting this choice.)
  • Delete the currently marked block from the current file. Any remaining text moves up to fill the gap created.
  • Upper case converts all characters in the currently marked block to upper case.
  • Lower case converts all characters in the currently marked block to lower case.
Set Breakpoint allows you to toggle a breakpoint on or off for a line. You can also set a breakpoint by double-clicking on the annotations column for that line. By clicking on mouse button 2, a Breakpoints List pop-up menu is opened, allowing you to set or delete the breakpoint from there.

Note: If you are unable to set a breakpoint, it is because the inserted lines are not "known" yet to the codestore. Build your project to add the new source code to the codestore, and the annotation markers will be added for the new text. You cannot set breakpoints, query items or anything else but edit on these lines until you rebuild (refresh the Editor).

Hide Breakpoints allows you to remove a line breakpoint, double-click in a red annotations column of the source view window. The color changes back to green, indicating that the breakpoint has been deleted. If the annotations column turns gray instead, double-click again to make sure the breakpoint is deleted.
Note: If you delete a breakpoint, you must recreate it if you want to use it again. If you plan to use a breakpoint again later, it is better to disable the breakpoint instead.
Show Breakpoints displays a list of current breakpoints.
Open displays a list of existing files that you can load into the Editor. The Editor will not open a file for editing if that file is already open in the Editor. Instead, the Editor brings an existing view of that file forward to become the current view.
Reload File refreshes the Source view, updating current changes.
Save will save the current file, including any changes you have made to it. The file remains displayed in the file view.
Get lets you select a file for insertion into the current file in the Editor. The file is inserted at the beginning of the line below the current insertion point.
Note: The Get operation will not load any new profiles with the file being inserted. Profiles, already loaded, remain in effect and are applied to the file being inserted.
View Settings displays the View Settings view, including the sample view, allowing you to change the functioning of the Editor.

If you want help on another aspect of the IDE interface, more IDE interface help is available.



Customize the Editor Using the Keyboard