3.2 Browser Window

The browser window appears like:

Figure 1: Browser window

[22kb 735x732 GIF]

Below the code viewer/editor pane there are two info panes. Location displays path of the selected fragment group in the group list pane - or in the project list pane, if nothing is selected in the group list pane.

Info displays information, such as "no fragments in the selected project'" or what the source browser currently is doing.

Browsing can be done at basically 3 levels: the project level, the group level or at the code level.

3.2.1 Menus

The following sections describe the browser window menus offered by the source browser. The other subtools supply additional menus.

3.2.2 File Menu

New...
Makes it possible to create a new fragment group with one fragment form. You can choose between the currently available grammars. A dialog pops up.
New BETA Program...
Creates a minimal BETA program. You are prompted for the name and location of the new fragment group.
New BETA Library...
Creates a minimal BETA library. You are prompted for the name and location of the new fragment group.
Open...
Opens a standard file dialog, and you can now select (a) a project-file (must have extension .pjt), (b) a directory, and (c) a .bet/.ast/.astL file. You will then in the project list pane find a project of the corresponding type A, B, or C (see Project Definitions). All other selections will be ignored.
Open Dump File...
If your program crashes, while you are not running it under the the debugger in the Mjolner Tool, the dump file can be opened and the different activation levels can be browsed. The source code browser subwindow will for each activation level highlight the statement, that was executed at dump time.
Save
If changes have been made to the fragment group, it is saved. A backup of the old text file (if existent) is taken on e.g. foo.bet~ and a new text file is generated e.g. foo.bet.
Save As...
Saves the current fragment group under a another name. You are prompted for the name and location of the new fragment group. The editor continues with the new fragment group.
Save All...
Calls Save on all open group editors.
Save Abstract...
Saves the current fragment group on textual form at the current abstraction level. You are prompted for the name and location of the text file.
Recover
Recovers to the latest auto save file (.ast# or .astL# on PC). This command is enabled if the .ast# exists and is newer than the .ast file.
Revert
Reverts any changes (since the latest save) made to the current fragment group.
Print
Print the contents of the codeviewer/editor.
Group Write Protection
If checked, it is not possible to modify the fragment group. Group write protection is set automatically if there is no write permission on the fragment group file or if the global write protection is set.
Global Write Protection
If checked the whole editor is in read-only mode.
Preferences...
A preferences window pops up.
Save settings
Enables you to save the current contents of the project list pane on a project-file $USER/.ymer.pjt. This project is then automatically loaded next time you invoke a source browser application - in this way you can save your configuration. It also saves/creates another file, $USER/.ymer.rc containing information on the locations of the BETA compiler, and other tools in the Tools menu (only in the stand-alone source browser application Ymer).
Reset settings
Enables you to clear the project list pane and reset it to the last settings (or the default settings, if no $USER/.ymer.[pjt|rc] files are found.
Quit
Closes all browser windows, and terminates the application or . In both Close and Quit source browser applications will examine if any files have been changed, and prompt for whether these files should be saved before closing/quitting.

3.2.3 View Menu

One important quality of Sif is the possibility to present documents at different abstraction levels. Abstract presentation gives a good overview over a document by suppressing irrelevant details. Abstract presentation is provided by means of contractions. A contraction is a special presentation of an sub-AST, where only the root is presented. See also Abstract Presentation in Source Browser Tutorial. If the construct has an associated comment, the comment marker is included in the contraction. Browsing in the document can be done by detailing, i.e. opening the contractions selectively. This is done either by the command Detail or by double-clicking. Abstract presentation can be used to produce documentation such as a interface specifications by saving the document on textual form at different abstraction levels, using the Save Abstract... command.

Abstract
Contracts the current selection, i.e. presents the current selection as a contraction instead of the full "text".
Abstract Recursively
Traverses the current selection recursively and contracts those constructs that have a certain syntactic category. This command has only effect if abstraction levels have been specified in the grammar for the particular language. The grammar may specify a list of syntactic categories that automatically shall be contracted. For BETA the syntactic categories are Descriptor, Attributes, and Imperatives, when opening the files in the viewer/editor. For more information on specifying abstraction levels see [MIA 91-14].
Overview
Like Abstract Recursively but the current selection is reestablished after the Abstract Recursively command, i.e. the path from the root to the current selection is detailed. This command is useful if you want to see the context of the current selection.
Detail
If the current selection is a contraction, this operation opens the contraction, i.e. presents the next level of text. A contraction can also be opened by double-clicking on it. If the current selection is not a contraction any visible contraction in the current selection will be opened.
Detail Recursively
Recursively details the contractions in the current selection.
Follow Semantic Link
During the checking phase a number of semantic links are inserted in the AST. These links are available to the user. Using this command on a name application the semantic link will be followed and the current selection is changed to the appropriate node in the current or another fragment form. Double-click can also be used to activate this command.
Follow Link to Fragment
Given a SLOT definition, a binding of the definition (i.e. a fragment form with the same name and type) can be searched for. This is done by selecting the SLOT definition and using this command. The editor will now search for a fragment form with the same name in the BODY and MDBODY hierarchy of the group that this fragment is part of. Notice that the binding of Attributes SLOTs may only be found in this way if they are bound in the BODY and MDBODY hierarchy. A shortcut or double-click can also be used to activate this command.
Follow Link to SLOT
The editor searches after a SLOT definition with the same name as the current fragment form along the ORIGIN chain until it finds it or reaches the top, i.e. betaenv.
Zoom In
Changes the contents of the code viewer to the current selection, i.e. the root of the AST shown in the editor (the editor root) is changed to the sub-AST, that corresponds to the current selection.
Zoom Out
Extends the contents of the code viewer to show one level more of the structure, i.e. the editor root is changed to its father.
Zoom To Full Editor
Extends the contents of the code viewer to show the whole fragment form, i.e.
the editor root is set to the whole AST of the fragment form.
Reprettyprint
Rebuilds the textual presentation of the AST and reestablishes the current selection. This command can be used if the contents of the code viewer need to be refreshed.
Format...
Only Win 95/NT. The font in the current code editor can be changed using this command.
Adaptive prettyprinting
Adaptive prettyprinting can be turned on an off. Default is off.
Show AST Dump
This command is useful for users of the metaprogramming system. It prints in the console window a dump of the sub-AST that corresponds to the current selection

3.2.4 Following links to other fragment forms

If the destination fragment form is different from the source fragment form the destination fragment form is shown in the same code viewer or in a separate code viewer, depending on the code viewer of the source fragment form. If the code viewer of the source fragment form is

3.2.5 Navigation and Edit Pop-up Menu

When using the Pop-up Menu Button on an a construct that is not a nonterminal a popup menu, containing some of the most commonly used commands, is opened.

Back
Shortcut to History:Back
Forward
Shortcut to History:Forward
Follow -> Semantic Link
Shortcut to View:Follow Semantic Link
Follow -> Semantic Link (Separate Window)
Shortcut to View:Follow Semantic Link. The destination node is opened in a separate window.
Follow -> Link To Fragment
Shortcut to View:Follow Link to Fragment
Follow -> Link To Fragment (Separate Window)
Shortcut to View:Follow Link to Fragment. The destination node is opened in a separate window.
Follow -> Link to SLOT
Shortcut to View:Follow Link to SLOT
Follow -> Link to SLOT (Separate Window)
Shortcut to View:Follow Link to SLOT. The destination node is opened in a separate window.
Open Separate Editor
Shortcut to View:Open Separate Editor
Open Subeditor
Shortcut to View:Open Subeditor
Show UML Diagram
Shortcut to Toolbar:Show UML Class Diagram
Open GUI Editor
Shortcut to Toolbar:Open GUI Editor
Edit -> Cut
Shortcut to Edit:Cut
Edit -> Copy
Shortcut to Edit:Copy
Edit -> Paste
Shortcut to Edit:Paste
Edit -> Paste Before
Shortcut to Edit:Paste Before
Edit -> Paste After
Shortcut to Edit:Paste After
Edit -> Insert Before
Shortcut to Edit:Insert Before
Edit -> Insert After
Shortcut to Edit:Insert After
Reprettyprint
Shortcut to View:Reprettyprint

3.2.6 History menu

Back and Forward moves you along the path you have previously browsed.

Furthermore, this menu contains one entry for each fragment form, you have displayed in the code viewer. This is used for speedy access to previously visited fragment forms.

3.2.7 Windows menu

Open Workspace
Opens a workspace window (see later more on this).
Open Separate Browser
Opens a new browser window, identical to this one. This window is controlled by the same source browser application instance. Makes it possible to browse two different "places" at once.
Open Separate Code Viewer
Opens a separate window just like the code viewer, displaying the currently selected fragment form in the group viewer.
Open Semantic Errors Viewer
Will open a semantic errors viewer on the selected group, if there are any semantic errors in that group. See later for more information on the semantic errors editor.
Open Semantic Errors Editor
Will open a semantic errors editor on the selected group, if there are any semantic errors in that group. See later for more information on the semantic errors editor.

The rest of the menu contains one entry for each window opened by the source browser. Selecting one of these items will bring the window to the fron

3.2.8 Double-click

In the code viewer, double-click can also used for browsing. Double-clicking on the current selection will perform different actions. If the current selection is

3.2.9 Shift-double-click

Shift-double-click is used for browsing like double-click, except that separate windows are opened.

In the code viewer, shift double-click will do the same as double-click (except that the "result" will be presented in a separate window. Shift double-click will open different kind of separate windows depending on the current selection. If the current selection is:

3.2.10 Information in the Info Pane

Besides the already mentioned information in the Info area, you will occasionally see status information to the right of the pane. This status information is shown as small boxes containing state information. There are three types of state information presently:


[1] The contents of the group viewer/editor can of course also be considered as part of the BETA code, but this is actually "code" written in the fragment lanuage


Mjolner Integrated Development Tool - Reference Manual
© 1991-2004 Mjølner Informatics
[Modified: Monday March 11th 2002 at 16:16]