While editing Ada source files, you can invoke the "Insert End" command to insert the required text to close a construct.
The editor command is bound to the Alt+End key sequence and is also available via the Source menu and the editor's contextual menu.
For constructs without an associated name, such as record type definitions and if-statements, the Insert End command will insert the corresponding simple completion.
For example, the following figure shows an incomplete record type definition with the Insert End command about to be invoked:
After invocation, the closing "end record;" sequence has been inserted and properly indented relative to the word "record":
For the end of a program unit's sequence of statements, the action will insert the "end" followed by the name of the unit.
For example, the next figure shows a procedure Demo without the closing "end". Note that the cursor is indented as if another statement is about to be entered:
After invocation, the closing "end Demo;" sequence has been inserted and properly indented:
Constructs with labels are completed in a similar manner.