Manipulation of the fragment group structure is done in the group editor. It is possible to insert or delete fragment forms, modify the names of the fragment forms, or edit the properties of the fragment group e.g. the ORIGIN, INCLUDE and BODY properties. Editing of properties is done using a property editor that is a structure editor on the properties. This editor is activated by means of the 'Fragments:Edit ORIGIN, INCLUDEs etc...' command.
The fragment system provides facilities for splitting a BETA program into several parts in order to support separation of interface and implementation, variant configuration or separate compilation. The code editor supports this kind of fragmenting.
If, for example, a fragment form is going to be divided into an interface part and an implementation part the, SLOTs menu is very useful. Consider the small program hello:
Let say we want to create a BODY file called 'hellobody' that contains the DoPart of the hello pattern. First we create the BODY file using the 'SLOTs:Create Implementation File...'.
Notice that this new file has ORIGIN in hello. If we double-click on this ORIGIN, we return to the hello file, and we see that the property: 'BODY hellobody' has been inserted.
Now we are ready to hide the implementation of the hello pattern. This is done by means of the 'SLOTs:Hide Implementation...' command. For each DoPart in the selection you are asked whether to create a DoPart SLOT and move it to the BODY file.
We accept and the result is:
There are alternative ways to fragmentize BETA programs in mjolner.
Mjolner Integrated Development Tool - Tutorial | © 1991-2002 Mjølner Informatics |
[Modified: Tuesday September 4th 2001 at 0:07]
|