How to open new editor, Editing commands, Searching, Go to line, Nonallowed operations Saving of files

User's Guide to the Editor

How to open new editor?

The editor can be opened either for already existing source or for new class.

The list of existing classes can be shown in the browser window and that is why the browser is the right place for opening editor on exisiting source. For more info refer to the browser documentation.

To open new class you have to open the New class dialog and create new source. The editor window with the source will be displayed.


Useful Editing Commands

Because the keys and commands has been designed to be as close as posible to existing standards it is probably not as necessary to waste our words ourn help how to move cursor and enter characters. Everything works as it should. Left arrow moves one character to the left, with the CTRL key held down one word to left. Moving with SHIFT down selects text. To manipulate with text commands in editor menu can be used. To delete selection CTRL+DEL (or Ctrl+X) and SHIFT+DEL keys can also be found useful. The first one only deletes the text but the latter one moves int to clipboard. To copy selected block to the clipboard Ctrl+C can be used. Inverse process can be activated by pressing Ctrl+V that pastes text from the clipboard to the cursor position.

Warning: Please also notice that it is not posible to share the clipboard with other programs in your system. The clipboard is private for Xelfi. It is caused by the absence of clipboard handling methods in the JDK 1.0.2.


Searching in the Editor

For searching the Find and replace dialog is used. It can be opened by command in the editor menu. As can be seen from previous picture there are several fields there. The Text to find must be filled with the searched text. Then the searching can start by pressing the Find button. The finded text is shown and marked as selected in the editor. The dialog window remains still on the screen and that is why searching for next occurence can be activated by simple clicking the Find button again.

Replacing of text is also very easy. When first occurence of Text to find has been found it is possible to press the Replace and find button. Then the text in Replace with field is substituted instead of the found one and new occurence of Text to find is found.

The dialog can be closed by click to Cancel but it need not be. Because in spite of its appearance the editing of text in the editor is unaffected.


Finding Line

It is possible to find a line in the editor window even only if its line number is known. For these purposes the Go To Line dialog can be used.
It is required to specify line number in the input line and then to press OK button to use this dialog. It can remain shown without restricting the behaviour of the editor but also can be closed by Close.

Nonallowed operations

Because we use the editor to browse text that is automaticly generated by the visual designer and we do not want to solve problems that could arrive when the user would modify this code we decided not to allow changes in the generated text. This may be seen as a strong restriction but it saves users a lot of troubles that could result in unexpected code lost.

When an insert or delete is initiated in the text that is "Xelfi generated" the operation is canceled and a warning message in the status line is shown.


Saving of files

The sources of edited classes are kept in the memory and to disk are flushed (this process is called synchronization) only at one of user requests: Warning: Closing an editor window does not caused the source to be saved. It is because it can be used by another part of the system (visual one, browseser, debbuger, etc.). That is why the file will be saved only when an explicit request listed above occures.