Class name auto complete
The EiffelStudio editor will complete class names automatically. This means, for example, when you type in the editor pane:
and then triggers the class name auto-completion, one of two things will happen:
- If there is only one accessible class name that begins `
LI', then that class name will be automatically placed in the editor pane at the cursor.
- If there is more than one such class name, the editor will propose a list of possible valid class names, as seen in Figure 1.
Class name auto-completion can be triggered by pressing
Ctrl+Shift+Space or by following the edit menu path:
Edit --> Advanced --> Complete Class Name
Class name auto-completion is most commonly used in the Editor Pane. But the same functionality is also available in other areas of EiffelStudio, for example:
- The "Entry:" text box on the New Class tool.
- Expressions in the editable grid of the Watch tool
- "Class name:" in the New Expression dialog of the Watch tool.
- "Edit Contract" in the Contract tool
- "Add New Contract" in the Contract tool
The class auto-completion window
Using the example above, when auto-completion is triggered, the class auto-completion window will pop up and display the list of class names which begin with the string "
LI". So, you can think of the auto-completion as a search for class names using the characters you type followed by a wild card character, the asterisk ('*'). Of course, you don't have to put the asterisk at the end, it's always there by implication. Once you've triggered the auto-completion, you can however use the wild card character in the middle of a string, like this:
a_variable_name: LI*R which would list all class names starting with "
LI" and containing the character '
R' appearing at some point after the "
When the list appears, the first list item will be selected. You can select a class name from the list by double-clicking a name in the list or by using the keyboard
Down buttons to navigate the list, then pressing
Enter to select a highlighted class name. You can also continue to type characters and the list will automatically narrow, provided that you have non-matching entries filtered out (see Auto-completion list display options below.)
To validate your choice, press
If there is no selected item when you validate, then the content of the text you have type will be inserted.
The auto-completion can be cancelled by clicking outside the window or pressing
Figure 1. The class name auto-completion window
Auto-completion list display options
At the bottom of the auto-completion window you will find a row of icons labeled "Options:". These icons help you control which choices are presented to you and the format of their presentation.
Each icon can be toggled between an "up" position and a "down" position by clicking on it. You can also toggle the option icons up and down by using the function keys
Note that not all of the options are applicable to class name auto-completion. Some apply only to feature name completion or to both class names and feature names.
- (F1) Hide non-matching entries.
- (F2) Show query return types.
- (F3) Show feature signatures.
- (F4) Show disambiguated names. (Applicable to .NET overloaded feature names.)
- (F5) Show obsolete items.
- (F6) Show description of selected item in the tool tip area at the bottom of the window. (See Figure 1)
- (F7) Remember the size of the completion list between triggerings.