IntelliJ IDEA 2024.2

Released: Aug 7, 2024

2024.2 での更新項目

機能

Key Highlights

  • Improved Spring Data JPA support - Added the capability to run Spring Data JPA methods in the IDE. This new feature allows you to see which query a method will generate without running the application and analyzing log files. You can now use a gutter icon to execute any repository method directly in the JPA console.
  • Improved cron expression support - Working with cron expressions in your code is now easier than ever. When implementing scheduled services with Spring, Quarkus, or Micronaut, you can easily understand cron expressions thanks to the descriptions that appear right next to them. Additionally, the autocompletion feature provides pre-filled examples that you can instantly add and adjust instead of writing cron expressions from scratch.
  • GraalJS as the execution engine for the HTTP Client - The JavaScript execution engine used in the HTTP Client has been upgraded to GraalJS. This allows you to use all GraalJS features, including full support for the ECMAScript 2023 specification, when testing endpoints with IntelliJ IDEA's HTTP Client and using JavaScript in .http files to handle the results.
  • Faster time to code - In this release, the startup experience has been enhanced, enabling you to dive into coding significantly faster. Reduced wait times are possible thanks to upgrades that make the IDE functional with an incomplete project model and enable access to key features during indexing, including code highlighting, code completion, intention actions, test launching, active gutter markers, Lombok support, and more.
  • Improved stability and performance for Kotlin in K2 mode [Beta] - This release improves K2 mode, a new Kotlin support mechanism that enhances the IDE's stability and performance in addition to laying the groundwork for future Kotlin language features. In this release, K2 mode now supports gradle.kts scripts, Kotlin Multiplatform (KMP) projects, all major refactorings, code highlighting, debugging, and more. Benchmarks show that K2 mode nearly doubles code highlighting performance on the IntelliJ IDEA Ultimate source base.

User Experience

  • Improved full line code completion - In this release, the process of accepting full line code completion suggestions has been made more intuitive and precise. Inline code completion suggestions now include code highlighting, and new shortcuts allow you to accept individual words or entire lines from longer suggestions. How accepted changes are integrated into your code has also been refined, eliminating formatting and related issues.
  • The new UI made default for all users - With this release, the new UI is now the default for all users, leaving the classic one available as a plugin. The new UI is clean and modern, providing bigger, easier-to-use controls, a consistent color palette, light and legible icons, increased contrast, and better accents.
  • Preview option in Search Everywhere - The Search Everywhere dialog now includes an option to preview the codebase elements you're searching for. Enabling this feature through the Preview icon on the dialog's toolbar will cause a preview pane to appear under the search results, offering additional context and making it easier to navigate through your project.
  • Proxy setting auto-detection enabled by default for new users - IntelliJ IDEA now automatically detects system proxy settings configured on your machine and uses them by default, facilitating seamless interaction with external resources and services.
  • Updated window controls on Linux - On Linux, IntelliJ IDEA previously placed window controls on the right-hand side of the IDE. Now it automatically adjusts their placement to match the window control settings specified in your Linux desktop configuration. This change allows you to maintain a layout that suits your personal preferences. Additionally, the window control buttons have been redesigned to provide a look and feel that more closely matches your OS.
  • Improved Customize Main Toolbar dialog - The layout and behavior of the UI elements in the Customize Main Toolbar dialog has been redesigned, making it more intuitive and organized. It's now easier to search for, add, and delete actions in the main toolbar.

AI Assistant

  • JetBrains AI Assistant 2024.2 introduces significant enhancements to cloud code completion, offering more accurate and faster suggestions. The UX has been reworked to better integrate AI code completion features into IDE workflows, with improvements like syntax highlighting in suggested code and incremental acceptance of code suggestions.
  • New features include AI integration in the Terminal tool window and AI-assisted VCS conflict resolution. Additionally, users can now customize prompts for documentation generation and unit test creation.

Java and Kotlin

  • Enhanced log management - This release introduces enhanced log management for Java and Kotlin. New features include highlighting for string literals and argument resolution, which allows you to navigate seamlessly from placeholders to corresponding arguments. Updated inspections now better handle a mismatched number of logger parameters, suggest converting System.out.println statements to logger calls, and offer a quick-fix to add guards for logger calls.
  • New Expression is compared to itself inspection for Java - A new inspection reports cases where an expression is being compared to itself instead of another. While such comparisons can occasionally be intentional, they are usually the result of an oversight. This inspection helps you identify and address these potentially unintended comparisons, improving code accuracy and reliability.
  • Change Signature refactoring inlay hint for Java - To make the Change Signature refactoring more accessible and intuitive, a new inlay hint has been added that appears near the modified code element. When you click on it and confirm the change, the IDE automatically updates all relevant method references throughout the codebase. This ensures consistency and reduces the risk of errors, streamlining your refactoring process.

