IntelliJ IDEA
IntelliJ IDEA – the Leading Java and Kotlin IDE, by JetBrains
IntelliJ IDEA 2021.2 EAP Is Open!
Welcome to our second Early Access Program this year! It will offer a glimpse of the new features that will be included in the upcoming IntelliJ IDEA 2021.2, in addition to introducing useful quality improvements.
![](https://blog.jetbrains.com/wp-content/uploads/2021/05/Blog_Image_IntelliJ-IDEA.png)
The first EAP version is now available, offering automatic browser page reload when you save changes in the IDE, Ktor integration, WSL 2 and Run Targets for Kotlin, correct code highlighting when file system refresh is running, Java updates, and more.
Join the program to test these and other updates and share your feedback with us. You can download the EAP build from our website, get it from the free Toolbox App, or use snaps for Ubuntu.
This post describes the most promising updates of week one. Read on!
User Experience
Browser pages reload on save
In the previous release, we’ve made it possible to preview HTML files in a browser using the built-in web server. Now, it can also automatically reload the page opened in a browser in accordance with the changes you make to the corresponding HTML file or the linked CSS and JavaScript files. Reloading is triggered whenever changes are saved in the IDE, either automatically or using ⌘S / Ctrl+S, or when changes are made to a file externally.
To try this new feature, open an HTML file, hover over the code, and click on the icon for the browser you want to use – all browsers are supported. You can also preview the file in a browser by going to View | Open in Browser in the main menu.
![reload-on-save](https://blog.jetbrains.com/wp-content/uploads/2021/05/UX_ReloadOnSave1.gif)
Reloading on save is turned on by default. To tweak the settings for it or to turn it off, go to the Built-in Server section in Preferences / Settings | Build, Execution, Deployment | Debugger. When you use the feature for the first time, you’ll also see a popup with a link to the same settings.
![reload-on-save-warning](https://blog.jetbrains.com/wp-content/uploads/2021/05/UX_ReloadOnSave2.png)
Please give this feature a try and let us know what you think about it.
Code insight during file system refresh
Code analysis works correctly, and highlighting is no longer paused, when file system refresh is running.
New JavaFX project wizard
To save you time configuring settings after project creation, we’ve reworked the new project wizard for JavaFX. It only takes two steps. First, you add a project SDK and the language you will use, the desired build system, and the test framework.
Then you will have the opportunity to choose from a list of the most frequently used libraries, which come with short descriptions on the right. Once you create your new JavaFX project, your IDE will generate a fully configured sample application.
![Java FX Wizard](https://blog.jetbrains.com/wp-content/uploads/2021/05/UX_JavaFXWizard.gif)
Advanced Settings
We have good news for those who need to configure IntelliJ IDEA to address particular needs. We’ve added a new node to Preferences | Settings – Advanced Settings. It contains some use-case-specific options conveniently grouped by IDE tool. Most of the settings have been transferred from the Registry, though some of them are new.
For example, you can add a left margin in Distraction-free mode, or set the caret to move down after you use the Comment with Line Comment action.
Stay tuned, because we are planning to add more settings to this node soon!
![Advanced Settings](https://blog.jetbrains.com/wp-content/uploads/2021/05/UX_AdvancedSettings.png)
Automatic cache and logs cleanup
After each major update, your IDE will automatically clean up any cache and log directories that were last updated more than 180 days ago. During this process, the system settings and plugin directories stay intact.
You can also trigger this process manually using the Help | Delete Leftover IDE Directories… action.
![Cache Logs Cleanup](https://blog.jetbrains.com/wp-content/uploads/2021/05/UX_CacheLogsCleanup.png)
Default directory locations are described in this article.
Multiple copyright years
This EAP version introduces support for including both the project creation year and the current version year in a project’s copyright notice. When you add a new copyright profile, you will see a template including both dates. Please refer to the originalComment variable when you need to access an existing copyright notice.
![Multiple Copyright Years](https://blog.jetbrains.com/wp-content/uploads/2021/05/UX_CopyrightNotice.png)
![Multiple Copyright Years](https://blog.jetbrains.com/wp-content/uploads/2021/05/UX_MultipleCopyrightYears.png)
New navigation option in Preferences/Settings
Starting from this EAP, it is possible to navigate back and forth between open sections in Preferences/Settings. To do so, use the arrows in the right-hand corner of the window.
![New navigation options](https://blog.jetbrains.com/wp-content/uploads/2021/05/UX_Navigation.gif)
Accessibility updates
It’s easier to code with the enabled screen reader mode on macOS – a list of available suggestions for code completion is now read out loud. We’ve also voiced the content of the selected combo box as well as the combo box lists.
What’s more, you can effortlessly use the Search Everywhere action because the results of the search are now properly pronounced.
Frameworks
Ktor integration
Ktor, a web application framework for creating connected systems, now comes bundled in IntelliJ IDEA Ultimate. You can create a new Ktor project for developing server-side or client-side applications from the Welcome screen. In the New Project wizard, it is possible to configure the basic project settings and various features supported by Ktor.
![Ktor Integration](https://blog.jetbrains.com/wp-content/uploads/2021/05/Ktor.png)
Kotlin
Automatic ML-completion
In all the upcoming EAP builds, Kotlin code completion will work based on the machine learning mechanism by default. This will allow the IDE to prioritize code suggestions more helpfully, as it draws on the choices of thousands of real users in similar situations. The related configurations are located in Preferences/Settings | Editor | Code Completion. Please test it and share your feedback.
![Kotlin - ML Completion](https://blog.jetbrains.com/wp-content/uploads/2021/05/Kotlin_MachineLearning.png)
Run tests before code analysis finishes
If your file contains any tests, you no longer need to wait until the code analysis finishes to start running them. The Run test icon appears in the gutter as soon as you open the file, so you can click it and launch the tests immediately. We hope this will save you some time.
![Kotlin Run Tests](https://blog.jetbrains.com/wp-content/uploads/2021/05/Kotlin_TestRun.gif)
Kotlin plugin in the IntelliJ IDEA repo
We’ve moved the entire Kotlin plugin to the IntelliJ IDEA codebase. You can access this open-source plugin’s repository in the IntelliJ IDEA project. This move will allow platform changes to reach Kotlin faster, and it also means that Kotlin fixes will be promptly delivered to the IDE.
More room for action during indexing
While the IDE is indexing a project, it is now possible to run and debug your application. This was not previously possible, as the buttons associated with Run/Debug Configuration were inactive.
![Kotlin - Actions while indexing](https://blog.jetbrains.com/wp-content/uploads/2021/05/Kotlin_ActionsIndexing.png)
Kotlin support for WSL 2 and Run Targets
In IntelliJ IDEA 2021.1, we’ve introduced WSL 2 support and the Run Targets feature. Starting with EAP 1 of v.2021.2, you can now use these features for Kotlin.
![Kotlin - Run Targets and WSL 2](https://blog.jetbrains.com/wp-content/uploads/2021/05/Kotlin_TargetsWSL2.png)
Java
Updated inspection descriptions
We’ve been working hard to improve your experience with a number of our Java inspections and quick-fixes. You can now read comprehensive descriptions of them, and even see the examples of usages.
The updated descriptions are available in Preferences/Settings | Editor | Inspections.
![Updated Java Inspections](https://blog.jetbrains.com/wp-content/uploads/2021/05/Java_UpdatedInspections.png)
Visibility-based color settings
To improve the readability of your code and allow you to browse through it faster, we’ve made it possible to configure color settings for public, protected, and private Java members (methods, fields, classes). You can change these settings in Preferences/Settings | Editor | Color Scheme by unfolding the Visibility node.
![Visibility-based color settings](https://blog.jetbrains.com/wp-content/uploads/2021/05/Java_MethodColors.png)
Build tools
JLink artifacts
This EAP makes it possible to add new JLink artifacts to your project in the Project structure window. This will allow you to create a custom JDK that contains only the modules and dependencies you need when working on a Jigsaw project.
![JLink Artifacts](https://blog.jetbrains.com/wp-content/uploads/2021/05/Build_JLink.gif)
Ant support in WSL 2
It is now possible to execute Ant tasks in WSL 2.
VCS
Unified Show Diff
Starting from v2021.2, IntelliJ IDEA will display the difference between the initial and changed files in the editor. It doesn’t matter how you invoke the Show Diff action – via a shortcut, icon, from the context menu, from Log or File History, or by clicking on a file in the Commit view – the IDE will open the diff in the editor by default.
If you find it more convenient to track changes in a separate window, you can drag the desired file from the editor. If you do, the IDE will remember this and will open future diffs in a separate window.
![Unified Diff View](https://blog.jetbrains.com/wp-content/uploads/2021/05/VCS_DiffView.gif)
To go back to the default display, click the gear icon and select Show Diff in Editor Tab.
![Unified Diff View 2](https://blog.jetbrains.com/wp-content/uploads/2021/05/VCS_DiffBacktoEditor.png)
Space integration
Space job statuses in the Git log
To help you quickly track a job’s progress by just looking at the commits list, we’ve added icons for Space job statuses in the Log tab of the Git tool window. Clicking on an icon will open a popup with the automation info for that job.
You can easily hide the status information by clicking the eye icon above the log and selecting Show Columns | Space Automation.
![Space Job Statuses](https://blog.jetbrains.com/wp-content/uploads/2021/05/Space_statuses.png)
Quality enhancements
We are continuing to refine your IntelliJ IDEA experience. Here are some recent quality improvements:
- We returned the support for transparent title bars on macOS and enabled it by default. [IDEA-236114]
- More obvious highlighting for expressions that require a semicolon at the end of a line is available now. [IDEA-265053]
- When you extract a constant and tick the Replaces all the occurrences checkbox, the IDE remembers this state and will keep the selection the next time you apply this refactoring. [IDEA-162111]
- When you get the Command line is too long error on Windows, you can click Shorten the command line and rerun right in the error popup, and the IDE will offer an automatic fix. [IDEA-257348]
That’s it for week one! Please test the new features and share your feedback in the comment section for this post, and please report any bugs you encounter to our issue tracker.
Happy developing!