Display compile or verify error messages inline or as annotations

Compile or verify error messages from the error list view can be displayed inline in the editor or as annotations in the margin column of the editor.

About this task

Inline style
When displayed inline, error messages display one message per line. For example, the following image shows four error messages for the selected line:
Inline messages
Annotation style (default)
With annotations, error messages are displayed as annotation icons in the margin column as in the following image. Annotations present a less cluttered view of the editor while still allowing access to the message information:
Message as annotations

The following steps describe how to set the message style, access more information, filter messages, and set annotation preferences

Procedure

  1. Access the error list view. Usually the view is displayed in a tab beneath the editor. If you do not see the view, click Show View > Other > IBM i > Error List.
    Error list view
  2. Click the view menu drop down icon view menu icon and select Message Style. Click Show message as annotations to toggle between displaying messages as annotations or the default inline style.
    Error List drop down menu
  3. Compile or verify your source.

    Right-click your source member in the remote systems view or in the i Project view and select a Compile or a Verify option. The following example uses Compile.

    Compile

    After you compile, the errors will be shown inline or as annotations depending on the message style that you have chosen. The errors will also be listed in the Error List view.

    Messages after compile

    Note:
    • If you compile without the source open in the editor, you can double-click a message in the Error List view to open the editor and have the messages inserted.
    • If you compile from the i Projects view by right-clicking a member, selecting Remote Actions and choosing one of the compile options, the errors will not be loaded automatically. In this case, to see the errors, in the Job Status view, right-click the job and select Task Actions > Retrieve Errors.
      Retrieve Errors
  4. Get more information about the errors.

    If you are using the annotation style, to see more information, place your pointer on an annotation and wait for the hover text to display. If there are multiple messages, a line is used for each message.

    Hover text

    You can also place your pointer over underlined sections in the source for additional information. Click the error message links to open the help for more detail about the errors.

    Hover over underlined section

    If you are using the inline style, select a message in the editor and press F1 to view second level help about the message.

    f1 help

  5. Filter the messages that are displayed.

    To display all messages, click the view menu drop down icon view menu icon and select Messages > Insert All.

    Insert All

    To filter messages based on severity, click the view menu drop down icon view menu icon and select Messages > Insert All Showing.

    Insert All Showing

    With the Insert All Showing option, only the message levels that you have selected in the Show Severity section will be displayed. For example, with Show Severity > Severe, only severe errors are shown as in the following image.

    Severe errors

    If you choose Show Severity > Error and Severe, both normal errors and severe errors will be shown.

    Severe and regular errors

    Note: When switching between the messages options for Insert All and Insert All Showing, you will need to recompile for the new filtering to take effect.
  6. Set annotation preferences.

    To change the underline style and color for annotated messages, click Window > Preferences > General > Editors > Text Editors > Annotations. For the annotation presentation in RPG source, you can change preferences for Error List Severity Warning, Error List Severity Error, Error List Severity Severe, and Error List Severity Terminating.

    Annotation preferences

    Note: Syntax check errors are set to display messages as annotations by default. If you want to display syntax check errors inline, click Window > Preferences > Remote Systems > Remote Systems LPEX Editor > IBM i Parsers and uncheck Display syntax check messages as annotations.