What’s New in IntelliJ IDEA 2022.1

IntelliJ IDEA 2022.1 introduces the Dependency Analyzer to facilitate dependency management and conflict resolution, an updated New Project wizard to refine launching new projects, and the Notifications tool window that offers a new, streamlined way to receive notifications from the IDE. It also includes a number of other notable improvements that are covered in detail below.

Key updates

Dependency Analyzer

Dependency Analyzer

The newly introduced Dependency Analyzer provides extensive information regarding all Maven and Gradle dependencies used in your projects and subprojects. It helps you detect and resolve conflicting dependencies, filter out identical dependencies and check if they are present in different libraries, and easily navigate across dependencies to correct build configurations.

Enhanced New Project wizard

We reworked the New Project wizard interface to streamline creating new projects. You can quickly launch an empty project; use the pre-configured options for Java, Kotlin, Groovy, and JavaScript; or use generators if you have projects that are more complex.

New Notifications tool window

New Notifications tool window

The Event Log instance was replaced with a new Notifications tool window. It highlights important and helpful suggestions and notifications more clearly, and keeps them organized in a dedicated tool window. For more details, refer to the blog post.

User Experience

Maven Archetype in the New Project wizard

The updated Maven Archetype project generator in the New Project wizard introduces search-as-you-type functionality when browsing archetypes, the ability to manage an archetype catalog during module creation, and the ability to input required properties by archetype.

Improved inlay hints

We've implemented improved Code Vision inlay hints that provide you with instant insights about your code right in the editor. The list of displayed metrics now includes inheritors, usages, code authors, and related problems. The metrics are all enabled by default now and can be modified in Inlay Hints settings. These settings have also been updated and given a new configuration UI.

Evenly split tabs

You can evenly distribute the working space among editor tabs so that they are all the same width. To set this up, go to Settings / Preferences | Advanced Settings | Editor Tabs | Equalize proportions in nested splits.

Export UML diagrams to other formats

Export UML diagrams to other formats
Ultimate

It is now possible to export UML diagrams as yEd .graphml, JGraph .drawio, Graphviz .dot, Graphviz .dot with positions, Mermaid .md, Plantuml, and IntelliJ IDEA .uml files, which makes them compatible with third-party tools.

New Structural Search and Replace dialog

The Structural Search and Replace dialog now features a list of all the templates to make it easier to navigate between them. Additionally, the dialog features a Pin Dialog icon and rearranged Injected code and Match case checkboxes.

Security

Package Checker plugin
Ultimate

IntelliJ IDEA 2022.1 can now detect vulnerabilities in Maven and Gradle dependencies used in your projects by checking across the Checkmarx SCA Database and the National Vulnerability Database, thanks to the Package Сhecker plugin that is bundled with IntelliJ IDEA Ultimate.

Learn more in this blog post.

Editor

Run commands from Markdown files

Run commands from Markdown files

When working with Markdown files that contain instructions with commands to execute, you can run those commands directly from the file using the run icons in the gutter.

Copy code snippet for Markdown files

Copy code snippet for Markdown files

With the new Copy code snippet in Markdown blocks, you can effortlessly copy contents to the clipboard with a single click.

Updated Markdown Editor Floating Toolbar

The redesigned Markdown Editor Floating Toolbar now offers list creation functionality and a dropdown menu that allows you to select header styles. It is customizable, so you can fill it with the options you need.

Code reformatting in LightEdit

Code reformatting in LightEdit

We’ve enhanced LightEdit mode so that you can do even more without creating or opening a dedicated project. Now, you can perform code reformatting in projectless mode.

New Incorrect formatting inspection

New Incorrect formatting inspection

We’ve implemented the Incorrect formatting inspection, which notifies you when the current formatting of a file does not match the code style settings.

Formatting improvement

For formatting consistency in the code, the Add a space at line comment start option has been augmented with an Enforce on reformat checkbox that is enabled automatically. It is available by default for Java, Kotlin, and Groovy, and only modifies line comments that start with alphanumeric symbols.

Dry run mode support in the command-line formatter

The command-line formatter supports a dry run mode to validate project files. If a file needs formatting, it will exit with a non-zero status.

Java

Java 18 support

IntelliJ IDEA 2022.1 supports new features from Java 18, which was released in March 2022. The IDE now supports code snippets, the changes to pattern matching for switch expressions, and more. For details, refer to this blog post.

