IntelliJ IDEA
IntelliJ IDEA – the Leading Java and Kotlin IDE, by JetBrains
IntelliJ IDEA 2023.1 EAP 2: Faster IDE Startup, New Java Inspections, and More
IntelliJ IDEA 2023.1 EAP 2 is now available! In this build, we’ve introduced a new approach to scanning files for indexing at IDE startup, UI improvements, new and updated Java inspections, the ability to create custom regexp-based inspections, and more.
You can get the latest build from our website, the free Toolbox App, or via snaps for Ubuntu.
To catch up on the updates from the last week, check out this blog. Now, let’s take a closer look at what the new build brings.
Performance
Scanning files to index in smart mode
We’ve improved the IDE startup experience by performing the Scanning files to index… process in smart mode, which makes the full IDE functionality available much earlier in the startup process. When opening a project, IntelliJ IDEA uses existing caches from the previous session with the project and simultaneously looks for files to index. If no changes are found in the scan, the IDE will be fully ready to work, eliminating the delays that were previously caused by indexing on startup.
New IDE suggestion to reconfigure Windows Defender settings for better performance
In IntelliJ IDEA 2023.1 EAP 2, there’s a new notification triggered when Windows Defender with Real-Time Protection is running. Given that these antivirus checks can significantly decrease the IDE speed, IntelliJ IDEA suggests adding certain folders to Defender’s list of exclusions. The notification provides options to either reconfigure these settings automatically, or first check the Defender configuration instructions and do it manually.
User experience
Hidden toolbar in Zen and Distraction Free modes in the new UI
We’ve refined the IDE’s look and feel when the new UI is enabled. The top toolbar is no longer visible in Zen and Distraction Free modes.
Onboarding tips in the sample project
For those who are new to IntelliJ IDEA and coding, we’ve introduced an option to add onboarding tips to a new project containing the sample code. In the New Project wizard, check Generate code with onboarding tips and get a basic sandbox project with tips demonstrating some of the IDE’s essential features. By following this small guide, a user can try out the Search Everywhere functionality, apply a quick-fix, and run and debug the code, making it easier to familiarize themselves with the IDE.
Editor
Custom regexp-based search and replace inspections
You can now use regular expressions to create your own search and replace inspections. These inspections can be especially useful to highlight style-based or formatting-based problems.
Go to Settings/Preferences | Editor | Inspections and press the + icon. Select Add RegExp Search Inspection from the list and you’ll be directed to a dialog where you can set up your new inspection. Select the language, use hints on the left to build a regexp, and designate the required replacement for the selected pieces of code. You can also configure the way you want the IDE to highlight them in the project.
Select the language, use hints on the left to build a regexp, and designate the required replacement for the selected pieces of code. You can also configure the way you want the IDE to highlight them in the project.
Build tools
Option to specify the Gradle version on project creation
When configuring a new Gradle project, it is now possible to select the required wrapper version right in the New Project wizard. Expand the Advanced Settings section, uncheck Auto-select, and define the preferred option. You can have the IDE remember your choice by enabling Use these settings for future projects below the Gradle version combobox.
You can also configure your preferences by following this path: File / New Projects Setup / Settings for New Projects / Build, Execution, Deployment / Build Tools / Gradle / Gradle Source.
Java
New Java inspections
To help keep your code clean and error-free, we’ve upgraded some existing Java inspections and added new ones.
The Malformed format string inspection now reports illegal time conversions that don’t comply with common Java syntax.
The Redundant String Operation inspection is now capable of detecting redundant StringBuilder.toString() calls and providing a quick-fix to replace them with contentEquals() so that you don’t create an intermediate String object.
It also reports unnecessary arguments in String constructor calls and suggests a quick-fix that removes them.
There’s a new inspection that checks calls to round(), ceil(), floor(), and print() methods for Math and StrictMath with int arguments and suggests simplifying the expression.
Another inspection warning is now displayed in the editor when a method always returns the same value. This inspection also works for Kotlin.
When working with test frameworks, IntelliJ IDEA can now notify you about objects being compared to themselves.
These are the most notable updates included in the IntelliJ IDEA 2023.1 EAP 2 build. For the full list of the implemented changes, refer to the release notes.
Your feedback about the new features is very important to us, so please try them out and let us know what you think in the comments section below or on Twitter. If you come across a bug, submit a report in our issue tracker.
Happy developing!