IntelliJ IDEA
IntelliJ IDEA – the Leading Java and Kotlin IDE, by JetBrains
IntelliJ IDEA 2021.1 Goes Beta!
We’ve got great news to share with you today! After almost five weeks of the EAP, the Beta version of IntelliJ IDEA 2021.1 is now available! Major fixes and new features have been implemented, and we are now putting the finishing touches on the IDE for its release in mid-March.
You can download the Beta build from our website, get it from the free Toolbox App, or update using snaps if you’re an Ubuntu user.
Here is a short summary of the main updates in v2021.1:
- Support for Java 16.
-
Ability to open Maven and Gradle stored in WSL 2 and work with them in the WSL 2 environment.
Please note that, thanks to your feedback, we’ve discovered a couple of issues with this feature. We are in the process of fixing them. - Run Targets feature, which allows you to run, test, and debug your application in a Docker container or on a remote machine.
- Integration with Space is available out of the box.
- Code With Me, a service for collaborative development and pair programming, is bundled.
- HTML preview inside the IDE.
- Reworked Profiler UX.
- Adjustable font-weight.
- Support for JSONPath.
- Framework improvements.
These updates are described in detail in the blog posts tagged with IntelliJ IDEA 2021.1. Test them out and share your thoughts! This week we’ve also got a few new updates to describe in more detail.
VCS
Pull Requests improvements
The Pull Requests view now features a drop-down list with all the available repositories for the current project. Once you select the desired repository, you will get access to the pull request (PR) actions.
PR creation is now straightforward – just click the + icon or go to Git | GitHub | Create Pull Request. The IDE will open a form in the Pull Requests view, prompting you to provide the PR details.
In the Info tab, you can select the head repository and its branch, enter a PR title and description, appoint reviewers and assignees, and add descriptive labels. We’ve also added the option to create draft pull requests.
The changed files are now displayed in a dedicated tab. If you double-click on any file in the Files tab, the IDE will open the in-editor diff.
Version 2021.1 supports PR templates. Add the pull_requst_template.md file with the PR description to your project, and every time you create a PR, this description will appear in it.
Java
Formatting for chained builder methods
Sometimes the code that contains chained builder methods can look messy. To improve readability, we’ve added formatting settings in Preferences/Setting | Editor | Code Style | Java | Wrapping and Braces inside the Chained method calls drop-down list.
The builder methods option allows you to create a list of method names that the IDE will treat as builder methods, and the formatter will put each of them on a separate line.
When you select the Wrap first call checkbox, the first of the builder methods will appear on a separate line too.
If then you decide to improve the readability of the code by adding some indents manually, tick the Keep builder methods indents checkbox. The IDE will then leave your custom indents intact.
The screenshot below shows the code with and without the new formatting options, including manually added indents.
If you are interested in learning more about a particular issue, the full list of fixes and improvements is available in our release notes.
Stay tuned for more announcements coming your way and don’t forget to share your thoughts on this new version! You can create a ticket in our issue tracker or leave comments on this post.
Happy developing!