IntelliJ IDEA 2024.1

Released: Apr 4, 2024

2024.1 での更新項目

機能

Key Highlights

  • Full line code completion - This release comes with full line code completion for Java and Kotlin. This feature is powered by an advanced deep learning model seamlessly integrated into the IDE. It enhances coding efficiency by predicting and suggesting entire lines of code based on contextual analysis. These suggestions are powered by specialized language models that have been trained specifically for different languages and frameworks and that run entirely on your local device, ensuring your data remains secure without any need for communication with an external server. This functionality is included in the IntelliJ IDEA Ultimate license subscription.
  • Support for Java 22 features - This release provides support for the feature set in JDK 22, released in March 2024. This includes support for the final iteration of unnamed variables and patterns, the second preview of string templates and implicitly declared classes, and instance main methods. Additionally, this update introduces support for new statements preceding super(...) in their preview state.
  • New terminal [Beta] - This release unveils an overhauled terminal featuring both visual and functional enhancements to streamline command-line tasks. This update gives the familiar tool a fresh new look, with commands separated into distinct blocks, along with an expanded set of features, such as smooth navigation between blocks, command completion, and easy access to the command history.
  • Sticky lines in the editor - Introduced sticky lines in the editor to simplify working with large files and exploring new codebases. This feature keeps key structural elements, like the beginnings of classes or methods, pinned to the top of the editor as you scroll. This way, scopes always remain in view, and you can promptly navigate through the code by clicking on a pinned line.

AI Assistant

  • Improvements in AI Assistant - AI Assistant has received several valuable updates, including improved test generation and cloud code completion, custom prompts for commit messages, the ability to create files from code snippets, and updated in-editor code generation.
    • Please note that in this release, AI Assistant has been unbundled and is now available as a separate plugin. This change is driven by the need to offer greater flexibility in decision-making regarding the use of AI-powered technologies, providing you with more control over your preferences and requirements in your working environments. AI Assistant still requires an active JetBrains AI subscription.
  • Improved code highlighting for Java and Kotlin in AI Assistant - Enhanced code highlighting for Java and Kotlin within AI Assistant's responses. Code in the AI chat is now highlighted just as it would be in the editor, making it easier to assess quickly. This enhancement is designed to make working with AI Assistant's suggestions more intuitive by offering an editor-like experience right within the chat.

User Experience

  • IDE features available for Java and Kotlin during indexing - Basic IDE functionalities like code highlighting and completion now work for Java and Kotlin during project indexing, which should enhance your startup experience. Additionally, you can navigate through the code using Go to class and Go to symbol while the project is still loading.
  • Updated New Project wizard - To reduce your cognitive load while configuring new projects, slight adjustments to the layout of the New Project wizard have been made. The language list is now positioned in the upper left-hand corner, enhancing the discoverability of the most popular options.
  • Option to scale down the entire IDE - You can now scale the IDE down to 90%, 80%, or 70%, giving you the flexibility to adjust the size of IDE elements both upward and downward.

Java

  • Language injections in string templates - Introduced the ability to inject languages into string templates. You can do this with annotations, which automatically select the required language, or by using the Inject language or reference intention action (Alt+Enter) to manually select a language from a list. If you use the latter method, the IDE will offer to insert the language annotation for you. After performing the injection, you can call the list of intention actions again and choose to open and edit the injected fragment in a separate editor pane.
  • Improved workflow for logs - Since logging is an important part of daily development, a range of updates have been introduced to enhance IntelliJ IDEA's user experience for it.
    • You can now easily navigate from log messages in the console to the code that generates them.
    • The IDE now suggests adding loggers where they're needed and simplifies inserting logger statements, even when the logger instance is not in scope.
  • New inspections and quick-fixes - New inspections and quick-fixes have been implemented for Java to help keep your code neat and error-free
    • The IDE now detects bitwise operations that can be replaced with calls to the Long.hashCode() or Double.hashCode() methods for clarity.
    • A new quick-fix simplifies switching between implicit and explicit class declarations based on your codebase's requirements.
    • Another new inspection suggests using existing static methods for matching code fragments, making it easy to reuse code without introducing additional APIs.
    • The IDE now detects and reports unreachable code that will never be executed.
  • Enhanced user experience with multi-release JARs - IntelliJ IDEA now offers an enhanced user experience with multi-release JAR libraries. When you use a class that has different versions, the Go to declaration feature now selects the proper version from the JAR based on your current module's language level. Moreover, the Go to class feature offers extra information about the version of the class. When you use Step Into while debugging, the IDE will take you to the class that corresponds to your JDK version, not the language level of your module.
  • Revamped Conflicts Detected dialog - In this release, the Conflicts Detected dialog has been revamped to improve readability. Now the code in the dialog mirrors what's in the editor, giving you clearer insight into conflicts, and the IDE automatically saves window size adjustments for future use. The buttons and their behavior have been updated to streamline the refactoring workflow, and the dialog is now fully accessible via the keyboard, meaning that you can use shortcuts and the arrow keys for seamless interaction.
  • Rename refactoring inlay hint - To make the renaming process easier and more intuitive, a new inlay hint that appears on top of the changed code element has been implemented. To update all references in the code base to the new version, you simply need to click on this hint and confirm the change.

