The code editor provides structure editing on each fragment
form. Many of the following menu items have keyboard shortcuts
associated with them. A complete list of these can be found in the
appendix.
- Initiating this command will undo the latest performed editing operation in the code editor. All editing operations performed in a session can
be undone.
- Initiating this command will redo the latest performed editing operation in the code editor. All undone editing operations performed in a session can
be redone until a new editing operation is performed.
- The current selection is removed from the fragment form. If the current selection may be deleted (e.g. a statement or a declaration) it will disappear. If the current selection may not be deleted (e.g. the expression part of an if-statement) a nonterminal of appropriate syntactic category will be inserted instead of the current selection. The deleted fragment part will be put onto a clipboard and can later be pasted into the same or another fragment form.
- The current selection is copied onto the clipboard, and can later be pasted into the same or another fragment.
- Whenever the current selection and the structure on the clipboard are of exchangeable syntactic categories, Paste is enabled. Paste will replace the current selection with the structure currently on the clipboard. The content of the clipboard will not be changed.
- Like Paste, but preceeded by an Insert Before operation.
- Like Paste, but preceeded by an Insert After operation.
- Same as Cut but nothing is put on the clipboard.
- Selects all the code in the window in structure editing mode and the all the code in the textediting area in text editing mode.
- This command enters text editing mode on the current selection. See also Text editing in Editor tutorial.
- Please note that text editing is only fully available if a parser for the supported language has been generated. If a parser is not available only lexems can be edited textually, i.e. name declarations, name applications, strings and constants. In that case, there is no check that the lexems are legal.
- Like Textedit but here an external texteditor is used. This facility is only available in Unix versions. The environment variable EDITOR is recognized by Sif. When this command is invoked the current selection is inserted in the external editor. When the external editing has finished, by saving the results, the resulting text is inserted instead of the current selection. Parse errors are detected in the same way as in the internal texteditor.
- E.g. emacs can be used by setting EDITOR to /usr/local/bin/emacsclient and starting emacs as a server in the following way: emacs -f server-start.
- Exits text editing mode and parses the edited text according to the syntactic category of the current selection before entering text editing mode. See also Text editing in Editor tutorial.
- Exits text editing mode and reestablishes the situation before text editing was entered. Alternatively the <esc> key can be used.
- Whenever the current selection is one or more list elements, these entries will enable you to insert a nonterminal of same syntactic category as the list elements either before or after the current selection, respectively. If the list elements are on separate lines before/after means above/below, respectively. If the list elements are on the same line before/after means left/right respectively. An alternative to Insert After is the <cr> key.
- Removes all nonterminals representing optional productions from the current selection.
- Inserts all nonterminals representing optional productions in the current selection.
- Makes it possible to search for a substring of a lexem, i.e. a name definition, a name application or a string in
- the current fragment form
- the current fragment form of the source browser, i.e. the fragment form currently presented in the codeviewer of the source browser
- the current fragment group of the source browser
- the current project in the source browser e.g. also in the domain and extent of the current fragment group
A dialog pops up. See Searching
An especiallly useful facility is the browser of search hits, that
collects all the search hits for easy overview and access.
If the current selection is a name declaration, when the this command is activated, all applications of this name will be searched for in the selected scope.
Using this facility, it is possible to search for applications of a name
in the entire dependency graph.
- Extends the search dialog with a replace text field.
- A subeditor on the current selection is opened, i.e. a code editor where the current selection is the root. Shift-double-click can also be used.
- If checked it is not possible to modify the fragment form. Is automatically set if group write protection or global write protection is set.
-
Structure editing on parts of the document that contain contractions is done exactly as described above. You can for example cut, copy and paste constructs that contain contractions. When text editing constructs that contain contractions, some parser technical information is included in the contractions before the text editor is activated. This information is necessary to avoid loosing contractions during text editing. A contraction in text editing mode looks like:
<<@4711: Descriptor>>
where @4711 is an internal address of the sub-AST that is contracted, i.e. not presented, and Descriptor is the syntactic category of the contracted sub-AST.
Do not modify the contents of contractions during text editing. Likevise if the contraction contents is commented out during text editing, the corresponding code will be lost.
This menu is a pop-up menu, that is activated by the Pop-up Menu Button on the mouse (See basic user interface principles).
The content of the Expand menu is dependent on the current selection. If the current selection is a nonterminal, the Expand menu will contain an entry for each language construct that can replace this nonterminal. If the current selection is an optional or list nonterminal, the Expand menu will contain an empty entry as well. This entry enables you to remove that nonterminal.
This menu is only present in the menu bar if the current fragment group is a BETA fragment group. The menu makes use of the fragment clipboard that is used as an intermediate store for fragment forms that are 'moved around' between fragment groups. The fragment clipboard is also used in the Fragment menu.
- Substitutes the current selection with a SLOT definition and the removed part of the document is inserted in an DoPart fragment form, that is stored in the fragment clipboard. The name of the SLOT is prompted for. The default name is the name of the enclosing pattern.
- Substitutes the current selection with a SLOT definition and the removed part of the document is inserted in an Descriptor fragment form, that is stored in the fragment clipboard. The name of the SLOT is prompted for. The default name is the name of the enclosing pattern.
- Substitutes the current selection with a SLOT definition and the removed part of the document is inserted in an Attributes fragment form, that is stored in the fragment clipboard. The name of the SLOT is prompted for. The default name is the name of the enclosing pattern.
- In a standard file dialog an implementation file can be created. It will be created as a body file to the current fragment group selected in the browser. The ORIGIN and BODY properties are automatically inserted in the respective files.
- Like Create Implementation File, but an existing file is chosen in
the dialog.
- The current fragment group selected in the browser is set to be the implementation file. If this file is set the Make SLOT commands and the Hide Implementation... command will automatically paste the created fragment forms that correspond to the SLOTs into the implementation file.
- The file set in Set Current as Implementation File is unset.
- When one of the Make SLOT commands or the Hide Implementation... command is used the default name in the dialog for the SLOT name will be the text set by this command, followed by the name of the enclosing pattern (if any).
- Clears the text set in Set SLOT Name Prefix...
- For each DoPart in the current selection in the code editor the user is asked whether it should be hidden into the implementation file by making it into a SLOT and moving the DoPart into a fragment form in the implementation file.
Mjolner Integrated Development Tool - Reference Manual |
© 1991-2004 Mjølner Informatics |
[Modified: Monday March 11th 2002 at 16:16]
|