Skip to end of metadata
Go to start of metadata

Redirection Notice

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

 You can enable or disable the type-aware highlighting in the following ways:

  • On the project level, by selecting the appropriate check box on the first page of the project wizard or by clicking the  icon on the status bar.
  • On the file level of your project, by clicking the   icon on the status bar. 
  • Locally in Editor, by using  Surround With action.

1.How to Enable or Disable Type-Aware Highlighting on the Project Level

On the first page of the new project wizard, you can see a check box Enable type-aware highlighting, by default, it is selected.  If you need to disable the type-aware highlighting, simply uncheck this option.

 You can always enable or disable a type-aware highlighting for your project by clicking  icon on the status bar or using aCtrl+Alt+Shift+E shortcut.

2. How to Enable or Disable Type-aware Highlighing on the File Level

 You can enable or disable the type-aware highlighting for the specific file in your project. To do that, open the file and on the status bar click  Hector icon. If you disable Hector, then the type-aware highlighting will be also 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:

3. How It Works

Let's see how it works:

 

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.

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


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

4. How to Disable Type-Aware Highlighting Locally

You can disable the type-aware highlighting locally using Surround With action. To do that, highlight the code and on the main menu selectCodeSurround With.  WhenSurround With window opens, select/ * _ * /.../ * _ * / option from the list. Consider the following example:

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

As a result, the error is not highlighted.

  • No labels