Java decompiler

The Java decompiler is now more compatible with the Java 17 release. It supports modern language constructors, such as sealed types and pattern matching, features better switch over string decompilation, provides type annotations, and detects common constants.

Better JUnit 5 support

We have added support for the new features introduced in JUnit 5.7, including support for the @EnabledIf/DisabledIf, @NullSource/EmptySource, and @TempDir annotations.

Updated Surround with try/catch template

Updated Surround with try/catch template

The updated Surround with try/catch template now re-throws an exception wrapped into a RuntimeException instead of swallowing it.

Kotlin

Kotlin 1.6.20 support

IntelliJ IDEA 2022.1 supports Kotlin 1.6.20, so the latest language features, such as support for parallel compilation, a prototype of context receivers, and better code sharing across all Kotlin targets, are now available in the IDE. Learn more about the new Kotlin updates in this blog post.

Improved IDE Performance for Kotlin

Optimizing package indexes significantly increased the IDE speed when performing code completion, highlighting, and operations related to reference search. The number and scope of re-indexing cases happening after the code changes also decreased.

Debugger improvements

We’ve introduced some useful improvements and updates for the Smart Step Into functionality while debugging Kotlin projects. We’ve also addressed a number of issues with breakpoints.

Kover plugin integration

To ensure better Kotlin code coverage, the Kover plugin has been integrated with IntelliJ IDEA.

Groovy

Package Checker plugin

Postfix templates support for Groovy

Code completion for Groovy now supports most of the Java-like postfix templates such as arg, cast, for, iter, nn, notnull, null, not, throw, try, var, par, sout, serr, while, new, reqnonnull, and return.

Frameworks & Technologies

Go microservices support
Ultimate

IntelliJ IDEA Ultimate now supports Go microservices, providing features like URL path references, endpoints, Search Everywhere, and gutter icons. The features are available after installing the Go plugin, and they currently work only with standard library functions. More details here.

Code insight improvements for Spring Data Mongo
Ultimate

When working with Spring Data MongoDB, IntelliJ IDEA now highlights JSON queries, completes operators and document fields, and provides navigation to the Database tool window from mapped entities.

Better support for .proto files

Better support for .proto files
Ultimate

There’s a new intention action for .proto files which adds missing import statements for unresolved message references. After adding the missing import statements, the IDE provides completion suggestions for message references.

gRPC reflection support

gRPC reflection support
Ultimate

With IntelliJ IDEA Ultimate, you can now run requests and get completion for service and method names directly from a running server instance. The project does not need to contain .proto files, but the server should support gRPC reflection.

Thymeleaf support improvements

Thymeleaf support improvements
Ultimate

IntelliJ IDEA Ultimate now offers better support for Thymeleaf, including fewer false-positive inspections, enhanced IDE performance when editing Thymeleaf templates, and fine-tuned inspection and highlighting levels so that you get the correct notifications.

Completion in Helidon config files
Ultimate

The Helidon framework is now better supported in IntelliJ IDEA Ultimate. The IDE now provides config key completion in properties files and .yaml files, and it supports the Go to Declaration and Quick Doc actions.

Build tools

Updated progress bar for Gradle

Updated progress bar for Gradle

We’ve introduced a progress bar for Gradle processes like downloading dependencies and importing artifacts. It allows you to track what exactly is happening with the files and estimate when the process will be complete.

Support for separate test modules in the Maven compiler plugin

Support for separate test modules in the Maven compiler plugin

We’ve added experimental functionality to the Maven compiler plugin. It now allows you to set specific language levels separately for production and test sources. You can enable this option in Preferences/Settings | Build, Execution, Deployment | Build Tools | Maven | Importing.

VCS

Code Author information provided via Inlay Hints

Code Author information provided via inlay hints

We’ve updated the Code Vision functionality so that IntelliJ IDEA can now instantly provide you with information about code authorship based on the VCS history. Code Author inlay hints are enabled by default in Preferences / Settings | Editor | General | Inlay Hints | Code Vision.

Updated Annotate with Git Blame

Updated Annotate with Git Blame

We’ve improved the functionality of Annotate with Git Blame to make investigating introduced changes easier. The IDE highlights the difference between lines right in the editor when you hover over an annotation and opens the Git Log tool window when you click on it.

Updated Commit Details in Git tool window

Updated Commit Details in Git tool window

