IntelliJ IDEA 2021.2

Java向けのプロジェクト全体の分析と、変更の保存時にトリガーできる新しいアクションを追加
7月 29, 2021
新バージョン

機能

  • Key updates
    • Project-wide analysis for Java projects - Added a new feature for tracking errors throughout the whole project before compilation - project-wide analysis. The IDE will display all the found errors, including those that are detected only by scanning the whole project. The feature works with small and medium-size projects.
    • Actions on save - Added a number of actions that will be initiated by saving the project, including reformatting code and optimizing imports.
    • New UI for managing Maven and Gradle dependencies:
      • Added Package Search, a powerful new interface to manage your project dependencies. With Package Search, you can find new dependencies, easily add them, and manage existing ones. The new plugin will show you information about each dependency, including whether any updates are available.
      • Added an inspection that lets you apply available updates directly in the editor.
  • Editor
    • Updated inspections and quick-fix descriptions - The inspections and quick fixes are not just helpful for coding but also described in detail. The updated descriptions explain what changes the inspections suggest and the reasoning behind them. Some inspections come with usage examples.
    • Diagrams structure view - Diagrams have been made more informative - they now come with the Structure view containing a map of your diagram with a small preview of the selected block and its neighbors. The new Structure view supports scaling, canvas moving, magnifier mode, layout change and exporting to an image.
    • Multiple copyright years - Your project’s copyright notice can now include both the project creation year and the current version year.
    • Improved Markdown support:
      • It is now possible to convert .md files from/to different formats (.html, .docx, .pdf).
      • You can change the size of an image, add a description and drag and drop images instead of writing an HTML tag with a file path.
      • Added a new lightweight toolbar, which has all the most popular actions and will only appear on selection so as not to distract you from important tasks.
  • User Experience
    • Quick access to Eclipse projects - IntelliJ IDEA can now detect Eclipse projects stored locally on your machine and it allows you to open them from the Welcome screen.
    • Advanced Settings - If you need to configure some use case specific options, you can do it in the new Advanced Settings node.
    • Organize tool windows by drag and drop - It is now easier to drag and drop a tool window to the desired place within the main IDE window or in a separate window. You can drag it by clicking and holding the tool window name bar and drop it in any highlighted place.
    • Automatic cache and logs cleanup - IntelliJ IDEA automatically cleans up any cache and log directories that were last updated more than 180 days ago. This process doesn’t affect system settings and plugin directories. You can initiate the process manually via Help | Delete Leftover IDE Directories.
    • Missing plugin notifications - If your project uses a framework that works in IntelliJ IDEA via a plugin, the IDE will notify you and offer to enable it directly from this notification.
    • New navigation option in Preferences/Settings - Simplified navigation in Preferences/Settings by adding arrows to the top right-hand corner of the window. They allow you to quickly jump back and forth between the sections you’ve opened.
    • Update notifications from the Toolbox App - When any product updates appear in the Toolbox App, your IDE will now inform you. If there is a new version available for download, you’ll be able to upgrade to it right from IntelliJ IDEA. Toolbox App 1.20.8804 or later is required to use this feature.
    • Quick access to Power Save mode - Added a Power Save mode to help you extend the battery life on your laptop. To make this mode easier to access, you can manage it from the status bar.
    • Accessibility updates - Added a number of helpful updates for coding with the enabled screen reader mode on Apple macOS. Available suggestions for code completion, the content of the selected combo box and combo box lists and the results of your queries in Search Everywhere have been voiced.
    • Improved UI responsiveness - Managed to avoid UI blocks when using context menus, popups and toolbars. Moved certain operations that require indices off the UI thread, which should help prevent freezes in other situations.
  • Java
    • Visibility-based color settings - It is now easier to distinguish between public, protected, and private Java members (methods, fields, and classes) as you can configure the color settings for them in Preferences/Settings | Editor | Color Scheme by unfolding the Visibility node.
    • New JavaFX project wizard - Configuring a new JavaFX project just got easier. In just two steps, you can add a project SDK, language, desired build system, test framework and one or several frequently used libraries, which come with short descriptions.
    • New Inspections - Added a range of new inspections to address particular use cases in Data Flow Analysis. The new Write-only object inspection warns you when you modify an object but never query it for some custom classes defined in your project and the standard library.
  • Kotlin
    • Automatic ML-completion - Starting from this release, Kotlin code completion works based on the machine learning mechanism by default. Code suggestions are prioritized more carefully as the IDE relies on the choices of thousands of real users in similar situations.
    • Run tests before code analysis finishes - Previously you had to wait for code analysis to finish before you could start running your tests. In the current version, you can launch tests immediately after opening the file by clicking the Run test icon in the gutter.
    • Debugger updates - Introduced some useful improvements and updates to the coroutine agent in the debugger. 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.
    • More room for action when indexing - While the IDE is indexing a project you can now run and debug your application. The buttons associated with Run/Debug Configuration are active when indexing.
    • Kotlin support for Microsoft Windows Subsystem for Linux (WSL) 2 and Run Targets - In IntelliJ IDEA 2021.1, WSL 2 support and the Run Targets feature was introduced. In this release, you can use these features for Kotlin.
    • Inspection to simplify call chain on collection type - In this release, a useful inspection that helps you simplify the syntax and combine several calls into one when calling methods in a chain inside a collection has been added.
    • Intention action for buildString conversion - In previous versions, you manually typed buildString to customize your code. The new intention action allows you to apply it automatically in just two clicks.
  • Scala
    • Better Scala 3 support:
      • Indexing is now fast, precise and version-agnostic.
      • You can now create both sbt and .idea-based Scala 3 projects, as well as Scala 3 SDKs, normally.
      • The editor can handle significant indentation better.
      • Added support for Scala 3 constructs in Scala 2 projects (-Xsource:3).
      • There are improvements in the debugger, formatter, REPL, auto-import, enums, extension methods and many others.
    • Compiler-based highlighting - Added the ability to use the Scala compiler for error highlighting. Please note that, even though 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. So unless there are lots of false errors in the code, the built-in error highlighting is recommended.
  • JavaScript
    • Reload pages in browser on save - You can now automatically update the pages in a browser as you edit and save your HTML, CSS and JavaScript files. All browsers are supported.
    • Rename refactoring for React useState hooks - You will no longer need to waste time on refactoring useState values and functions one by one – IntelliJ IDEA can now rename both for you.
    • Auto-import for require() - The IDE can now add missing import statements as you complete CommonJS modules – required imports will be inserted on code completion.
  • Profiler
    • Support for Async profiler on Microsoft Windows and Apple M1 - 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.
    • Support for Async profiler 2.0 - IntelliJ IDEA now has support for Async Profiler 2.0. It works via the new Async Profiler configuration, combining the power of the CPU and Allocation profilers.
    • Support for a sunburst diagram - In IntelliJ IDEA 2021.2, when you double-click an item on the Classes tab, the Retained Objects tab shows data for the selected item in the form of a sunburst diagram. If you are more used to analyzing data displayed in a tree, you can now find it in the Dominator Tree tab.
  • Build tools
    • JLink artifacts - If you want to create a custom JDK that contains only the modules and dependencies you need when working on a Jigsaw project, you can add new JLink artifacts to your project in the Project structure window.
    • Redesigned Gradle configurations - Reworked the UI of the Gradle Run/Debug Configurations. The basic parameters are now conveniently grouped in one screen. You can add more options based on your needs.
    • Faster indexing for projects in WSL 2 - For project files stored in WSL 2, you use a daemon that transfers the content of the files between Linux and Windows via a socket. This allows you to increase the indexing speed, as it depends on how fast the IDE reads the file content. Depending on the language you use, the speed increase may vary.
    • Ant support in WSL 2 - It is now possible to execute Ant tasks in WSL 2.
  • Version control
    • Changes to pre-commit checks:
      • Expanded the list of possible pre-commit actions with the ability to execute tests. When you tick the Run Tests checkbox in the Before Commit section, your IDE will test the applied changes and notify you if anything goes wrong.
      • Added the ability to customize the Analyze code and Cleanup options by clicking Choose profile next to them.
      • The progress and results of all the pre-commit checks appear in the Commit area, without disturbing you with additional modal windows.
    • GPG signature - This release offers a way to secure your commits by enabling Git commit signing with GPG.
    • Changes instead of Default Changelists in new projects - You no longer need to use Default changelists as the name for the node that stores uncommitted changes in new projects. Starting from version 2021.2, it is called Changes. Additionally, Git operations will no longer trigger automatic creation of changelists.
    • Unified Show Diff - IntelliJ IDEA displays the difference between the initial and changed files in the editor by default, no matter where you’ve invoked the Show Diff action. If tracking changes in a separate window is more convenient to you, just drag the desired file from the editor.
    • Text search in Local History revisions - You can quickly find the necessary text in the Local History revisions by typing the query in the search field in the Local History dialog.
    • Terminal
      • New Terminal options - The in-built terminal now allows you to select the cursor shape. It also offers support for Use Option as Meta key, which lets the Option ⌥ key on the keyboard act as a meta modifier that can be used in combination with other keys. For example, you can use the following shortcuts:
        • ⌥+F – go to the next word.
        • ⌥+B – go back a word.
        • ⌥+D – delete the next word.
  • Debugger
    • Preview Tab now works in Debugger - Previously when you stopped at a breakpoint, stepped through the code, navigated between frames or used the "prev/next frame" actions, the IDE opened the files in multiple tabs. In this release, you can enable the preview tab feature for Debugger in Settings/Preferences | General | Editor Tabs. If it is on, these files will open successively in one tab.
  • Frameworks & Technologies
    • Microservices diagram - IntelliJ IDEA lets you display microservice interactions in a diagram, which you can build by clicking the respective icon in the Endpoints tools window. This new diagram offers the option 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.
    • Automatic migration from Java EE to Jakarta EE - The new Migrate... refactoring helps you quickly and painlessly migrate a project or module from Java EE to Jakarta EE. After you initiate it, the Refactoring Preview shows all the found usages of Java EE imports. You can then check through and finalize the process.
    • Automatic download of shared indexes for new Spring Boot projects - When you create a new Spring Initializer project, the IDE will download shared indexes automatically, reducing indexing time and speeding up IDE startup.
    • Support for JPA Entity Graph - Added support for an Entity Graph which you can define with the @NamedEntityGraph annotation. Your IDE allows you to specify a unique name and the attributes (@NamedAttributeNode) for this annotation using code completion, error detection and navigation to the related entity by clicking on an attribute.
    • Support for cache annotations in Micronaut and Quarkus - Cache annotations for Micronaut and Quarkus are now supported in the IDE. Added gutter navigation between cache name usages, as well as the ability to use Find usages and the Rename refactoring for cache identifiers.
    • Better microservice navigation support in JavaScript and TypeScript - URL navigation in JavaScript and TypeScript has been significantly improved. For client-side code (for Angular or Axios), URL references have been added for the $http service and HttpClient request method calls and URL completion works based on available server-side frameworks and OpenAPI specifications. For server-side, Express users can see Route handlers in the Endpoints tool window and search for Express route declarations via Navigate | URL Mapping.
    • gRPC endpoints displayed in the Endpoints tool window - Added support for yet another framework – gRPC. For now, it is possible to see the gRPC endpoints in the Endpoints tool window.
    • Ktor integration - Ktor, a web application framework for creating connected systems, is bundled with IntelliJ IDEA Ultimate. Right from the welcome screen, you can create a new Ktor project for developing server-side or client-side applications and configure the basic project settings and various features supported by Ktor.
    • Protocol Buffers plugin maintained by JetBrains - The Protocol Buffers plugin is now bundled with IntelliJ IDEA Ultimate and the JetBrains team fully maintains it.
  • Docker
    • Work with Docker via SSH - It is now possible to connect to Docker via SSH.
    • Services synchronization - It is now possible to display Docker Compose applications in the Services tool window even if they are not running.
    • New icons for service states - Added new icons for the different states of your Docker Compose services. To get accustomed to them, you can read the tooltips that appear when you hover over each icon.
    • Improved logs - Implemented some changes to the Docker Compose logs. Every service node features a log and the container logs include the option to show timestamps and previous sessions.
    • More options in Run/Debug Configurations - Additional options for Docker Compose are now available in Run/Debug Configurations. You can Enable BuildKit, Enable compatibility mode and Specify project name when you click Modify options. When you name your project, you can call it whatever you want and it won’t inherit its name from the folder that the Docker Compose application is located in by default.
    • New actions for containers - Added new buttons that allow you to start, pause, unpause and restart your containers. In addition to this, you can apply the actions to several containers at once.
    • Smart way to delete images - When you delete Docker images with dependencies, you can now specify which dependencies you want to get rid of and which should stay.
    • New Networks and Volumes nodes - Added two new nodes to the Services tool window: Networks and Volumes. The first node contains all the networks that are not related to the Docker Compose application. The second includes all the Docker Volumes. It is easy to delete volumes in the same way as you would images.
    • Support for version 3 of Docker Compose - Added support for version 3 of the Docker Compose file format. As a result, IntelliJ IDEA now correctly validates the options available in v3 and code completion works for them.
  • Kubernetes
    • Support for alias in Helm chart dependencies - You can now use the alias field that belongs to the dependencies section in Chart.yaml (api v2) or in requirements.yaml (api v1). This field states an alternative name of the current dependency. You may need to use alias if an existing dependency is used several times and you want to distinguish between these usages. In addition, if the chart name uses symbols not applicable in GoTemplate identifiers, alias can also help you fix it.
    • Custom namespaces - Sometimes when you work with a Kubernetes cluster, you will be granted access to particular namespaces, but you won’t receive the list of all of the cluster namespaces. In this case, you can now specify the list of available namespaces in Preferences / Settings | Tools | Kubernetes.
    • Favorite namespaces - Made it easier to manage multiple namespaces and quickly find the ones you need the most. It is now possible to mark your favorite namespaces with a star. They will then appear at the top of the list, while the remaining namespaces will be sorted alphabetically.
  • Database tools
    • DDL data source - It is now possible to generate a DDL data source based on a real one. The DDL files will be created on the disk and the new data source will be based on them. That way you’ll always be able to regenerate these files and refresh the DDL data source.
    • Managing the popping up of Services tool window - When a query returns no data, there’s no need for the Services tool window to appear if it was hidden already. You can now define which operations make the Services tool window appear on your own.
    • Completion of fields and operators - Code completion now works for various types of fields and operators in the MongoDB console.
  • QA tools
    • Generate Test Data - Being able to insert a random email, name, or phone number is important when developing unit tests. As a part of the Test Automation Kit, the new Test Data plugin brings a lot of useful actions that can help you generate random data. Use the Generate menu (Cmd+N) to see all available options. If you need a specific format, you can always create your own custom data format based on regular expression or Velocity templates. All custom data types are available in bulk mode and can be shared within your team.
  • Space integration
    • Space job statuses in the Git log - Added icons for Space job statuses in the Log tab of the Git tool window to make it easier to track a job’s progress by just looking at the commits list. If you click on an icon, the IDE will open a popup with the automation info for that job.
    • Mention teammates - It is now more convenient to communicate with teammates in Space code reviews, as you can mention them with @ followed by the colleague’s name. This minor but helpful feature works in the timeline and in code comments.
    • Branch display in code reviews - Your IDE can now show related branches in the selected code review. You can see the list of branches that contain the commits made while working on the current issue in the Details tab.
  • Collaborative development
    • Synchronized code completion - You can now understand the logic behind your teammate’s actions even more precisely, as you’ll see what code completion suggestions the person you are following uses. This feature works when you are in Following mode during your Code With Me session.
    • Undo your actions - IntelliJ IDEA 2021.2 features a re-worked undo functionality that significantly improves the collaborative programming experience. The revamped undo logic enables both guests and the host to reverse their individual changes in the code. This means that upgrading to the 2021.2 version will allow you to avoid unpleasant situations where one developer accidentally deletes changes made by their peers. This improvement is particularly useful in pair and mob programming scenarios.
    • Share any screen during a collaborative session - Added screen sharing. Participants can share an application window from their computer screen, not just your JetBrains IDE, to help participants collaborate better.
    • Forward ports to your pair programming peers - Added the ability to share specific open ports with participants via an integrated proxy. So, if a host runs applications on a specific port, the guests can access it via a local host on their machine.
  • Other
    • Localized UI in Chinese, Japanese, and Korean - 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.
    • Android plugin update - The Android plugin has been upgraded to v4.2.0.
    • Unbundled plugins - After analyzing how often you use several plugins, some of them, including Resource Bundle Editor, Drools, JSP Debugger Support, CoffeeScript, Spring Web Flow, Spring OSGI, Arquillian, AspectJ, Guice, Helidon, Emma and EJB have been unbundled. If you still need any of these plugins, you can install them manually from JetBrains Marketplace.
Actions that can be triggered when you save changes

IntelliJ IDEA

Javaのソフトウェア統合開発環境

IntelliJ IDEAは、次の製品にも含まれています。

ご質問がありますか?

今すぐ JetBrains ライセンススペシャリストとライブ チャット