Early Access Program

IntelliJ IDEA 2021.1 EAP 5: WSL 2 Support for Maven and Gradle, Support for JSON Path, and More

Week five of the EAP brings us to the final v2021.1 build before we introduce the release preview. In this build, you can test WSL 2 support for Maven and Gradle projects, SSL support in the HTTP client and its UI updates, a possibility to query JSONPath, and more.

To try out all the updates, you can download the latest build from our website, get it from the Toolbox App, or update using snaps if you’re an Ubuntu user.

Here are the most significant updates for week five.

WSL 2 support (part 2)

If your Maven or Gradle projects are stored in WSL 2 (\\wsl$\<Linux distribution name>\<path to project>), you can now open them in IntelliJ IDEA and work with them in the WSL 2 environment.

WSL 2

Frameworks and Web

UX and UI updates in HTTP Client

When you run a request from the HTTP client, the IDE opens the Services tool window. It is now possible to collapse the returned HTML, JSON, or XML by clicking on the minus icon next to it.

The right vertical pane has been given a new look. Response view settings are now grouped under the ‘eye’ icon. When you click on it, you can choose to show line numbers and the format for viewing the response. What’s more, it is easy to scroll to the top and to the bottom of the response by clicking the respective icons.

The last new icon ‘Copy Response Body To Clipboard’ allows you to copy the response body without all the additional info that the full response contains.

HTTP UI

SSL support in HTTP client

If you use SSL client authentication for https:// protocols, you can now define SSL settings in the HTTP Client by clicking Add environment file and selecting Private. The IDE will automatically create a file where you can add your SSL configurations.

  • "clientCertificate" – Enter a path to the client certificate, which can either be protected by a password or a key.
  • "hasCertificatePassphrase" – If you set it to true, click the ‘pen’ icon in the gutter to enter a password for the client certificate.
  • "clientCertificateKey" – Enter a path to the client certificate key.
  • "verifyHostCertificate" – Set it to false if you want to disable the server certificate verification by a client. This may be useful when creating test certificates.

SSL in HTTP Client

UX improvements for JPA

In projects that include JPA entities, you will find redesigned and improved icons in the gutter. They are now clickable and contain a list of the most useful actions for entities and their attributes.

Web JPA

We’ve also improved JPA support for Kotlin and multi-module projects.

JPA Console for Jakarta EE 9

In v2021.1, the JPA console for writing and running JPQL queries is available for Jakarta EE 9 projects.

JPA_Jakarta EE

Spring updates

We continue to improve the experience of using Spring in IntelliJ IDEA. Here is the list of the issues we’ve addressed so far:

  • Added support for the javax.annotation.Priority. It is now possible to navigate to the correct autowired bean. Spring @Priority
  • Improved the processing of the @ConditionalOn annotations in Spring Boot.
  • Fixed issues with custom qualifiers, autowiring false-positives, composed annotations for @EnableJpaRepositories in Spring Data JPA. We’ve also addressed issues with code configuration support in Spring MVC, @EndpointId and @ServiceActivator annotations in Spring Integration.

JSONPath support

There is some good news for people using JSONPath, a query language that allows you to find different code elements in a JSON document: IntelliJ IDEA now supports JSONPath expressions with the Goessner and Jayway syntax.

For JSON files, call the new action via Edit/Find/ Evaluate JSONPath Expression to open a dedicated tool window. The search field has code assistance to help you write your queries quickly and apply various complex filters. You can also choose how to display your query output: either as a value or a path to the desired data.

JSONPath 1

For code that uses JSONPath expressions, place a caret inside a JSONPath string, press Alt+Enter, and select Evaluate JSONPath Expression. The action will open a dialog that offers the same functionality as described in the previous paragraph and additionally an area where you can enter a sample JSON input.

JSONPath 2

New color scheme for UML Diagrams

If you use a light theme, this update is for you. The UML Diagrams now use a new color scheme that makes them look neater and more readable.

UML Light

Swagger Improvements

Swagger UI now supports specifications with external file references ($ref).

Swagger updates

The Structure view for specification files now also features more nodes including Security, Callbacks, and Examples.
Swagger

Selenium Page Object Generator

We’ve added support for a new tool that allows you to detect DOM elements of a web application. You can access it via Tools | Generate Selenium Page Object. Keep in mind that you must install the Selenium UI Testing plugin beforehand.

Enter the web page address in the URL bar and click the target icon next to it. You can now select any DOM element. Click on the plus icon in the left-hand pane to add this element to the area below. Once the code is there, you can change its language or framework. Our tool supports Java, Kotlin, and Groovy and such frameworks as Selenium, FluentLenium, Selenide, Geb, Atlas, and JDI Light.

You can customize the code templates of each framework by selecting Selenium | Page Object Templates in Settings/Preferences | Editor | File and Code Templates.Selenium

Kotlin

Language injection improvements

You can insert code written in a different language into your Kotlin code – we call this language injection. In v2021.1, we’ve fixed some of the language injections issues that received the most votes.

First, when you use triple quotes to inject multi-line strings and add the .trimIndent(), or .trimMargin() functions at the end, the lines inside the triple quotes are highlighted correctly, and the mentioned functions work as expected.

TrimIndent

Second, language injection works correctly when you concatenate strings.

Concatenated strings

UML diagrams

In this EAP, you can test Kotlin code visualization via UML Class diagrams. You can build a diagram either from the Project view via Diagrams | Show diagrams | Java classes or from the editor by selecting a class name and pressing ⌥⇧⌘U on macOS or Ctrl+Alt+Shift+U on Windows or Linux.

Currently, the diagrams only show inheritance and nesting relationships, but we plan to support more detailed association connections, like aggregation, construction, dependency, and others.

UML

Other

Run and debug Gradle, Micronaut, and Quarkus projects in Docker and on remote machines

We continue to improve the Run Targets feature that we recently introduced. You can now run and debug Gradle, Micronaut, and Maven-based Quarkus projects in Docker containers and on remote machines connected via SSH.

We are polishing this feature, so we’d appreciate your feedback. The answers to these questions will help us make it more convenient and effective for you: Do you often have to debug apps running remotely? Does the feature work for your project setup? If not, please tell us what is missing.

Run Targets New

These are the major updates for EAP 5. Check out the whole list of resolved issues in the release notes. We’ll appreciate your feedback in the comments below, on Twitter, or via our issue tracker.

Happy developing!

image description