Top level menu
Clear —
creates an empty viewer.
If you LEFT-click the Clear button, the `clicked' viewer is cleared. If you MIDDLE-click the Clear button, a new empty viewer is created below the clicked one. Finally, if you RIGHT-click the Clear button, the clicked viewer is closed and a new empty viewer appears in its place.
In the viewer's caption (at the top, where the file name would normally appear), an empty viewer will display just a working directory, ending in `>'. An empty viewer produced by Clear inherits its working directory from the `clicked' viewer.
Naturally the most common thing to do with an empty viewer is to load a file. If you type a file name into an empty viewer and then hit LF, it is as if you selected the name and hit Get but no confirmation is required. CTRL-LF provides a similar function for GetImpl. You can also type a working directory name (ending in `>' or `/') and hit LF; this will simply change the working directory for the empty viewer.
Reset —
discards edits by reloading the filed version of the document.
Reset is a guarded menu command to prevent accidental loss of edits. The line through the menu item represents the guard. The first click removes the guard for a short time interval and posts a confirmation message in the window at the top of the screen. A second click while the guard has been removed executes the command.
Get
— loads the file named by the selection into a viewer.
If you LEFT-click the Get button, the file is loaded into the `clicked' viewer and replaces the previous contents. If you MIDDLE-click the Get button, a new viewer is created below the clicked one in the same viewer column. Finally, if you RIGHT-click the Get button, the clicked viewer is closed to make it iconic and a new viewer appears in its place.
If the selected name is a partial name (not beginning with `[' or `/'), Tioga interprets the name in the `clicked' viewer's working directory.
If the selected name does not include an explicit extension, Tioga will search for the file using a set of standard extensions. The default extensions are mesa, tioga, df, cm, config, and style. You can specify your own list of extensions with a user profile entry for SourceFileExtensions.
If the selected name is of the form <alpha>.<beta> and such a file exists, it is opened. Otherwise, if <beta> is one of the standard set of extensions, you will be informed that the file doesn't exist. However, if <beta> is not a standard extension, the system tries to open the file as if you had simply selected <alpha>. If this succeeds, it searches in the file for a definition of <beta> (see Def in the Places menu). This convention is intended for use with programs that have many instances of <Interface>.<Item> in which <Interface>.mesa is a file containing a definition for <Item>.
GetImpl —
like Get
but loads the file that implements the selected interface name.
If the selected name does not include an explicit extension (i.e., there is no period in the selected text), Tioga will use a set of standard implementation extensions. Currently, mesa is the only default implementation extension. You can specify your own list of implementation extensions with a user profile entry for ImplFileExtensions.
If the selected name is of the form <Interface>.<Item> and an implementation for the item is currently loaded, the system will find the name of the file holding the implementation (our thanks to the Cedar runtime model for providing this information). Otherwise, the system tries to open the file as if you had selected <Interface>Impl, and, if this succeeds, searches in the file for a definition of <Item>.
PrevFile — like Get but reloads the file that was previously in this viewer.
Store —
like Save
but writes to the file named by the current selection.
Store is also a guarded menu command like Reset.
Save —
writes a new version of the file.
Tioga keeps 2 versions by default when it stores files, so you can retrieve the previous version if necessary. If the file has a keep property, then Tioga keeps that number of versions. Use the SetKeep command to change the keep property on a file.
A Comment Regarding `Unsaved' Documents
It is not uncommon to forget to save the contents of a viewer before destroying it or loading something else into it. However this is not a disaster since Tioga holds onto `unsaved' documents so you can reload them with edits preserved. The number of such documents that Tioga will remember is set by a profile entry (UnsavedDocumentsCacheSize); the default is four.
Whenever there are unsaved documents, Tioga creates a special viewer named `Unsaved Documents List' containing the names of the unsaved documents. To retrieve a document with all the unsaved edits, select the entire filename, including a version number if one, and click Open in the system menu area at the top right of the screen.
Unsaved documents are put into the cache by Destroy, Clear, Get, GetImpl, and PrevFile. They are not put in by Reset. If the cache is already full when a new entry arrives, the oldest entry is discarded. Whenever a file is needed for Get, GetImpl, or PrevFile, the cache is checked to see if an unsaved version is available. Unnamed documents are not put into the cache.
Time — inserts the current time at the caret.
Split —
creates a new viewer looking at the same document.
The selection is highlighted in one viewer only, however edits will be reflected in all viewers for the document. Note that the split viewers can be independently closed, opened, or moved on the screen, and may be displayed at different levels of detail (see the Levels menu section).
Places, Levels — show/remove these submenus.
Places
The Places menu contains commands that cause the viewer to begin displaying at a new place in the document.
For the first three of the commands (Find, Word, and Def) commands, the button used in clicking the menu item determines how the search is carried out — LEFT-click to search towards the end of the document, RIGHT-click to search towards the start of the document, or MIDDLE-click to search first towards the end and, if that fails, then from the start of the document towards the selection. If the selection is visible in the viewer, the search starts there. Otherwise, it starts from the top of the viewer.
Find —
find another instance of the selected text.
In this command and the following two, the direction of search and capitalization are determined by the mouse buttons and SHIFT keys. LEFT-clicking searches forward from the current selection point; RIGHT-clicking searches backwards; MIDDLE-clicking does a wrap-around search by first searching forward to the end of the document then searching from the beginning until the entire document has been searched. By default, the search matches capitalization. Clicking with the SHIFT key down invokes a `caseless' search in which capitalization does not matter.
Word —
find an instance of the selected text that is a `word'.
A word is defined to not have adjacent letters or digits.
Def —
find a `definition' of the selected text.
A definition is an instance of the selected text that is immediately followed by a colon and isn't immediately preceded by an alphanumeric.
Position —
scroll to and select the character position indicated by the selected number.
This is useful with compiler error messages that give locations as character counts. The command scrolls to the selected character number and then selects it — e.g., if `183' is selected, scroll to and select character number 183 in the document.
Compiler error messages give locations that exclude comment nodes. For error messages that include comment nodes, such as those from the TSetter, select the number and SHIFT-click Position to include comment nodes.
Normalize
— scroll to make the selection visible.
LEFT-click to scroll to the start of the selection, RIGHT-click to scroll to the end, or MIDDLE-click to scroll to the caret. If the document in this viewer does not contain the selection, scrolls to the start of the document.
PrevPlace
— scroll to place that was previously visible.
Go back to the place that was previously visible in this viewer discounting manual scrolling that may have taken place since.
Reselect — restore the most recent selection in this viewer and scroll to it.
Levels
These commands in the Levels menu let you control how deep the display goes in the document tree structure.
FirstLevelOnly — show only the top level nodes.
MoreLevels — show one more level than currently.
FewerLevels — show one fewer level than currently.
AllLevels — show all levels of the tree.