BT

Facilitating the Spread of Knowledge and Innovation in Professional Software Development

Contribute

Topics

Choose your language

InfoQ Homepage News JetBrains IntelliJ IDEA 2022.1 Introduces Dependency Analysis

JetBrains IntelliJ IDEA 2022.1 Introduces Dependency Analysis

Lire ce contenu en français

Bookmarks

JetBrains has released IntelliJ IDEA 2022.1 that introduces the Dependency Analyzer to provide insights and improve the codebase. Usability and productivity improvements include inlay hints, running commands from Markdown files and improved debugging and profiling.

The new Dependency Analyzer feature provides insight into the dependencies of the project. Various new actions are available, such as Analyze Dependencies:

The Analyze Dependencies action allows developers to specify the analysis scope by selecting files to include for the depth of Maven transitive dependencies:

The result of the analysis is displayed and includes dependencies of the CarController class on various library classes such as String from Java itself and RestController from the Spring Framework. Apart from the libraries, the CarController class also depends on the production class CarService.

Selecting a class on the right, such as CarService, shows the usages of that class inside the selected CarController class on the left. This overview is configurable, for instance by selecting Show Read Access or Show Write Access.

The Analyze Cyclic Dependencies action automatically detects cycles, for instance between classes in packages. The example shows the CarService class from the com.example.demo package depending on Utils from the com.example.utils package:

Vice versa, Utils from the com.example.utils package depends on the DemoApplication class from the com.example.demo package:

The Notification tool window replaces the Event Log and displays improvement suggestions and completed actions:

JetBrains has improved the New Project wizard to ease the creation of new projects and better support Maven Archetype usage:

Inlay hints, inheritors, usages, code authors and related problems, have been improved and enabled by default to provide information inside the code which is clickable:

The UI and template browsing for structural search and replace (SSR) were redesigned. SSR considers the code structure while searching for a code pattern of grammatical construct and can be found via Edit | Find | Search Structurally or Replace Structurally:

IntelliJ IDEA Ultimate now detects vulnerable Maven and Gradle dependencies and suggests improvements. The functionality is available via the Package Checker Plugin which uses Checkmarx Software Composition Analysis.

Markdown support was improved and, among others, now supports directly executing a command in the Markdown file with the green arrow icon:

New features released in Java 18, such as JEP 413, Code Snippets in Java API Documentation, and JEP 420, Pattern Matching for switch (Second Preview), are now supported.

The new Surround with try/catch template now rethrows an exception wrapped into a RuntimeException, the Java decompiler is Java 17 compatible and JUnit 5 annotations @EnabledIf, @DisabledIf, @NullSource, @EmptySource, @TempDir are now supported.

Kotlin support now includes Kotlin 1.6.20, an improved performance and debugger, and the Kover plugin now provides code coverage.

IntelliJ IDEA Ultimate's profiler now combines the Async Profiler and Java Flight Recorder.

A complete overview of all the changes for IntelliJ IDEA 2022.1 may be found at the What's New section of the JetBrains website.

About the Author

Rate this Article

Adoption
Style

Hello stranger!

You need to Register an InfoQ account or or login to post comments. But there's so much more behind being registered.

Get the most out of the InfoQ experience.

Allowed html: a,b,br,blockquote,i,li,pre,u,ul,p

Community comments

Allowed html: a,b,br,blockquote,i,li,pre,u,ul,p

Allowed html: a,b,br,blockquote,i,li,pre,u,ul,p

BT