The following is only valid when Scala Plugin is installed and enabled!

Scala type-aware highlighting lets you get an error analysis based on the Scala type system before you start the compilation process.

Enabling or Disabling Type-Aware Highlighting on the Project Level

  • Enable or disable the type-aware highlighting for your project by clicking images/type_aware_highlighting_icon.png or images/T_disabled.png icon on the status bar. You can also use the Ctrl+Shift+Alt+E shortcut.

    images/T_toolbar.png

Enabling or Disabling Type-Aware Highlighting on the File Level

  • Open the file and on the status bar click images/hector.png Hector icon. If you disable Hector, then the type-aware highlighting will also be disabled. Each time you enable or disable the type-aware highlighting, you can see the notification of the status's change in the Event log.

Working with Type-Aware Highlighting in Editor

  •  Let's see how it works:

    images/T_editor_highlighting.png

    As you can see, the expression is wrong and the value is highlighted.
    If the type-aware highlighting is disabled, the error is not highlighted and it might be quite difficult to spot:

    images/T_when_disabled.png

  • You can also enable the highlighting based on expression type inference.
    Consider the following example:

    images/T_editor_function_highlighting.png

    As the pop-up message suggests, the expression type is wrong and is highlighted.

Disabling Type-Aware Highlighting Locally

  • Highlight the code and on the main menu select Code | Surround With.
  • When Surround With window opens, select the / * _ * /.../ * _ * / option from the list.

    images/T_surround_with_action.png

    After you've selected the appropriate option your code looks like this:

    images/T_surround_with_action_result.png

    As a result, the error is not highlighted.