IntelliJ IDEA 2020.2 lets you review and merge GitHub pull requests right from inside the IDE, quickly navigate between warnings and errors in a file with the Inspections widget, view the full list of issues in a current file with the Problems tool window, and get notified if your changes would break other files. You can use Jakarta EE, and get better support for Quarkus, Micronaut, and OpenAPI.
Although the release of Java 15 will take place in September, IntelliJ IDEA 2020.2 is already prepared for it. Support for the Records feature has been updated and is now in its second preview. We’ve also added basic support for sealed classes. And, of course, IntelliJ IDEA provides full support for Text Blocks.
If you introduce errors by changing the signature of a class, method, or field that has external usages, the IDE will notify you with an inlay hint. Click on the related problems inlay hint, and the IDE will open the Find tool window with a list of all the related problems occurring in external files.
The IDE allows you to find and, if necessary, replace blocks of code that match a specific pattern using Structural Search and Replace. With IntelliJ IDEA 2020.2, you can create multiple structural search templates as inspections. For each SSR inspection, you can specify the severity level, add descriptions, and enable or disable them separately.
We’ve supplemented exception stack trace analysis with dataflow analysis. When you click on the stack trace, the IDE can take you to the exact place in your code where an exception appears, and it offers a suggestion that can help you find out why it happened.
IntelliJ IDEA 2020.2 works even better with the Stream API. Instead of having to type
and then type the right operation on the stream, you can start typing the stream method name
within the collection itself, and IntelliJ IDEA will insert
automatically. This works for any stream operation.
With IntelliJ IDEA 2020.2, the Introduce Variable refactoring can selectively replace occurrences of a variable in an intermediate scope. You can now choose various options for replacement, rather than being limited to choosing only one or all occurrences. The editor highlights which occurrences will be replaced with a new variable as you hover over each of the choices.
You no longer need to search for Java-related templates because the new Java node includes all plain, surround, other, output, and iterations groups. You won’t get lost when searching for a live template to fit your needs. A separate Groovy node is available as well.
We’ve added the Problems tool window, which displays the warnings and errors related to the current file, along with descriptions of the issues. From this tool window, you can right-click on an issue to navigate to the line of code where the problem was encountered, and you can fix the issues one by one with Alt+Enter.
The Inspections widget simplifies searching for warnings, errors, and other issues, and lets you easily navigate between them by pressing F2 or clicking the arrow icons. From the Inspections widget, you can select which issues you want to highlight: none, errors only, or all problems.
To experiment with the possible outcomes of applying intention actions, you can preview their results before you actually apply them to your code. Press Alt+Enter to call Show Context Actions and select the intention action you need and then press Alt+Space on macOS or Ctrl+Shift+I on Windows and Linux to display the results preview.
The built-in spell checker has been improved: it works much faster, filters out irrelevant suggestions, and ranks valid suggestions based on context. Additionally, the IDE detects the language from the first couple of paragraphs in a file and suggests enabling the corresponding language model.
The details of open pull requests are now one click away in a separate vertical tool window. The main editor window shows the conversation, and you can add comments directly. Pre-commit check results are displayed at the bottom of the window. If you have permission to manage pull requests, you can now browse, assign, manage, and merge them, view and submit comments, and accept changes right from inside the IDE.
Check out more details in our blog
For this release, we’ve revised the visual consistency for Merge, Pull, and Rebase
dialogs. We’ve also improved the dialogs so that they clearly identify what Git commands will be
executed, and included some missing options. We’ve also added
--no-verify to the Pull and Merge dialogs, respectively.
When you compare two branches in IntelliJ IDEA 2020.2, the IDE shows their commits in one view by opening their logs in the editor. In contrast to the VCS tool window, this view has enough space for a full report on what commits are in each branch and which files are affected.
You can now select multiple commits from a local branch and squash them. In the Git tool window, open the Log tab, select local commits, and choose Squash Commits. If you decide to change the commit message, all the changes in those commits will be put into one single commit together with the updated message. In addition, you can now drop commits from the Git log.
IntelliJ IDEA 2020.2 allows you to use Git installed in WSL2 when you work with projects from Linux or Windows file systems. Once you open a project from WSL, the IDE automatically switches to Git in WSL and lets you use all the related features.
We are ready for the Jakarta EE 9 release in September, and we already support all the features that are available for Jakarta EE, including CDI, JPA, Batch, Bean Validation, JSF, JAX-RS, WebSocket, Servlets, JSP, JSON-P, JSON-B, Security, and EJB and JTA specifications.
If you need to create a Java EE 8 or Jakarta EE 9 project, you can now do it using our New Project wizard. A new Jakarta EE project is just steps away. Set it up by selecting the Java version, build tool, extensions, and other options.
To make it easier for you to work with Quarkus configuration files, the IDE now provides code completion and highlighting, and it colors unused code gray for both .properties and YAML configuration files. Additionally, you can jump right from the configuration files to the configured beans and back.
With the current version of the IDE, you can use gutter navigation for injected beans and updated inspections that work perfectly with the Quarkus simplified syntax. Additionally, IntelliJ IDEA 2020.2 supports @DefaultBean, @AlternativePriority annotations, and injection by qualifier only (no need to use @Inject).
With the newly added Swagger UI integration, it is now possible to preview your OpenAPI in a built-in panel in the IntelliJ IDEA editor. This is a great update for simplifying testing.
The IDE has been improved so that it can calculate a structural diff between OpenAPI specifications. Knowing the Swagger/OpenAPI specifics, IntelliJ IDEA 2020.2 compares JSON or YAML files based on their structure, and you can preview the detected diff. To do so, choose Compare Open API Specifications from the context menu or invoke this action from the Search Everywhere dialog.
Here is another useful update for the New Project wizard and the Micronaut framework. We’ve added the possibility to create new Micronaut projects directly from the wizard. Configure the project step-by-step and start working with it in no time.
If your Micronaut application uses asynchronous communication via RabbitMQ or Kafka, this update is for you. Navigate message queues and topics using gutter icons, find usages, and name completion. You can benefit from the same set of features for the Amazon SQS API.
For easy creation and testing of HTTP requests, IntelliJ IDEA will automatically generate JAX-RS and MicroProfile HTTP requests and then open them in the built-in REST Client. You can even use intention actions to generate HTTP requests on any URL if your project uses one of the enterprise frameworks: Spring, JAX-RS, Retrofit, OkHttp, or Micronaut.
We’ve updated REST Assured tests with code completion for URL path references and navigation to the related resources.
The Selenium plugin now integrates with Selenoid and provides an easy way to run a new test environment right from the browsers.json file. All required browser images will be pulled automatically when the Selenoid container starts.
Improved viewer mechanics help you analyze the heap, pointing out parts of the code that use large amounts of memory, and detect the causes of memory leaks. The HPROF memory viewer displays the calculated retained sizes of objects, the shortest paths to garbage collector roots, the dominator tree for objects (retained objects), and incoming references.
You can now speed up indexing by downloading indexes generated on another machine instead of building them locally. Use pre-built shared indexes for JDKs, or generate and distribute custom shared indexes to a target IDE build. Simply install the Shared Indexes plugin. Learn more.
While IntelliJ IDEA 2020.2 is indexing your project, you can now continue writing code. The IDE now offers code completion suggestions for Java and PHP during indexing.
It is now possible to call IDE features right from the Terminal. With IntelliJ IDEA 2020.2, you can run highlighted commands in their corresponding GUI using the Ctrl + Enter / Cmd + Enter shortcut. If you want to run the highlighted commands in debug mode, use Ctrl + Shift + Enter / Cmd + Shift + Enter.
You can learn more about this feature in our blog post.
IntelliJ IDEA 2020.2 now supports the Maven Wrapper, which automatically installs the necessary version of Maven into your project. If the Maven Wrapper is present and configured, the IDE automatically uses it and imports changes when they are required.
You can now set a Maven version for each project instead of using the previous approach, which used the same version of Maven for all open projects.
To provide a more consistent user experience, we are now displaying the build output of IntelliJ IDEA’s native builder in the Build tool window instead of in the Messages tool window.
IntelliJ IDEA 2020.2 provides project name completion and navigation for project names in build.gradle files.
Starting with this release, it is now easier to set Prettier as the default formatter for tidying up your code. Just enable the On code reformat checkbox in settings, and the IDE will use Prettier whenever you reformat your .js, .ts, .jsx, and .tsx files. If necessary, you can add other file types too.
We’ve added Nuxt.js support and Vue-specific code-style settings – great news if you work with the Vue.js framework.
This release introduces some valuable tools for cases where you have a long value in a cell. Starting with this release, you can view and edit long values in a separate panel. The editor panel has a soft-wrap mode that can be toggled in the right-hand toolbar.
It is now easier to observe and edit boolean values, which are now shown as raw values instead of as checkboxes. You can type f, t, d, n, g, or c to enter the corresponding values of false, true, default, null, generated, and computed. If you type anything else, you’ll get a drop-down list with possible values.
You can now preview a query with your changes in the data editor. To do so, click the DML button that becomes active if there are changes pending.
We’ve added partial support for Google BigQuery. The IDE correctly highlights queries and offers coding assistance for them.
While you can use View | Show Implicit Hints to display implicits (even absent ones), importing an implicit was never an easy task.
The new Auto-import for implicits action works exactly like Auto-import for unresolved references. The automatic popup makes the feature more discoverable, but it’s also possible to disable the auto-popup and invoke the Import… quick-fix with Alt + Enter (more info).
Adding and removing braces is an integral part of Scala programmers’ everyday life. To make the task easier, we first added an intention to wrap and unwrap expressions, but it had to be invoked manually. Then we supported adding and removing complementary braces automatically.
Now we can do even better – both braces are added and removed automatically and on the fly based on code indents. In this way, you can try significant indentation while still keeping the braces, even in Scala 2. To take advantage of this feature, just don't think about the braces and let the IDE do the work.
In Scala, a companion class or trait and the companion object have a special relationship. We have long reflected this in Project View, but otherwise we used to treat companions as any other classes or objects.
Now we show navigable gutter icons for companions (configurable in Settings | General |
Editor | Gutter Icons). You can also navigate to a companion by using Go To on a
Companion object members can now easily be auto-completed or auto-imported.
Scaladoc markup is easy to edit, but it’s not so easy to view – you have to wade through * columns, tags, and macros. Now we can render Scaladoc right in the editor, so it looks crisp and concise (you can toggle rendering in Editor | General | Appearance).
We've also improved Scaladoc rendering in the Quick Documentation popup – it can now properly handle paragraphs, lists, and macros.
In addition to improving the accuracy and speed of code completion, we've introduced two distinctive new capabilities. First, you can now autocomplete both the method’s name and its arguments in a single step, as long as appropriate values are present in the current scope.
Second, you can now apply a "static" function to an argument using the dot notation, which can be used in conjunction with algebraic data types (ADTs). This functionality is a part of Hoogle Completion – our attempt to re-imagine Hoogle in a language that doesn't use Hindley-Milner type system (work in progress).
IntelliJ IDEA 2020.2 allows you to securely connect to Docker on Windows, as we have added support for TLS connections to the Docker daemon from IntelliJ IDEA.
You can now specify a custom
kubeconfig file in Preferences /
Build, Execution, Deployment | Kubernetes. Alternatively, click the Show Settings… button in
the Services view when selecting a Kubernetes root item. You can also specify a custom
kubeconfig file either globally or for a current project. In other words, you
can have a
kubeconfig file for each of your projects.
We’ve added completion for ConfigMaps/Secrets from the current project and from the cluster. Items from the cluster are marked in blue in the completion list. You can now navigate from a usage of ConfigMap/Secret to the corresponding ConfigMap/Secret resource in the project or cluster. The same goes for ConfigMap/Secret keys.