The Commit Details now includes information about GPG signatures and the build status. Previously, this data was shown only as a column in the Git log.

Git File History: new UI without index

Git File History: new UI without index

The new UI for the Git File History tool window is now independent from the indexing process. The data is represented with a new interface, even if the Log index is off.

Suggested changes in pull request comments

Suggested changes in Pull Request comments

It’s now easier to work with suggested changes in IntelliJ IDEA, as you can now apply or commit changes locally in the IDE.

Define external diff and merge tools by file media type

Define external diff and merge tools by file media type

IntelliJ IDEA 2022.1 now allows specifying different external diff and merge tools based on the file type. To configure them, go to Settings / Preferences | Tools | Diff & Merge | External Diff Tools.

Profiler

Single profiler configuration based on Async Profiler
Ultimate

The new profiler configuration, IntelliJ Profiler, has been implemented. It combines the power of the Async Profiler and the Java Flight Recorder and brings us closer to the goal of implementing a single, all-in-one profiling tool for all platforms.

Debugger

Reset Frame

Reset Frame

In the Frames view of the Debugger tool window, we removed the Drop Frame action from the toolbar and instead made it available with an inline Reset Frame icon.

Hidden tab labels

Hidden tab labels

To maximize the usable space in the Debugger tool window, the tab labels are now hidden by default. To make them visible again or to customize their location, use the Show Tab Labels option in the Layout Settings.

QA tools

Page Object Editor improvements

The Selenium UI Testing plugin got a huge improvement for its Page Object Editor. We’ve optimized the workflow and redesigned the UI to ensure that fewer distracting elements appear. You can instantly add page elements from the web page to the code on the fly, and then continue editing without leaving the Page Object Editor. You can also choose which selector type to use when adding a new page element to the code.

New Page Object wizard

The new Page Object wizard allows you to choose the language and test automation framework when creating a new page object class. We also made the wizard available at all points in your code where you have a Selenium library dependency. If you want to try out our automatic page object generation with different frameworks and customized templates without creating a new file, there is a special playground mode available via Tools | Open Selenium Page Object Playground.

Kubernetes

Edit resources on the cluster

Edit resources on the cluster
Ultimate

Modifying resources loaded from the cluster can now be done from the editor tab.

Custom path to kubectl

Custom path to kubectl
Ultimate

You can manually configure a path to kubectl if it is not in the standard location. To set your custom path, go to Settings/Preferences | Build, Execution, Deployment | Kubernetes | Path to kubectl executable.

Port forwarding action in the Services view

Port forwarding action in the Services view
Ultimate

Port forwarding functionality for pods is now available. To forward ports, you can either use the icon on the toolbar or choose the context menu item.

Describe Resource action in the Services view

Describe Resource action in the Services view
Ultimate

There is a new Describe Resource action for all resources in the Services view. You can call it from the context menu or use the toolbar button.

Support Events in a cluster
Ultimate

Cluster events are now displayed in a separate node in the Services view, providing data about recent events in the system. To see events for a specific pod, call Describe Resource on it and look for the Events section in the action results.

Werf support
Ultimate

We’ve introduced limited editor support for werf.yaml and related Helm template files, including code completion functionality, inspections, quick-fix suggestions, refactoring / renaming for .Values.werf.image.*, and validation of some fields like boolean and int.

Import child values support for Helm

Import child values support for Helm
Ultimate

IntelliJ IDEA Ultimate now provides support for importing child values via import-values settings affecting the completion/navigation of built-in objects in templates.

Docker

New Services view UI

New Services view UI

For IntelliJ IDEA 2022.1, we’ve significantly reworked Docker’s UI in the Services tool window. The makeover has been implemented for containers, images, networks, and volumes.

Support for Docker Compose targets

Support for Docker Compose targets is now available. For example, to run a Spring Boot application on a Compose target, go to the run configuration, create a Compose target via Manage targets, and run the application.

Docker Registry V2 support

Docker Registry V2 support

We’ve added support for Docker Registry HTTP API V2 to use with Docker 1.6+. You can create simple or password-protected Docker V2 registries and perform all of the usual actions like viewing, pushing, and pulling images.

Remote Development

More settings for remote servers
Ultimate

Remote development now features a Backend Control Center widget, which shows CPU load, memory, disk capacity, and other parameters you may need to monitor the backend status.

