IntelliJ IDEA 2023.2. Language Server Protocol, AI Assistant, IntelliJ Profiler in the editor, GitLab merge requests, ftw

IntelliJ IDEA 2023.2. Language Server Protocol, AI Assistant, IntelliJ Profiler in the editor, GitLab merge requests, ftw

IntelliJ IDEA 2023.2 has just been released. In this release, a bunch of interesting features and important improvements appeared in the IDE.

You can download the latest build from the official site, or from the free Toolbox, or from the Ubuntu snap packages.

This release of IntelliJ IDEA 2023.2 brings you an AI assistant armed with a set of machine learning tools. IntelliJ Profiler shows tooltips in the editor, making profiling more intuitive and informative. Integration with GitLab also appeared in this release.

In that post, we will run through all the main features of IntelliJ IDEA 2023.2. Contrary to the official announcement, all European political correctness is thrown into the landfill, the author of the translation does not see any value in compliance subpoenas.

Also, this Thursday in St. Petersburg there will be a Javawatch meeting dedicated to Java 21. I will give a 30-minute mini-talk about the new features, and then we can all get together and discuss it over a beer. Event announcement in the cardiscussion in chat. I am a former PMM at JetBrains Big Data and a team lead at Remote Development/Projectorand now I am working on the Russian Java distribution – Axiom JDK.

Key changes

  • AI Assistant appeared in IntelliJ IDEA 2023.2, which uses machine learning to do things like automatically write comments, suggest names, generate git commit text, etc. The number of useful features is still quite limited. To get started, you need to install a plugin called AI Assistant and log in to the JetBrains AI service. More details are written here in this post.

  • IntelliJ Profiler has learned to show hints about performance right in the editor, and this simplifies profiling, the results are easier to interpret, they are highlighted in color in the gutter. This is a pretty obvious change, and there’s no reasonable explanation why it wasn’t done earlier.

  • Integration with GitLab appeared, as it is one of the most popular systems. It is now possible to make merge requests directly from the IDE. Details

User Experience

  • Search Everywhere (invoked by quickly pressing shift-shift or shift-shift-shift, are you familiar with this thing?), now able to search for text.

  • Projects can be assigned unique colors and icons to distinguish them within the workspace. We are waiting for animated emojis 🙂

  • The hamburger menu on the main toolbar has been reworked for Windows and Linux. Its elements are now displayed horizontally on top of the panel when you click the hamburger button. There is an option to automatically turn this menu into a separate toolbar.

  • You can now sort files by modified date in the Project panel.

  • For users of the new interface (called New UI), you can now switch to a theme Light with Light Header. In it, the colors of the frames and pop-ups match the color of the theme, and the black color does not burn the eyes. New UI users still have to suffer, but less now.

  • When using the New UI full-screen mode on Mac OS, the window controls are displayed as part of the main toolbar, whereas previously it was a floating toolbar.

  • In the inspections dialog (Settings / Preferences | Editor | Inspections), syntax highlighting for code templates is implemented.

  • For the convenience of Linux desktop users (who are all these people?), the native frame drawn by the operating system has been removed from New UI, making the interface cleaner.

  • An option appeared in the Project panel Open Directories with Single Clickwhich makes project navigation feel faster and more responsive.

  • New UI main panel customization options have been expanded. The drop-down menu allows you to quickly select the actions you want to add to the panel.

  • Updated section Settings/Preferences | Plugins includes a set of standard plugins, the list of which is automatically determined depending on the specifics of the project.

  • Reworked the launch and debug interface in the Services plane to match the appearance of the widget Run/Debug.

  • To better manage multiple launch configurations, implemented options to stop frequently used configurations at the top of the Run widget.

Java

  • Improved inspections and their number increased, this allows you to maintain high code quality and better find possible errors. You can read more about improvements to the code analyzer in this blog post.

  • IntelliJ IDEA 2023.2 has learned to better highlight and navigate formatting lines.

  • Improved tag support @snippet for commenters price in Javadoc |

  • IntelliJ IDEA 2023.2 can accurately determine the location of a method in the stacktrace (a text report about it), even if line numbers are not available or displayed incorrectly.

  • IntelliJ IDEA Ultimate better analyzes SQL concatenation and interpolation in Java and Kotlin, identifies potentially dangerous queries, and thus protects the code against SQL injections.

Scala

  • IntelliJ IDEA 2023.2 has learned to work better with Scala 3, including support for enums, an improved TASTy decompiler, and improved debugging. In addition to this, Universal Apply Methods from Scala 3 now autocomplete normally, the editor has added support for IArray and “fewer braces” syntax. Scala 3 support is still very broken and unfriendly, but other support is still nowhere to be found, including other IDEs.

  • Improved Scala Build Tool (sbt) support.

  • Fixed several bugs in type derivation.

  • Zinc is selected as the compiler by default, so the incremental compilation of features from Scala 3, including inline methods, worked.

  • Management of source and target directories has improved.

  • Improved display of ScalaDoc Quick Documentation. Instructions, keywords, and literals are highlighted. The current color theme is used for highlighting, lists of advanced traits and classes are separated into separate lines, keywords from Scala 3 are highlighted.

Productivity

  • The new command line utility allows you to quickly collect and load shared indexes, instead of using a bunch of scripts and services in the old way. You can read about it here.

