IntelliJ IDEA 2020.3 EAP6: Redesigned Endpoints, URL Inlay Hints, Spring Updates, and More
This week’s EAP is devoted to the new features and updates that will be available for the Ultimate Edition of IntelliJ IDEA in v2020.3. Discover the improved Endpoints tool window, more informative URL completion, important Spring updates, and more.
Reworked Endpoints tool window
In IntelliJ IDEA 2020.3, the Endpoints tool window for JVM projects will be significantly redesigned. Starting with this EAP, the Endpoints tool window is now accessible for most projects from the bottom tool window bar by default. If it isn’t there, you can access it via View | Tool Windows | Endpoints.
The standard view now displays a list of all the project endpoints grouped by module. In this update, you can hide endpoint descriptions to reduce the space the list takes up – click the gear icon and select Compact List Items. You can also use this window as a side panel – just drag and drop it to the left or right sidebar.
You can browse through all the endpoints or use search to find the ones you want. There are Module, Type, and Framework filters to narrow down your search. You can apply these filters either by clicking on them or by typing in the search field. The search field has completion suggestions.. To apply multiple search criteria, click on a filter and choose Select… then tick the checkboxes of the filters you want. If you prefer typing, just put a comma after each search parameter.
In the redesigned Endpoints tool window, we’ve eliminated a lot of extra horizontal space in favor of providing additional information for each endpoint. We’ve added three new tabs: Documentation, HTTP Client, and Open API. Documentation is available for all endpoints, while the other two tabs are only available for web services that have associated URLs.
From this tab, you can create an Open API specification to use as a draft for a full description of your web service. To do so, click Export draft of Open API inside the window or select this option from the context menu. The specification will then open in the editor.
This new UI is cleaner, faster, more informative, and more discoverable. We hope you like it, and we’re looking forward to getting your feedback.
Better URL Completion
In IntelliJ IDEA 2020.3, URL completion will become more informative. This EAP introduces changes that give a more complete picture of each URL, including:
- Icons that represent the frameworks you used to create a web service.
- HTTP methods.
- Source locations of the classes or files in which you declared the endpoint.
- Strikethrough for deprecated URLs. Deprecated URLs are also struck out in the Search Everywhere dialog and the Endpoints tool window.
From the completion dialog, you can now invoke the Quick Documentation popup for each suggested URL by pressing Fn+F1 on Mac or Ctrl+Q on Windows or Linux.
URL Inlay Hints
This update helps you get the most out of your URLs. Previously you could only navigate to the URL using Ctrl+click. Now we offer more actions that can be accessed by clicking on the globe icon next to the URL.
Note that these actions are currently available for the Spring MVC, WebFlux, Feign Client, JAX-RS, Micronaut, and Retrofit frameworks.
In this EAP, we’ve made it possible to search for URLs. To do so, just go to Navigate | URL Mapping … , press ⇧ + ⌘ + \ on Mac or Ctrl + Shift + \ on Windows and Linux, or simply type /url in the Search Everywhere dialog.
We now support code insight for Spring MVC Functional Routing, and we display endpoints declared with it. For example, you can use the following filter in the Endpoints tool window to see functional handlers:
The same support works for RestOperations, Spring WebTestClient, and Spring Reactive WebClient.
Here is an example using Spring Reactive WebClient:
Spring Security for Kotlin
It is now easier to manage roles when using Spring Security for Kotlin projects, as we’ve added code completion and navigation.
HTTP request conversion
Quite a while ago, we introduced a new client for working with HTTP requests. Starting from v2020.3, we will stop supporting the previously accepted file format. If you still have any HTTP requests created in the old format, you’ll need to convert them. There are several ways to do this.
- Open an HTTP request and click Convert request to the new format.
- In the Project view, select an HTTP request, invoke the context menu, and select Convert Legacy REST Client File to New Format.
- From the new HTTP client, click Convert… | Convert Legacy REST Client Files to HTTP Requests and select the local file you want to convert.
External references and other code insight improvements
We significantly improved code insight for a number of cases. Of the changes we’ve made, the introduction of external object references was among the most requested. Let’s take a look at them in more detail.
Now you can reference both local definitions within a current file and external ones kept in separate files. IntelliJ IDEA offers completion for the $ref keyword as you type. Once the reference is added, you can click on it for quick navigation.
Swagger Hub support
It is now possible to add API specifications from Swagger Hub. To configure this feature, go to Preferences / Settings | Languages & Frameworks | Open API Specifications.
In the Remote Specifications section, click search SwaggerHub. The IDE will open a search window with several filters. When you find the specification you need, click on it and then click Add Selected. It will then appear in the Endpoints tool window. To find it quickly, select External in the Module filter.
You can paste an API key in the Swagger Hub section to search for private specifications. You can get your API key from your preferences page on Swagger Hub.
Darcula for Swagger UI
If you use the Darcula theme, this cute UI update is for you. When you switch on Editor and Preview or Preview only mode, the swagger preview is also displayed in the dark style.
When you create a Quarkus project, the IDE automatically creates a Quarkus run configuration, allowing you to run and debug your application right away without any workarounds. To adjust the settings, click Edit Configurations. The settings in the Environment section will vary depending on whether you use Gradle or Maven to build your project.
Code completion for repository methods
Micronaut data is an additional toolkit for the Micronaut framework that lets you write neater, more concise database queries. When you create repository interfaces, you must use predefined methods, and this version of IntelliJ 2020.3 EAP introduces completion for these methods. You can use them in sequence to create more complex queries.
You can use Micronaut @Query annotation to create customized queries. It allows you to use the JPQL language for code fragments.
With JPA Console, you can write and run JPQL queries without having to run your Micronaut application. This console can be reached by opening the Persistence tool window and clicking on the QL icon at the top.
If you want to learn more about other improvements that are coming in IntelliJ IDEA 2020.3, you can check out the release notes for a full list of EAP features.
Subscribe to Blog updates
Thanks, we've got you!