BT

Facilitating the Spread of Knowledge and Innovation in Professional Software Development

Write for InfoQ

Topics

Choose your language

InfoQ Homepage News IntelliJ IDEA 2018.3 Brings Support for the Upcoming Java 12, Spring Boot Enhancements and More

IntelliJ IDEA 2018.3 Brings Support for the Upcoming Java 12, Spring Boot Enhancements and More

Leia em Português

This item in japanese

JetBrains has released the version 2018.3 of their flagship product, IntelliJ IDEA. This version brings a series of new features including support for Java 12, enhancements for Spring Boot, support for multiline TODO comments, and more.

Java

IntelliJ IDEA 2018.3 comes with initial support for the upcoming Java 12. Developers can preview the Raw String Literals (JEP 326), converting multiline string literals to raw string literals and vice versa, detecting redundant leading or trailing backticks (`), recognizing regular expressions in raw string literals, and pasting a string as a raw string literal.

(image taken from jetbrains.com)

To take advantage of coding assistance for Java 12, go to Project Structure > Project, and set the language level to "12 (Preview) - Switch expression, raw string literals". It is important to note that Java 12 has not yet been released. The implementation of an early-draft specification developed under the JCP is made available for testing and evaluation purposes only, and is not compatible with any specification of the JCP.

Now IntelliJ IDEA can detect duplicates in more complicated cases, displaying duplicates in the diff viewer, enabling developers to compare them side by side.

Other improvements in this version include:

  • Detection of unnecessary use of sorted calls before the subsequent min call, and a quick fix to remove redundant sorted calls in the Java Stream API.
  • The addition of an inspection called "Condition is covered by further condition", which detects unnecessary conditions covered by a next condition, and provides a quick fix to remove these redundant conditions.
  • Detection of redundant usages of the @SuppressWarning annotation, or // noinspection line comment, or /** noinspection */ JavaDoc comment.

Editor

Multiline TODO comments support has been added on IntelliJ IDEA 2018.3; every TODO comment lines are highlighted and listed in the TODO tool Window.

(image taken from jetbrains.com)

A new indentation status bar has been added on IntelliJ IDEA 2018.3, which displays the size of the indent in the current file, adding an asterisk to the indent view when a file does not match the current settings.

Other improvements on editor include:

  • The creation of a scope to prevent formatting of code from specific files and folders.
  • EditorConfig files now has syntax highlighting and code completion.

JavaScript / Typescript

Some improvements have also been made to JavaScript and Typescript. IntelliJ IDEA can now automatically add imports, either for symbols defined in a project as well as symbols from the project's dependencies. This works as long as the package contains sources written as ES module or if there is a TypeScript definition file inside the package.

Developers using Node.js 10.12 or above and the --experimental-worker flag can now debug Node.js workers. Furthermore, IntelliJ IDEA now provides code completion for the worker threads API.

Angular support, code completion and Go to definition for variables, pipes and async pipes have also been improved, as well as the template reference variables now being more accurate. According to JetBrains, over 50 known issues have been fixed in Angular and AngularJS support.

Spring

Spring Boot 2.1 is fully supported in the IntelliJ IDEA 2018.3. Configuration values annotated with @DataSize are validated, using the default @DataSizeUnit if specified.

A new inspection has been added to spot the most common bugs when using @ConfigurationProperties. For example, deprecated POJO properties are now highlighted accordingly so it is easier to track necessary updates in the configuration.

(image taken from blog.jetbrains.com)

Spring Initializr has received some improvements; now when a developer creates a project using the Spring Initializr, IntelliJ IDEA suggests installing or enabling appropriate plugins to ensure that support for all selected technologies is present.

Kotlin developers can benefit from improvements on JPA and Spring Data Support. Now IntelliJ IDEA understands the entities when a developer writes Spring Data interfaces in Kotlin. In addition, IntelliJ IDEA provides completion for method names, and quick-fixes for parameters.

Docker and Kubernetes

The Docker plugin is now bundled with the IDE.

The support for Helm resource files has been improved in the Kubernetes plugin, including:

  • Coding assistance.
  • A preview of Helm template results in the diff, developers just needed to choose the new Kubernetes | Helm Template action from the context menu.
  • A new 'Helm Update Dependencies' action is available, enabling developers to download the external tgz dependencies and display them in the project tree.

More information and a full set of changes can be found on the What's New page.

Rate this Article

Adoption
Style

BT