Run/Debug

  • When debugging reactive applications, you can calculate the values ​​of watch and local variables for types Mono and Flux. It’s funny that in the original JetBrains chonlog they forgot to write which language this improvement refers to. We will leave this as an exercise for the attentive reader.

  • Autotesting is now compatible with Maven, Gradle, and JPS build systems.

Version control

Profiler

  • Attach IntelliJ Profiler and Capture Memory Snapshot are now available as buttons on the Run bar.

  • By default, Wall-clock profiling mode is enabled, which focuses on the total time spent inside the method, including the waiting time.

Frameworks and technologies

The entire list of changes below applies only to the paid version – IntelliJ IDEA Ultimate 2023.2.

(As in the popular anecdote No legs – no cartoons. Sorry, it slipped out. 29 dollars or almost 3 thousand rubles per month, by the way).

  • Tomcat applications can be run and debugged on the Windows Subsystem for Linux (WSL).

  • gRPC requests over Transport Layer Security (TLS) can be sent via the HTTP Client.

  • The HTTP Client understands the Swagger and OpenAPI specifications and performs autocompletion within the text of JSON requests.

  • Improved support for Swagger Codegen configurations. Dialogue Edit Swagger Codegen Configuration easier to configure, and launch configurations are available directly from the gutter, without the need for additional configuration.

  • Added Redoc UI view for OpenAPI and Swagger specification files including YAML and JSON. You can switch between Redoc and Swagger interfaces inside the IDE.

  • Added autocompletion of keys in JSON for JavaScript code.

  • It is possible to reuse common JS code for different HTTP Client request handlers, which is achieved by using module imports.

  • Directly in the IDE, you can preview PDF and HTML files that result from processing HTTP Client requests.

  • The HTTP Client CLI has learned to work with the GraphQL API and support connections to services over WebSocket.

  • When creating a Spring Boot configuration, the VM options floor provides autocompletion for keys used with the flag -D.

  • Spring Configuration beans do not require a separate annotation processor, so autocompletion and validation of properties and YAML co-infrastructures work right out of the box.

  • Spring AOP support went live with Kotlin.

  • Work with the AsyncAPI specification has become easier because the IDE has learned schema validation and autocompletion of links in panels. Endpoints and Editor Preview.

  • Added several inspections to combat the “Norway problem”, i.e. misinterpretation of keys in YAML files that look like boolean variables.

Docker

  • The view of files inside image layers has appeared.

  • It is now possible to run a Docker configuration on top of any other Run/Debug configuration by adding it to a block Before Launch.

Kubernetes

  • You can now have multiple files in the same project, making it easier to manage multiple clusters or development environments.

  • Within the Services panel, it is now possible to view logs of Kubernetes deployments.

Assembly tools

  • Support for the latest Maven 4.0.0-alpha. It is not clear to whom it is, but do not deny yourself anything.

Web development

  • IntelliJ IDEA Ultimate 2023.2 is better at automatically formatting JavaScript and TypeScript code.

  • Support for CSS nesting has started.

  • Vue Language Server (Volar) makes error prompts and type information more accurate, available in quick navigation and documentation.

  • Added several Live Templates for React Hooks.

Code quality

  • Simplified static analysis setup thanks to integration with JetBrains Qodana, a smart static analysis engine built to work with multiple CI/CD pipelines. This increases two advantages. First, the analysis is configured in two clicks, it will be possible to view errors throughout the project, set quality gates for your CI/CD system. Second, you can view the results of an analysis run on the server right inside the IDE. It is described in more detail here.

Databases

  • Redis Cluster can be connected, and the set of features inside the IDE will be the same as if you were working with a separate server.

  • The visual interface of the schema migration dialog has been reworked.

  • On the page Data Editor and Viewer a field appeared Time zoneto set the time zone in which the output will be displayed datetime.

  • Implemented support for external databases and datashares in Redshift.

Useful little things

  • The LSP API allows you to work with external Language Server Protocol servers. More details.

  • The Big Data Tools plugin is blown to pieces. Now you don’t need to put a huge monolith, but you can put only what is really needed. Available chunks: Kafka, Spark, Flink, Remote File Systems, Big Data File Viewer, Zeppelin.

  • Announced deprecated plugins for Struts2, Resin, tc Server, Play, Cloud Foundry. New versions of these plugins will never appear again.

  • The built-in Android plugin now works with Android Studio Giraffe Beta 2 features, including support for Android Gradle Plugin (AGP) 8.0.0. Importantly, all features that require a Firebase account login are not supported (obviously).

  • The heap value (-Xmx is the RAM-eating idea) has been increased to 2Gb by default. Typical IntelliJ IDEA. By the way, have you bought a new macbook yet?

  • Windows 7 is no longer supported. Upgrade to Windows 10 or suffer.

That was the whole list of useful improvements in IntelliJ IDEA 2023.2. There is also a complete list, it is in the Release Notes, but why it should be read by an ordinary person (not an IDE developer) is not clear.

Your feedback is very necessary and useful to the community. The author of this post on Habra strongly advises you to go to our chat in Telegram (tg:javawatch_chat) and share the ideas and pains that have arisen. You can also subscribe to our news channel (tg:javawatch) and Twitter (twi:javawatchru). And don’t forget to visit the Java 21 meetup at Failover Bar in St. Petersburg (all Failover Meetup Space announcements can be viewed at tg:failoverbar).

Related posts