Scala

  • Better code highlighting for Scala - This release includes several improvements to error and syntax highlighting. It now highlights class fields defined in parameter clauses as fields instead of parameters. Named arguments are now highlighted in a distinct color, making them easier to identify in your code. The regex syntax inside Regex("...") is highlighted just as the regex syntax in "...".r is. Some issues have been fixed causing valid code to be highlighted in red after refactoring or because the type of the symbol couldn't be resolved. In many cases, semantic highlighting is now applied as you type. In addition, the IDE is now more responsive when you fix errors, removing the red code right after the fix.
  • Better Scala 3 support - The new release includes many improvements to Scala 3 support. For-comprehensions are now always handled correctly when used together with the fewer braces syntax. Support for export clauses and extension methods has been improved. Additionally, the IDE now correctly handles constructor annotations, and import suggestions include enum cases.
  • Better code completion - The IDE can now automatically fill out all named arguments of methods and autocomplete literal values of union types in Scala 3. Enum cases are now suggested whenever an enum type is expected. This feature works with Scala 3 enums and union types, Scala 2 ADTs and enumerations, and Java enums, simplifying your coding experience by providing more relevant suggestions.
  • Other improvements - The contents of StringBuilder are now displayed as a string in the debugger. IntelliJ IDEA also offers onboarding tips for Scala. Library download progress is now visible while you import sbt projects. Additionally, the Scala support now includes the functionality of Grazie, which provides advanced spelling and grammar checks in Scala comments.
  • Improved compiler-based highlighting - Enhanced the performance of compiler-based error highlighting. Outdated error highlighting information is no longer applied when the file has been modified. Additionally, IntelliJ IDEA now supports Scala compiler diagnostics, making them available as regular quick-fixes for easy application.

Code Editor

  • Support for math syntax in Markdown files - IntelliJ IDEA can now natively render mathematical expressions in Markdown files. When working with Markdown, you can use $ to insert inline math expressions and $$ for code blocks with math content.
  • Language-aware sticky lines - You can now choose the languages you want sticky lines to appear for. You can also tailor the feature to your preferences.

Profiler

  • Focus on project methods in the profiler - IntelliJ IDEA's built-in profiler has been upgraded to simplify investigating performance bottlenecks. Now, IntelliJ IDEA puts more emphasis on your code by fading out and collapsing library calls in the profiler. This ensures that you get data focused on the calls in your project that most affect application performance, filtering out methods that don't require your attention. If you need a detailed view of library calls, you can expand the hidden calls to see the entire call sequence and corresponding execution times.

Run/Debug

  • Performance charts in the Run tool window - To make performance analysis faster and more efficient, the new Performance tab has been implemented in the Run tool window. It provides real-time CPU and memory charts and allows you to pinpoint performance bottlenecks by capturing your code's execution time and viewing it directly in the editor. Additionally, you can capture memory snapshots to examine objects and identify the root causes of memory leaks.
  • Enhanced Kotlin debugging experience - This release brings a significant improvement to the Kotlin debugging experience. You can now use Step Over to iterate over forEach loops and get into inline function lambdas without skipping important code. You no longer need to remember to use Step Into for inline functions, which helps ensure you don't miss critical parts of your code. You can now step through forEach, let, and filter inline functions just as you would step through regular loops and conditions.
  • String variable visualizers for JSON, XML, and other formats - Debugging and browsing long string variables with complex data formats is now much easier. The updated debugger offers properly formatted visualizations for string variables with strings encoded in JSON, XML, HTML, JWT, and URL. Simply click the View hyperlink next to a variable - the relevant visualizer is automatically chosen based on the contents of your variable.
  • Test coverage for changes in the current feature branch - This release further improves your ability to quickly check and improve test coverage locally without needing to go through the slow process of using the CI/CD pipeline. The Coverage tool window now shows only the classes that have been changed in your current feature branch, allowing you to check the test coverage for your recent changes without browsing the entire project status. To review the entire project's test coverage and see all classes, disable the Show Only Modified Classes option.

