[[Property:title|Class name auto complete]]
[[Property:weight|3]]
[[Property:uuid|0f11a078-7dab-54d1-b624-4c04476564a5]]
==Overview==
The EiffelStudio editor will complete class names automatically. This means, for example, when you type in the editor pane:
<code>
    a_variable_name: LI</code>
and then triggers the class name auto-completion, one of two things will happen:
* If there is only one accessible class name that begins `<code>LI</code>', 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 <code>Ctrl+Shift+Space</code> or by following the [[Edit menu commands|edit menu]] path:
<code lang="text">
Edit --> Advanced --> Complete Class Name
</code>

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
<br/>

==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 "<code>LI</code>". 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:
<code>
    a_variable_name: LI*R
</code> 
which would list all class names starting with "<code>LI</code>" and containing the character '<code>R</code>' appearing at some point after the "<code>LI</code>".


{{note|Using the wild card character with auto-completion is valid only '''after''' auto-completion is triggered.}}


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 <code>Up</code> and <code>Down</code> buttons to navigate the list, then pressing <code>Enter</code> 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|Auto-completion list display options]] below.) 

To validate your choice, press <code>Enter</code>. 

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 <code>Esc</code>.


[[Image:editor-class-auto-completion-window]]  

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 <code>F1</code> through <code>F7</code>.

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.

* [[Image:hide non-matching entries icon]]  (F1) Hide non-matching entries. 
* [[Image:query return type icon]] (F2) Show query return types.
* [[Image:feature signatures icon]] (F3) Show feature signatures.
* [[Image:disambiguated name icon]] (F4) Show disambiguated names. (Applicable to .NET overloaded feature names.)
* [[Image:obsolete items icon]] (F5) Show obsolete items.
* [[Image:show descriptions icon]] (F6) Show description of selected item in the ''tool tip'' area at the bottom of the window. (See Figure 1)
* [[Image:remember list size icon]] (F7) Remember the size of the completion list between triggerings.





