IntelliJ IDEA 2021.2 Is Out!
IntelliJ IDEA 2021.2, our summer release, is available! Download it from our website or by using the Toolbox App. You can also upgrade from inside the IDE or via snaps if you are a Ubuntu user.
We’ve introduced many new features in various areas of the IDE and worked on improving the daily experience in IntelliJ IDEA. The changes were mostly based on the feedback in our issue tracker, which is our go-to tool for learning about your needs and pain points. So, we’d appreciate your thoughts on this release and help in solving any bugs that you may come across.
See the most important updates in our video overview:
As usual, you can get more detailed information about each new feature in a series of our EAP blog posts and on the What’s New page.
This post lists all of the significant features and improvements in v2021.2 so that you can quickly scan through them.
- The new project-wide analysis allows you to track errors throughout small or medium-size projects before compiling them. This feature works in IntelliJ IDEA Ultimate only.
- We’ve added several actions that the IDE will initiate when you save the project, including reformatting code and optimizing imports, among others. All of these actions are now conveniently grouped in Preferences/Settings | Tools | Actions on Save.
- It is now easy to manage Maven and Gradle dependencies with the new powerful Package Search UI. You can also see if any version updates for dependencies are available and upgrade right from the editor.
- The descriptions for inspections and quick-fixes are more comprehensive. Some of them feature usage examples.
- The diagrams have become more informative, offering you a Structure view with a diagram map and a preview of the selected block and its neighbors.
- Your project’s copyright notice includes both the project creation year and the current version year by default.
- Markdown support has been improved with the ability to convert .md files to/from various formats, configure image size, and use drag and drop to insert images. We’ve also fixed the list formatting issues and added the new Floating Toolbar, which is only activated when you need it.
- You can open Eclipse projects stored locally on your machine right from the dedicated folder on the Welcome screen, as IntelliJ IDEA can now automatically detect such projects.
- Use-case-specific options are now available in the new Advanced Settings node in Preferences/Settings.
- Organizing tool windows just got easier – drag them by their name bar and drop them to the highlighted place within the main IDE window or in a separate window.
- IntelliJ IDEA automatically cleans up any cache and log directories that were last updated more than 180 days ago.
- If your project is missing a plugin for a specific framework used in it, the IDE will alert you and offer to enable it.
- We’ve simplified the back-and-forth navigation in Preferences/Settings by adding arrows to the top right-hand corner of the window.
- Your IDE will inform you about any product updates that appear in Toolbox App 1.20.8804 or later.
- Accessibility updates for macOS users include voiced suggestions for code completion, the content of the selected combo box and combo box lists, and the results of your queries in Search Everywhere.
- In this release, we’ve eliminated UI blocks when using context menus, popups, and toolbars, and moved certain operations that require indices off the UI thread.
- You can mark public, protected, and private Java members (methods, fields, classes) in different ways. To configure this, go to Preferences/Settings | Editor | Color Scheme and unfold the Visibility node.
- We’ve introduced a new two-step JavaFX project wizard.
- We’ve added a range of new inspections to address particular use cases in Data Flow Analysis, including tracking a floating-point range or collection size on update methods, and others. To learn more, read our blog post.
- Kotlin code completion now works based on the machine learning mechanism by default.
- You don’t have to wait for code analysis to finish before running tests, as you can now launch tests immediately after opening the file by clicking the Run test icon in the gutter.
- The coroutines agent is now available via the Coroutines tab in the Debug tool window. It works for Java run configurations with a dependency on kotlinx.coroutines and Spring and Maven run configurations.
- We’ve made the buttons associated with Run/Debug Configuration active during indexing. This means you can run and debug your application even while the IDE is indexing your project.
- We’ve introduced WSL 2 support and the Run Targets feature for Kotlin.
- A new inspection is available to simplify the syntax and combine several calls into one when IntelliJ IDEA calls methods in a chain inside a collection.
- We’ve added a new intention action for buildString conversion.
- IntelliJ IDEA can now rename useState values and functions simultaneously.
- Previously, it was possible to add missing import statements as you completed ES6 symbols. Now your IDE can do the same for CommonJS modules – require imports will be inserted on code completion.
- Scala 3 support has been significantly improved. Indexing is faster and more precise, and you can now create sbt and .idea-based Scala 3 projects. Along with Scala 3 SDKs, we’ve supported Scala 3 constructs in Scala 2 projects (-Xsource:3) and added many other improvements.
- You can use compiler-based error highlighting to avoid false error reports. Note though that while the compiler-based approach is more precise, it is slower, requires more resources, and doesn’t support features such as type diffs, quick-fixes, and inspections.
Profiler (IntelliJ IDEA Ultimate only)
- IntelliJ IDEA now fully supports the profiler on Windows and Apple M1, in addition to Linux and non-M1 macOS, which means you can now use it in most environments.
- The IDE supports Async Profiler 2.0, which combines the power of the CPU and Allocation profilers. It works via the new Async Profiler configuration.
- The Retained Objects tab now interprets data for the selected item in a sunburst diagram.
- It is now possible to add new JLink artifacts when working with a custom JDK.
- You can execute Ant tasks in WSL 2.
- Gradle Run/Debug Configurations have been reworked. We’ve gathered the essential parameters on one screen, and you can add more options on demand.
- We’ve increased the indexing speed for projects in WSL 2.
- You can now run tests on the applied changes before committing them.
- Previously the progress and results of all the pre-commit checks appeared in additional modal windows. In this version, they are conveniently shown in the Commit area.
- In IntelliJ IDEA 2021.2, you can enable Git commit signing with GPG to secure your commits.
- The node that stores uncommitted changes in new projects is now called Changes instead of Default changelists. Additionally, Git operations no longer call for automatic changelist creation.
- The Show Diff action opens the dedicated window in the editor by default.
- It is now easy to find text in Local History revisions – just type your query in the search field.
- Two new options are available in our in-built terminal: cursor shape selection and the ability to make the Option (⌥) key act as a meta modifier in combination with other keys.
- The Preview tab now works in the debugger. If this feature is on, the IDE opens files successively in one tab when you stop at a breakpoint, step through the code, navigate between frames, or use the “prev/next frame” actions.
Frameworks and technologies (IntelliJ IDEA Ultimate only)
- In the Endpoints tool window you can call a microservice diagram that shows microservice interactions and allows you to track which client calls a particular service and navigate to this call in your code. The diagram is available in Java and Kotlin projects if you use Spring, Micronaut, Quarkus, or Helidon frameworks.
- You can easily migrate a project or module from Java EE to Jakarta EE with the new Migrate refactoring.
- If you create a new Spring Initializer project, the IDE will download shared indexes automatically. This helps reduce indexing time and make the IDE start up faster.
- We’ve introduced support for Entity Graphs, which you can define by using the @NamedEntityGraph annotation. Code completion, error detection, and navigation are available for the attributes of this annotation.
- We’ve added support for cache annotations for Micronaut and Quarkus. You can navigate between cache name usages via the gutter icons, use Find usages, and use Rename refactoring for cache identifiers.
- The Protocol Buffers plugin is bundled with IntelliJ IDEA Ultimate, and the JetBrains team fully maintains it.
- IntelliJ IDEA Ultimate now supports the gRPC framework. The first feature that we’ve introduced is the ability to see gRPC endpoints in the Endpoints tool window.
- You can now create a new Ktor project from the Welcome screen; IntelliJ IDEA Ultimate now supports this framework out of the box.
- You can now use icons for Space job statuses in the Log tab of the Git tool window. Clicking on the icons invokes a popup with the automation info for the jobs.
- It is now possible to mention your teammates with @ followed by the colleagues’ names when you work with Space code reviews.
- The IDE shows related branches in the selected code review in the Details tab.
Code With Me
- When you use Following mode during your Code With Me session, you can see what code completion suggestions the person you are following uses.
- The revamped undo logic enables both guests and the host to reverse their individual changes in the code. This improvement is particularly useful in pair and mob programming scenarios.
- In v2021.2, participants can share an application window from their computer screen, not just your JetBrains IDE.
- The ability to share specific open ports with participants via an integrated proxy is now available. So, if a host runs applications on a specific port, the guests can access it via a local host on their machine.
Database tools (IntelliJ IDEA Ultimate only)
- It is possible to generate a DDL data source based on a real one. The DDL files will be created locally, and the new data source will be based on them.
- Now you can define which operations make the Services tool window appear in Preferences/Settings | Tools | Database | General.
- Code completion now works for various types of fields and operators in the MongoDB console.
- The new Test Data plugin brings many useful actions to help you generate random data for unit tests.
- It is possible to connect to Docker via SSH.
- The container log has options to show timestamps and previous sessions.
- New action buttons for containers let you start, pause, unpause, and restart them quickly. You can apply these actions to several containers at once.
- We’ve introduced a new way to delete images with existing dependencies. You can now specify which dependencies you want to get rid of and which should stay.
- There are two new nodes in the Services tool window: Networks and Volumes.
We’ve implemented several new features for Docker Compose:
- You can display Docker Compose applications in the Services tool window, even if they are not running, by clicking the cycle arrows icon in the editor window.
- New icons help you detect which state the service is in. The tooltips will prompt you on what each icon means.
- Every service node now features a log.
- We’ve added more options to the Docker Compose Run/Debug Configurations, including Enable BuildKit, Enable compatibility mode, and Specify project name.
- We’ve added support for version 3 of the Docker Compose file format.
Kubernetes (IntelliJ IDEA Ultimate only)
- In IntelliJ IDEA 2021.2, we’ve introduced full support for the alias field that belongs to the dependencies section in Chart.yaml (api v2) or in requirements.yaml (api v1).
- You can define your own namespaces if you don’t have access rights to all the cluster namespaces.
- It is possible to select favorite namespaces, which automatically places them on top of the list.
- Starting with this version, you can enjoy the fully localized IntelliJ IDEA UI in Chinese, Korean, and Japanese. Localization is available as a non-bundled language pack plugin, which can be easily installed in your IDE.
- The Android plugin was upgraded to v4.2.0.
- We’ve unbundled the following plugins: Resource Bundle Editor, Drools, JSP Debugger Support, CoffeeScript, Spring Web Flow, Spring OSGI, Arquillian, AspectJ, Guice, Helidon, Emma, and EJB.
- Fixed the error that appeared when you click Download sources for Maven projects. [IDEA-247792]
- Supported .mvn/jvm.config to define JVM configurations for Maven builds. [IDEA-205178]
- Fixed the Esc key behavior in some dialogs. [IDEA-270541]
- Tool windows open via a mouse click on Linux. [IDEA-270699]
- We’ve improved the coverage performance, which is now as fast as JaCoCo.
- Fixed incorrect encoding in .properties files. [IDEA-266551]
- The IDE automatically deletes empty scratch files. [IDEA-194931]
- Fixed the problem causing the IDE to freeze in the Plugin migration dialog after deleting configs and restarting. [IDEA-270855]
- Fixed the NullPointerException when creating a new Maven project from existing sources in the WSL 2 directory. [IDEA-265641]
- Fixed the issue that led to confirmation dialogs being displayed incorrectly. [IDEA-271191]
- 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]
- We’ve fixed several issues affecting variable evaluation in Kotlin code. [KTIJ-7604], [KTIJ-3018], [KTIJ-2425], [KTIJ-302].
- Kotlin objects are correctly displayed in the Variables view. [KTIJ-780]
- We’ve fixed the issue about the connection over relay servers that were not working when the proxy with authentication was used. [CWM-2712]
These are the key changes in IntelliJ IDEA 2021.2. If you are interested in other updates, fixes, and improvements, the release notes have the full list.
We hope that you’ll find the new features helpful in your daily coding. Please tell us what you think about the newly introduced updates by commenting on this post, and report any bugs to our issue tracker.
Subscribe to Blog updates
Thanks, we've got you!