Build Tools

  • Improved experience with Gradle build scripts - This release offers new navigation and highlighting features for Gradle build scripts. First, the IDE now provides smooth and accurate navigation to the Gradle plugins declared in build scripts. Additionally, navigation between version catalog files and build scripts in the libs.versions.toml file has been implemented, as well as an option to run registered tasks directly from the gutter.
  • Incremental Maven project re-sync - The re-sync workflow for Maven projects has been made faster. After the initial full sync, the IDE now detects changes in specific parts of the project and only re-syncs those parts rather than the entire project.
  • Action to invalidate build system caches - You can now clear build system caches, allowing you to instantly resolve issues related to the structure of Maven, Gradle, or sbt projects - such as those caused by an improper data import.

Version Control Systems

  • Import statement conflict resolution - You can now easily identify and resolve conflicts in import blocks for Java and Kotlin. In the Merge window, click on the gear symbol and select Resolve Conflicts in Import Statements.
  • Tags in the Version Control widget - Tags now have a dedicated node in the Version Control widget, making it easier to check them out. The node is displayed by default, but if you prefer to hide it, simply click the gear icon and uncheck the Show Tags option.
  • Improved user experience with the Log tool window - All settings related to the Log tool window have been consolidated into a dedicated settings page. You can also now open the Git log as a tab in the editor, providing more workspace and easier navigation through the list of commits and related details. This action is also available through the drop-down menu in the Log tool window's toolbar.
  • Enhanced user experience with local history - The UI of the Local History dialog has been modernized. Additionally, when accessed for a directory, the dialog now features a diff view alongside the list of changes, making them easier to understand. To simplify reviewing changes in complex projects, the Local History action has been made available for multiple files or directories simultaneously. In the Project tool window, select multiple files or folders and choose Local History | Show History to view a popup with the change history for your selections.
  • Improved commit graph in the Log tab - Refined the color encoding and layout of branch lines for the commit graph in the Log tab of the Git tool window. Important branch lines now consistently remain on the left-hand side of the graph and retain their designated colors, making them easier to identify and follow.
  • New First Parent and No Merges in Graph Options - Added new Git options to simplify viewing branch histories. Use the First Parent option to focus on the mainline changes by hiding individual commits from merges. Alternatively, you can filter out merge commits entirely with the No Merges option. Both options are now available under the Graph Options icon in the Git tool window, making it easier to track changes in your branches.

Terminal

  • The New Terminal [Beta]:
    • The new terminal in this release introduces updates that enhance functionality and the user experience. Key improvements include AI-powered command generation, which allows you to describe a command in natural language and have AI create it for you.
    • You can now choose between single-line or double-line settings for better space utilization or readability, and custom shell prompt settings are now supported.
    • Command completion has been enhanced for Git aliases and branches, npm packages, PHP commands, and Ruby CLIs.

Frameworks and Technologies

  • Autocompletion for Micronaut and Quarkus beans - IntelliJ IDEA now provides bean autocompletion and injection for Quarkus and Micronaut applications. When you need to inject a bean into your code, simply start typing its name and select it from the code completion popup. The IDE will automatically add a constructor parameter or field with the @Inject annotation, depending on your code style.
  • Extended JPA support - Extended IntelliJ IDEA's JPA support with several new inspections. These enhancements enable the IDE to detect and fix issues that may cause performance degradation or runtime errors when using Lombok annotations with JPA entities. The IDE can also identify missing parameters in Spring Data JPA repositories, check if all associations are correctly marked, and prevent accidental deletions by detecting the CASCADE parameter for @ManyToMany associations.
  • Ktor development mode support in run configurations - This release provides an easy way to enable Ktor's development mode in run configurations. This mode is now set by default when creating a new run configuration and can be managed in the updated Run/Debug Configurations dialog. In addition, the UI of this dialog has been made cleaner and more user-friendly for Ktor users.
  • Ability to trigger Spring @Scheduled methods in debug sessions - This release features debugging capabilities for asynchronous @Scheduled methods in Spring Boot. This update eliminates the need to manually adjust a method's schedule and wait for it to start. Simply set a breakpoint and trigger the method's execution directly from the IDE whenever you need.
  • Jakarta Data support - With this release, support for Jakarta Data has been introduced. The IDE now provides coding assistance and inspections for repositories, including method name completion and validation based on the data model as well as parameter validation based on the method name. Jakarta Data repositories are displayed in the Beans tool window to simplify navigation. Additionally, Jakarta query language support is now available, offering syntax highlighting, statement validation, and statement autocompletion based on the data model.
  • Enhanced Terraform support - IntelliJ IDEA's coding assistance for Terraform has been significantly extended by making full line code completion available for it. Additionally, essential code insight features such as context-aware code completion, refined syntax highlighting, and the error detection system with quick-fix suggestions have been improved for Terraform. A quick documentation feature has also been added that displays tooltips when you hover over elements, providing instant information to help you use Terraform resources more effectively without interrupting your workflow.
  • HTTP Client improvements:
    • Introduced valuable updates to the HTTP Client. The new XPath function allows you to query elements directly from XML and HTML documents. Additionally, numerous methods have been added for manipulating XML and HTML documents, eliminating the need to parse XML manually.
    • The HTTP Client now also supports iterating through variable collections, allowing you to compose a single HTTP request with a JSONPath collection and automatically send requests for each element in the collection. Furthermore, you can access specific collection items in post-processing scripts using JSONPath syntax.
    • Working with APIs that provide specific methods has been streamlined. To work with these APIs, you can add custom methods on the fly with a quick-fix or enter them with a comma-separated list.

