Load the file syntaxedit.bet.
In the example above, the selection becomes the entire pattern.
Another example: Mark from the middle of one pattern to the middle of the next.
The tool selects both patterns.
Try marking different chunks of code and observe what is being selected. For example, try marking the following:
UnregisteredVehicle: Vehicle ...;
Person: ...
until aPerson: @person
Person.print
mark 'living at'->puttext
Person.print
mark the entire do-part
Experiment with the use of Alt+Up (overview), Alt+Left (abstract recursively), Alt+Right (detail) and Alt+Down (detail recursively).
Command | Keyboard shortcut |
cut copy paste undo redo | Ctrl+X Ctrl+C Ctrl+V Ctrl+Z Ctrl+Y |
Now we want to move the Person pattern down to aPerson: @person:
Now try undoing it all using Ctrl+Z.
Notice that the Person
pattern could have been thousands of lines of code, and it would still be very simple to move it around or copy it.
You can apply this to all sorts of other code fragments: imperatives, descriptors, do-parts, enter-parts, exit-parts, variabels, superpattern-prefixes. But it does take a little practice to be able to use it efficiently.
Mjolner Tool Workshop | © 2001-2004 Mjølner Informatics |
[Modified: Wednesday September 12th 2001 at 16:34]
|