Quick Fix

Magik editor can correct problems found while typing or after compiling. A 'light bulb' icon appears on the editor's annotation bar to indicate, that there are correction proposals available for a problem or a warning.

Left click on the light bulb or press Ctrl+1 (Edit > Quick Fix) to bring up proposals for the problem at the cursor's position.
Each quick fix shows a preview, when selected in the proposal window.

Quick fix selection dialog

Some quick fixes can also be directly assigned to a specific shortcut. You can configure these shortcuts on the General > Keys preference page (in the Source category).

Some quick fixes offer to fix all problems of the same kind in the current file at once. The information message in proposal window contains this information for all applicable proposals. To fix all problems of the same kind, press Ctrl + Enter.

The following quick fixes are available:

Spelling errors displays a list of word proposals, the incorrect word is replaced with the selected proposal. The word can also be added to the dictionary or ignored during the current session check.
Wrong Class Name inserts correct class name, if the name was improperly specified, e.g. we used a symbol instead of an identifier.
Missing Execute Mark inserts the execute sign ($) in the new line after the marked code fragment.
Unnecessary Execute Mark removes the redundant execute sign ($) after the marked code fragment
Missing Pragma inserts a default pragma statement before the marked fragment of the code. The default pragma statement is determined considering the contents of the marked fragment and selected preferences on Magik Code Templates preference page.
Unnecessary Pragma removes the redundant pragma statement before the marked code fragment.
Unreachable Code removes the selected code fragment.
Missing Encoding inserts a line with default encoding declaration at the beginning of the file. The default encoding is iso8859_1 or the previously chosen one in the New Source File wizard.
Unrecognized Encoding replaces unknown encoding symbol with the default encoding. The default encoding is iso8859_1 or the previously chosen one in the New Source File wizard.

Quick Assists are proposals available even if there are no problems or warnings. See the Quick Assist reference for more information.

Related concepts

Magik Editor
Quick fix and assist

Related reference

Quick Assist
Quick Outline
Quick Type Hierarchy
Encoding Preferences
New Source File Wizard