As you are editing, the NPL parser is run after every edit. This gives you syntax highlighting and underlines syntax errors (e.g. malformed protocol header, missing semicolon).
To analyse the code more carefully, the plugin can invoke the NPL compiler. This will warn you about issues like unknown identifiers, missing required files and type mismatches.
To compile a single file, right-click on a file and press
Recompile 'file.npl'. Alternatively, you can compile the
whole project by
Build | Build Project or
Build | Build module .... The compilation errors (or failure) will be
displayed in Messages (
View | Tool Windows | Messages) and Event Log (
View | Tool Windows | Event Log). Clicking on
an error navigates to the source file and line where it occurred.
Note: There are no artifacts produced by the compilation. When loading the code into the Sandbox, the code is compiled on the engine side.
You can use IntelliJ quickfixes on many typical errors.
The plugin highlights a majority of errors and warnings as you type, i.e., without invoking the compiler manually. A few
of them can be fixed with the use of so-called "quick fixes". These intentions are typically invoked using the key
Alt + Enter when the caret is positioned on the highlighted error.
Some errors and warnings may have multiple possible quick fixes. In that case, a drop-down will offer all possibilities. Most warnings can be disabled, either as a whole for the project, or for a particular statement, function or protocol. To do this, select "Disable inspection" or " Suppress '....' for ...."