Kotlin

  • K2 Kotlin mode - Introduced the new Kotlin K2 mode, leveraging the embedded K2 Kotlin compiler for enhanced Kotlin code analysis. This update not only guarantees compatibility with upcoming Kotlin features, but also boosts the stability of code analysis, resulting in the enhanced quality and reliability of IDE features, as well as improved overall application performance.
  • Official Kotlin code style propagated in all projects - Starting from this release, the IDE uniformly applies the official Kotlin style guide as the default option for all projects, unless explicitly specified otherwise. If your existing project happens to use an older code style without it being explicitly configured, the IDE will automatically switch to the Kotlin coding conventions code style and provide a notification to alert you of this change.
  • Static imports preserved on copy-pasting - This release accurately preserves static imports, ensuring they are transferred exactly as they appear in the source code. This is particularly valuable when handling nested objects, enums, and Java static imports.

Scala

  • Better Scala 3 support - In the new release, many issues related to how specific syntax cases in Scala 3 are handled have been fixed. The improvements include the ability to recognize prohibited mixes of modifiers, calculate indentation depth, cut and paste operations without breaking indentation, and associate end markers with their syntax structures. Scala 3 support in the debugger has also been improved, and autocompletion now accurately handles some corner cases, such as when it is used together with the using and given keywords or with unapply signatures.
  • Scaladoc enhancements - Many minor improvements and fixes have been made to how classes, traits, and method declarations are highlighted in Scaladoc popups and in the quick documentation popup. Nested generic parameters are now highlighted correctly, and field access modifiers are displayed. Additionally, the code inside Scaladoc blocks with triple braces is now highlighted in the same way that standard Scala code is.
  • Improved compiler-based highlighting - Until now, if you switched to another editor while using compiler-based highlighting, the code was automatically recompiled. In this release, it has been changed. Whether the code is recompiled now depends on whether the editor is in focus. This helps the compiler-based highlighting react to external changes to source and .class files more quickly and avoid situations where valid code is red.
  • Scala build tool improvements - The IDE now adds a .gitignore file to new SBT projects. An issue where an exception was thrown when running Scala/JVM applications for the first time with Use sbt for builds has been fixed, and all of a module's transitive dependencies are now inserted as direct dependencies during import.
  • Play Framework update - To address the compatibility issue between older Play Framework versions (2.8 and below) and JDK 17, a warning has been introduced that notifies you about using incompatible versions of Play and JDK in the Play wizard.
  • Other improvements
    • Introduced new icons: one for the Scala language in the New Project wizard and another for SBT in View | Tool windows.
    • You'll now notice subtle enhancements in how inlay hints are presented, with rounded corners and improved alignment.
    • Added Scala documentation to the Settings | Editor | CodeStyle help page.
    • In worksheets, compilation errors are once again reported correctly in the build window when using Scala 2.13.12.
    • Imports are no longer incorrectly marked as unused before the first code compilation.
    • You can now pin down the X-Ray feature, ensuring it remains active even after releasing the Ctrl key.

