When a fragment is shown in the code viewer, i.abstract presentation; is used. Instead of showing the program in full detail, 3 dots (...) are shown for certain syntactic categories. In the presentation of BETA programs these syntactic categories are Descriptor, Attributes and Imperatives.
These 3 dots are called a contraction. By clicking the Definition command of the toolbar (or double-clicking) when a contraction is selected the next level of detail is shown. E.g. when double-clicking on the 3 dots belonging to insertSubset in Fig. 4, the result will be:
Abstract presentation can be used to browse around in the program or to produce documentation. By means of the commands in the View menu or by double-clicking an appropriate abstraction level can be chosen. This presentation can then be written on a text file by means of the Save Abstract... command in the Group menu.
This facility is only relevant for BETA programs. If the program has been checked it is possible to browse around in the semantic structure of the program. If, for example, a name application is selected in the code viewer, the corresponding name definition can be found by clicking the Definition command of the toolbar (or double-clicking).
If the definition is in another fragment, a code viewer is opened on that fragment. Fig. 7 is the result of double-clicking on 'set' in the first line of the code viewer in Fig. 6.
If the program has not been checked, no semantic links are available. Or if the program has been modified, the semantic links may become inconsistent and the program then has to be re-checked. If this command is used and the program needs to be re-checked and a dialog box, that offers re-checking, is popped up.
In order to compress information in the windows, comments are not shown in the code viewer window, but instead a so-called comment mark (*) is shown. By clicking the Definition command of the toolbar (or double-clicking) on such a comment mark, the comment mark is expanded and the whole comment is shown. Fig. 8 is the result of double-clicking on the comment mark after multiSet in Fig. 7:
Likewise the expanded comment can be collapsed to a comment mark again by double-clicking on it.
Follow link to fragment form
Given a SLOT definition, the link to the binding of the definition (i.e. a fragment form with the same name and type) can be followed.
This is done by selecting the SLOT definition in a code viewer and clicking the Definition command of the toolbar (or double-clicking). The editor will now search for a fragment form with the same name in the BODY and MDBODY hierarchy of the group that the current fragment is part of. Doing this in the example above will result in the fragment shown in Fig. 11. If Shift-double-click is used a separate code viewer window is shown.
Notice that during an editing session the fragment form may not be found since the program may be incomplete. Another restriction is that binding of Attributes SLOTs only can be found in this way if they are bound in the BODY and MDBODY hierarchy. If not, there is no automatic way of finding the bindings.
Follow link to SLOT definition
Given a fragment form, the link (possibly dangling) to the SLOT definition with the same name can be followed. This can be done by selecting a fragment form and using To SLOT command in the toolbar. The editor searches after a SLOT definition along the ORIGIN chain until it finds it or reaches the top, i.e. betaenv.
By means of the Find command in the Edit menu it is possible to search for a substring of a lexem, i.e. a name definition, a name application or a string in a codeviewer.
It is also possible to search in
An especiallly useful facility is the browser of search hits, that collects all the search hits for easy overview and access.
In the following two examples of advanced search will be demonstrated. First we will search for a text in a fragment group and then we will search for a all applications of a certain name.
An example of searching in a fragment group will now be shown. We want to find all occurrences of the text 'put' in 'basiclib/betaenv'. First we open 'basiclib/betaenv' in mjolner. When using the Find command the search window pops up:
If we enter 'put' and click on the 'Browse hits' button the current fragment group i.e. 'betaenv' will be searched for occurrences of the text 'put'. I.e. all lexems (name declarations, name applications and strings) will be searched. The search hits are then presented in the search hit browser:
This search hit browser can be used to select some of the search hits. The Return key can be used to browse quickly through the search hits. An example of a selected search hit:
An example of searching for all applications of a certain name in a project will now be shown. If the current selection in the source browser is a name declaration or a name applicatin the Find command will provide the possibility of searching for applications of that name declaration. In this case we want to search not only in a file (fragment group) but in the whole 'containers' directory. We want to find all occurrences of the name 'element' as declared in the 'containers/container' file. If we select the 'element' declaration in 'containers/container' and activate the Find command, the Search window will appear as:
We have changed the search area to be the current project. In this case the current project is the 'containers' directory. Pressing the 'Show all hits' button the 'Search hit browser' will appear as:
An example of a selected search hit:
It is also possible to search for a text string or all applications of a name in the whole dependency graph. See Dependency Graph - Domain and Extent Projects for how to select the dependency graph for a fragment group. For a given fragment group, select the Extent of the dependency graph as project in the Project list pane and search in 'Current Project'.
Mjolner Integrated Development Tool - Tutorial | © 1991-2004 Mjølner Informatics |
[Modified: Monday March 11th 2002 at 16:16]
|