Remote Development and Collaboration

  • Streamlined setting management in remote development - The JetBrains Client and your desktop IDE now share the same settings, so any setting changes made in the locally installed IDE are automatically synced with the remote IDE via the JetBrains Client, ensuring your development environment remains consistent. The scope of shared settings has been extended to include console, debugger, and smart key configurations, among other things.
  • Reverse port forwarding for remote development - Added reverse port forwarding for remote development workflows. This new feature allows the remote IDE to connect to ports available on the client machine. It is particularly useful for mobile development and connecting to local databases.
  • Enhanced screen sharing in Code With Me - Screen sharing in Code With Me calls is now redirected to the browser, allowing you to specify the sharing source - either a specific window or the entire screen. Previously, all screens and windows were shared by default, with no option to choose a specific source.
  • Simplified Code With Me session startup - The Code With Me session startup popup has been redesigned to streamline the process. It now includes all permission settings, reducing the steps required to start a new session, and permissions are preserved, allowing every session to start with just two clicks. Additionally, permissions can be changed during the session directly from the popup.
  • End Session popup - A popup will now appear if no one has joined your Code With Me session after 30 minutes. You can choose to end the session, keep it active, or close the popup. If no action is taken within three minutes of the popup appearing, the session will automatically end.

Database Tools

  • AI Assistant features - In this release, new AI Assistant features have been introduced for databases. With the text-to-SQL feature, you can generate SQL code directly in the editor by clicking Generate Code with AI and entering your prompt. You can accept, recreate, or refine the code, and take it to the AI chat if you have further questions. Additionally, AI Assistant can help with modifying tables, allowing you to request changes like switching all VARCHAR data types to CHAR. It can also help you understand and fix SQL problems, suggesting explanations and fixes. In addition, you can attach your database schema to the AI chat by typing # followed by the name of the database schema you want to add to the prompt.
  • Customizable data import via scripted loaders - You can now import data from tabular files using customizable scripted loaders for the Excel, JSON, Parquet, and shapefile formats. Drag your file from the Project tool window to the schema in the database explorer and configure the settings in the Import dialog. In addition, you can view these files in the data editor with a single click in the Project tool window.
  • Related Rows action in the floating toolbar - You can now easily access rows related to a given cell by selecting the cell and then clicking the Related Rows icon. You can specify whether this feature appears in the floating toolbar via the Customize This Toolbar option in the kebab (three vertical dots) menu.
  • Automatic value completion - Value completion is now automatic, and performance tests show promising results. Keep in mind that this feature operates entirely locally, so completion variants are based on the other values already loaded in the current column.

Web Development

  • Directly run and debug TypeScript files - You can now run and debug TypeScript files without any additional setup. You can execute them from different entry points, including the file context menu, the Run widget, and the Current File configuration.
  • Prettier integration is enabled by default - In this release, Prettier integration is enabled in new projects with a direct prettier dependency in their root package.json and a Prettier configuration file at the same level. This feature simplifies the setup process, ensuring that Prettier integration is enabled out of the box.
  • Improved support across major web frameworks - With this release, IntelliJ IDEA is able to resolve paths for frameworks that use file-system-based routing. It can resolve link paths based on your project's file system, providing autocompletion and navigation for Next.js, Nuxt, SvelteKit, and Astro. There is also support for new Svelte 5 snippets and render tags. Language server protocol (LSP) support has also been implemented for Astro and Vue Language Service v2, improving code completion and the overall developer experience.

JetBrains Runtime

  • Switch to JBR21 - IntelliJ IDEA is transitioning from JetBrains Runtime 17 (JBR17) to JetBrains Runtime 21 (JBR21). Starting with this release, all IDE updates will come with JBR21, offering enhanced security and performance as well as Wayland rendering support for Linux.

Other

  • Bundled localization plugins - To improve the IDE experience for native speakers of Chinese, Korean, and Japanese, support for these languages is now bundled.