6.5.6 Code Completion

Code completion means the editor will try to guess the text as it is being typed. It does this by checking what text is typed, and as soon as the typed text can be used to identify a keyword in a list of keywords, the keyword will be presented in a small colored box under the typed text. Pressing the Enter key will complete the word in the text.

There is no code completion yet for lling in function arguments, choosing object methods as in e.g. Delphi.

Code completion can be customized in the Code completion dialog, reachable through the menu option "Options|Preferences|Codecompletion". The list of keywords that can be completed can be maintained here. The code completion dialog is shown in gure (6.5).



Figure 6.5: The code completion dialog.

PIC


The dialog shows the currently dened keywords that will be completed in alphabetical order. The following buttons are available:

Ok
Saves all changes and closes the dialog.
Edit
Pops up a dialog that allows to edit the currently highlighted keyword.
New
Pops up a dialog that allows to enter a new keyword which will be added to the list.
Delete
Deletes the currently highlighted keyword from the list
Cancel
Discards all changes and closes the dialog.

All keywords are saved and are available the next time the IDE is started. Duplicate names are not allowed. If an attempt is made to add a duplicate name to the list, an error will follow.