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.
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.
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.
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.
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.
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.
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.
- 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.
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.
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.
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.
Swagger UI now supports specifications with external file references ($ref).
The Structure view for specification files now also features more nodes including Security, Callbacks, and Examples.
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.
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.
Second, language injection works correctly when you concatenate strings.
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.
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.
Subscribe to Blog updates
IntelliJ IDEA 2024.1 EAP 7: Full Line Code Completion, Support for OpenRewrite, and MoreEarly Access Program
IntelliJ IDEA 2024.1 EAP 7 is now available, providing a sneak peek into some exciting new features planned for the next major release. Notable updates include full line code completion, new Java inspections, and support for OpenRewrite and WireMock. Additionally, this new build introduces enhanceme…
IntelliJ IDEA 2024.1 EAP 6: Improved Workflow for Logs, Inline Breakpoints, In-Editor Code Review, and MoreEarly Access Program
IntelliJ IDEA 2024.1 EAP 6 is here! This new build is packed with a bunch of updates anticipated for the next major release. Highlights include an enhanced user experience with logs, advanced debugging capabilities, and improved integration with version control systems. You can download the new v…
IntelliJ IDEA 2024.1 EAP 5: Enhanced Support for GitHub Actions, Updates for the HTTP Client, and MoreEarly Access Program
Packed with numerous new features and enhancements, IntelliJ IDEA 2024.1 EAP 5 brings extended support for GitHub Actions, improved integration with popular frameworks such as Spring and Quarkus, updates to the HTTP Client, and much more.
IntelliJ IDEA 2024.1 EAP 4: Sticky Lines, Improved Startup Experience, and MoreEarly Access Program
The Early Access Program for IntelliJ IDEA 2024.1 continues with our latest build where you can preview new features, including convenient sticky lines in the editor, faster access to IDE functionality while indexing, and more. You can download the new version from our website, update directly fr…