Version Control Systems

  • In-editor code review - Introduced an enhanced code review experience for both GitHub and GitLab users with the implementation of a new review mode. Integrated within the editor, this feature facilitates direct interaction between authors and reviewers. Upon checking the pull/merge request branch, review mode activates automatically and pink markers appear in the gutter, indicating that code changes are available for review. Clicking on these markers reveals a popup displaying the original code so you can quickly identify what has been changed. Gutter icons help you swiftly initiate new discussions, as well as view and hide existing ones. They also provide easy access to comments, making it easy to review, reply, and react to them.
  • Option to display review branch changes in a Log tab - This release streamlines the code review workflow by offering a focused view of branch-related changes. For GitHub, GitLab, and Space, it is now possible to see changes in a certain branch in a separate Log tab within the Git tool window.
  • Support for reactions on code review comments - This release brings support for posting reactions to review comments for GitHub pull requests and GitLab merge requests, with a set of emojis already available to choose from.
  • Statuses of CI checks in the Git tool window - Introduced a new column in the Log tab of the Git tool window, allowing you to easily review the results of GitHub commit checks performed by your CI system.
  • Create pull/merge requests from push notifications - After successfully pushing your changes to the version control system, the IDE will now alert you with a single notification informing you about the successful push and suggesting an action to create a pull/merge request.
  • Visual indicators for pending GitHub updates - Introduced visual indicators to inform you about pending updates within your code review workflow. When there are changes that require your attention, a dot will appear on the tool window icon. Unseen pull requests will also be marked with a blue dot, ensuring you don't miss updates in your code review process.
  • Preventing large file commits to repositories - To help you avoid version control rejections due to oversized files, the IDE now includes a pre-commit check that prevents you from committing such files and notifies you of the restriction.
  • Allow unrelated histories merge option - The Merge into dialog now has an Allow unrelated histories option in the drop-down menu. When selected, it allows two branches to be merged even if they have no common history.
  • Branch filter for the History tab in the Git tool window - In the Git tool window, the Show all branches button has been replaced with a branch filter, allowing you to review changes made to a file within a designated branch. The orientation of the toolbar has also been adjusted, positioning it horizontally for improved usability.
  • Stash tab in the Commit tool window - For users who rely on stashes to store temporary uncommitted changes, a dedicated tab has been introduced within the Commit tool window for convenient access. If you use both stashes and shelves, you have the option to enable a combined Stashes and Shelves tab via a corresponding checkbox in Settings/Preferences | Version Control | Git.
  • Option to exclude folders and files from comparison - In the diff viewer, you can now specify folders and files to be ignored during the comparison process in order to focus solely on relevant changes. Just right-click on any file or folder you don't want to appear in the comparison results and select Exclude from results from the context menu.
  • Improved search in the Branches popup - In the Branches popup, you can now filter search results by actions and repositories for quicker and more precise navigation within your version control system.
  • Git tab removed from the Search Everywhere dialog - The Git tab has been removed from the Search Everywhere dialog by default. If you want to bring it back, you can do so via the Show Git tab in Search Everywhere checkbox in Settings / Preferences | Advanced Settings | Version Control. Git.

Build Tools

  • Opening-speed boost for Maven projects - IntelliJ IDEA now constructs the project model by parsing the pom.xml files. This makes it possible to get a working project structure in seconds while the complete project model with all the dependencies is built in the background, allowing you to dive into the project without waiting for the full sync to finish.
  • Support for the Maven Shade Plugin's renaming workflow - Added support for the Maven Shade Plugin's renaming functionality. Now, IntelliJ IDEA is aware of the renaming workflow, providing accurate code highlighting and navigation when working with your shaded JAR and its dependencies.
  • Direct access to source files from the quick documentation popup - The quick documentation popup now provides an easy way to download source code. Now, when you're viewing documentation for a library or dependency and need to access its source code, you can simply press F1. The updated popup will provide a direct link you can use to download the required source files, streamlining your workflow.
  • Maven repositories in the Maven tool window - The list of Maven repositories, along with their indexing statuses, is now displayed in the Maven tool window, instead of its previous location in the Maven settings.
  • Gradle version support update - Starting from this version, IntelliJ IDEA no longer supports projects using Gradle versions older than 4.5, and the IDE will not perform Gradle sync for projects with unsupported Gradle versions.

Run/Debug

  • Inline breakpoints for multiple statements - IntelliJ IDEA now offers a more convenient workflow for setting breakpoints in lines containing lambda functions or return statements. Once you set a breakpoint by clicking on the gutter, the IDE automatically displays inline markers where additional breakpoints can be set. Each breakpoint can be configured independently, unlocking advanced debugging capabilities.
  • Folded library calls in the call stack - Library calls are now folded by default in the Debug tool window's call stack, helping you maintain your focus when browsing your code. However, if you need to verify a library call sequence, you can expand the group and explore the frames accordingly. To reveal the list, use the Filter icon in the toolbar or call the context menu and disable the Hide Frames from Libraries option.
  • Conditional statement coverage - IntelliJ IDEA now shows which line of code has an uncovered condition and specifies any conditional branches or variable values that are not covered. This feature is enabled by default, and you can control it in Settings/Preferences | Build, Execution, Deployment | Coverage.
  • Code coverage settings moved to the main IDE settings - Code coverage settings have been moved from the Run Configuration popup to Settings/Preferences | Build, Execution, Deployment | Coverage. This shift eliminates the need to individually update the configuration for each test run to select a coverage runner or enable advanced features, like tracking which tests cover a specific line of code.
  • Simplified importing for JaCoCo test coverage reports - It's now easier to import, browse, and analyze code coverage data that the JaCoCo runner gathers in your CI/CD pipeline. A direct link for importing JaCoCo reports now appears in the Coverage tool window if no reports are displayed there. The window's toolbar has also been updated with an import icon that allows you to retrieve the JaCoCo report as an .exec file.

