Quick Fix

The GNATbench language-sensitive editor may be able to propose corrections for problems identified by the compiler. This possibility is indicated by the "light bulb" shown in the editor marker bar, opposite the source line containing the problem. Note that Quick Fix is under the control of a preference on the Ada Tools preference page and is enabled by default.

To see the correction proposals use the Quick Fix action. Simply click on the light bulb in the editor marker bar and a window containing the proposed fix (or fixes) will appear, as illustrated below:

quick fix sample missing semicolon

Quick Fix can also be invoked via entries in the Problems view. Click (single-click) on the entry in the Problems view and enter Ctrl+1, or right-click on the entry and select Quick Fix from the contextual menu:

quick fix menu entry in Problems view

Selecting the Quick Fix action will open a dialog to select and apply the correction.

quick fix sample dialog box

Note that the light bulb is only a hint. It is possible that even with the light bulb shown that no corrections can be offered.

with no proposed fix