A new security setting now lets you use SSH key forwarding to authenticate access to git-repositories from your remote machine. Alternatively, you can use the SSH-agent helper to do this.

You can now specify the download path and exact locations for the IDE backend on your remote machine.

Local thin client adds new features

Local thin client adds new features
Ultimate

JetBrains Client now supports more file editors, so you can work not only with text-based files but also with PNG images, UML diagrams, Jupyter Notebook files, and Android layout resources.

Run with coverage and a Profiler window have been added to the gutter menu. The context menu now includes Maven and Gradle tool windows, and more helpful submenu items have been added.

We’ve also improved the debugging functionality and made multiple actions available so you can effortlessly examine your code when developing remotely.

Database tools

Copy multiple objects

Copy multiple objects
Ultimate

You can now select multiple tables and copy them to another schema. Select the tables and press F5 to open the export dialog. When exporting a single table, you can map the columns, see the DDL of the new table, and change it.

The IDE supports cross-DBMS export, which means the target schema can belong to any database from your project. Learn more about it in this blog post.

MongoDB: Editing fields in results

MongoDB: Editing fields in results
Ultimate

You can now edit the results in MongoDB collections just as easily as in relational databases. You can also edit result sets obtained via .find(). This will work even if any cursor methods that modify the result, like sort() or limit(), were executed after .find().

Canceling running statements

Canceling running statements
Ultimate

The logic for canceling running statements was updated. It’s now clearer that the request is being canceled, and we no longer deactivate data sources without a warning. For more information, read this blog post.

Canceling connections without deactivating the data source

Canceling connections without deactivating the data source
Ultimate

You can now stop the process of creating a connection without deactivating the data source. If you click the Cancel button while the connection is being created, it will be stopped and a ‘Connection canceled’ message will display. Read more about this update in this blog post.

Web development

Better Next.js support

Better Next.js support
Ultimate

Thanks to the built-in support for React, all of the key features should have already been working in your Next.js projects. IntelliJ IDEA 2022.1 adds support for some framework-specific things, such as pages. The IDE will resolve paths used in the href property of your Link components, as well as in forms and other tags. Code completion, navigation, and refactorings will work, too.

Support for Volta

Support for Volta
Ultimate

In this release, we’ve added proper integration with Volta, a JavaScript tool manager. IntelliJ IDEA 2022.1 will automatically recognize Yarn and npm installed using Volta.

Scala

Scala 3 support improvements

Scala 3 support improvements

It is now possible to autocomplete extension methods. Also, the editor offers to import extension methods and given instances automatically. New inspections for the infix modifier and @targetName annotation can help you maintain a consistent code style. We’ve significantly improved the performance of the .tasty reader, so indexing Scala 3 libraries is now up to twice as fast.

New Scala project wizard

New Scala project wizard

Configuring a new Scala project just got easier. With the updated New Project wizard, you can select a project JDK, desired build system, and Scala version in a single step.

Alias exports

Alias exports

Most things in Scala are aliases, including String, Seq, List, Set, and Map. This affects syntax highlighting, GoTo, Quick Documentation, Quick Definition, Find Usages, Optimize Imports, and other IDE features, because they act on aliases rather than actual definitions. To improve the user experience, the editor now treats aliases in the standard library as transparent exports, so that, for example, List implies scala.collection.immutable.List rather than scala.List.

Unused declaration inspection

Unused declaration inspection

Previously, the detection of unused declarations was limited to private bindings. Now the Unused declaration inspection supports public bindings introduced by classes, methods, variables, parameters, and so on.

Inlay hints for ranges

Scala debugger upgrades

In this release, we’ve made an effort to revamp and streamline the Scala debugger. We've upgraded the handling of objects, primary constructor parameters, value classes, Arrays, lazy vals, and collections, as well as improved expression evaluation.

Space integration

Code review comments: Post Now or Save as Draft

Code review comments: Post Now or Save as Draft

When reviewing code changes in the IDE, you can now choose when to post a code review comment.

  • Post Now immediately posts the comment in the code review and notifies the author and other code review participants immediately.
  • Save as Draft batches all comments, and sends them in one go when you approve changes or wait for a response.

For more details, check out this blog post.

Keyboard shortcuts for code review

Keyboard shortcuts for code review

We’ve improved the code review user interface by showing applicable keyboard shortcuts. When posting a code review comment, you can use Enter to add a new line. Ctrl+Enter will save or post the comment.