Frameworks and Technologies

  • Improved bean completion and autowiring for Spring - IntelliJ IDEA now offers autocompletion for all beans from the application context and automatically autowires them. If a bean autowires dependencies via the constructor, the related field is automatically wired through the constructor as well. Likewise, if dependencies are injected via fields or via Lombok's @RequiredArgsConstructor annotation, the new bean is wired through the field automatically.
  • Enhanced Spring diagrams - Accessing Spring model diagrams has been made easier. You can now call them using bean line markers or by using an intention action (Alt+Enter) on Spring classes. New icons have been introduced for Spring diagrams, enhancing the visualization of Spring stereotypes like components, controllers, repositories, and configuration beans. Additionally, you can now conveniently toggle the visibility of beans from libraries, which are hidden by default.
  • HTTP Client improvements
    • The HTTP Client in this release now offers more authentication options, including the PKCE Authorization Code and Device Grant flows.
    • It also supports extra parameters for token and authentication requests, in addition to automatically handling code_challenge generation and code_verifier passing for token retrieval during PKCE requests.
    • The HTTP Client's upgrade to Netty as its low-level networking library enables SSL, proxies, and HTTP/2 support, facilitating the implementation of HTTP/2.
    • The HTTP Client's toolbar has been revamped to align with the style of the new UI, providing a more polished and cohesive appearance.
  • Endpoints tab in Search Everywhere - Enhanced the Search Everywhere dialog by introducing an Endpoints tab, which appears in projects where URL search results are pertinent. Currently, the IDE automatically includes this tab when it detects the presence of Spring, Micronaut, Ktor, or Quarkus technologies in your project.
  • Code completion for HTTP headers - HTTP headers are now easily completed in all common scenarios, such as with Spring WebClient and REST Assured tests. When an expected value is encountered, a completion popup appears automatically.
  • Optimized JSON schema processing - The code behind JSON schema validation and completion has been optimized. As a result, the IDE now handles these tasks faster and with reduced memory consumption. In real-life files with Azure Pipelines, schema inspections are now 10x as fast.
  • Quarkus updates - Introduced a new settings editor for Quarkus run configurations. Now the Run/Debug Configuration dialog offers an improved UI for both Maven and Gradle projects, with easy access to popular settings like Run profile and Environment variables. For your convenience, the Quarkus Dev UI is easily accessible via a new icon added to the Run tool window's toolbar.
  • Support for OpenRewrite - This release integrates OpenRewrite, expanding the IDE's existing refactoring capabilities and providing you with a toolkit for improving code quality, consistency, and maintainability. Using OpenRewrite's recipes, you can modernize legacy code, optimize performance, and handle complex migration tasks such as upgrading to a new Spring Boot version.
  • WireMock server support - WireMock support has been implemented via a plugin that you can install from inside the IDE or get from JetBrains Marketplace. This integration includes schema completion for JSON configurations, the ability to generate WireMock stub files from the Endpoints tool window, and a built-in run configuration that allows you to spin up your servers directly from the editor. This addition lets you swiftly create test data servers or stubs, simplifying the development of web UIs and microservices.
  • Enhanced Terraform support - Improved Terraform support that simplifying the process of creating, managing, and scaling your infrastructure. The IDE now streamlines initialization via an explicit suggestion to run Terraform init, and offers extended code completion capabilities for more than 3,900 third-party Terraform providers. Additionally, the IDE introduces support for Terraform's template language (tftpl), enabling dynamic templating with the option to seamlessly integrate it with your preferred programming language.

Database Tools

  • Local filtering in the data editor - You can now swiftly filter rows by column values without sending queries to the database. This local approach only impacts the current page, though you can adjust the page size or fetch all the data if you need to extend the scope. To disable all local filters, deselect the designated Enable Local Filter icon.
  • Simplification of sessions - This release streamlines query execution by eliminating the need to manually select sessions. Instead, to attach a file, you simply need to choose the data source, rather than the session. Additionally, launching functions no longer requires selecting a session; you can now opt to run functions directly from the console or file. These changes aim to minimize the learning curve with the tool, reducing unnecessary steps and enhancing overall usability.

Web Development

  • Quick documentation improvements - The quick documentation popup has been significantly enhanced. It now supports syntax highlighting for code blocks. In TypeScript, it now shows interface members, enum constants, and type alias bodies. You can use the Show more link to expand the full list of type members and navigate to the referenced types. Additionally, it's now possible to navigate between multiple declarations of interfaces, type aliases, enums, functions, and other entities using the paging control at the top of the dialog.
  • Quick-fixes for React props and state creation - This release introduces several new quick-fixes for React that let you create props and states on the fly. You can apply these quick-fixes using the shortcut Alt+Enter.
  • Language Services widget - You'll find the new Language Services widget on the status bar, providing insights into the active language services for the current file and project. You can restart services or navigate to their settings directly from this widget.