IntelliJ IDEA 2022.3 EAP 3: New Settings Sync Solution, Improvements for Java, and More
IntelliJ IDEA 2022.3 EAP 3 is now available! In this new EAP build, we introduce a reworked Settings Sync solution to help seamlessly synchronize your personal IDE settings, a range of new inspections and other improvements for Java, and experimental Maven import functionality that utilizes the new IntelliJ IDEA Workspace Model API.
This article covers the most notable updates in the third EAP build. To catch up on the previously announced features expected in v2022.3, check out our prior 2022.3 EAP blog posts.
New Settings Sync solution
In this EAP build, we introduce a reworked solution to synchronize your custom user settings.
For quite a long time, there were two plugins that existed in parallel and featured intersecting functionality – IDE Settings Sync and Settings Repository. To avoid the confusion caused by having two similar bundled plugins we’ve merged their feature sets into a single solution – the new Settings Sync plugin. It covers all of the basic prerequisites for settings synchronization and is now available in both IntelliJ IDEA Community Edition and Ultimate.
Settings synchronization is essential when you use your IntelliJ-based IDE on two or more computers. After changing a color scheme or a keymap on one machine, you naturally want to see the same setup on the second machine. But even if you have only one IDE instance, Settings Sync is still valuable as a backup solution, since it will allow you to automatically restore all your settings when you set up a new machine from scratch.
The new Settings Sync plugin is capable of syncing all shareable settings from the platform, bundled plugins, and third-party plugins. By default, the plugins themselves will be synchronized and installed silently. As for the third-party plugin settings, not all of them will be transferred seamlessly, as this is dependent on the third-party vendors. We are now communicating with plugin developers about the actions required from their side.
How does the new Settings Sync plugin work?
The settings are stored in the cloud attached to the user’s JetBrains Account. If you use different IntelliJ-based IDEs associated with the same user account, your settings will be automatically synced.
In the cases where a conflict arises due to the simultaneous modification of settings on two different computers, the settings will be merged using the most recent configuration.
How to enable the new Settings Sync plugin
Depending on your current approach to settings synchronization, you may need to manually enable the new plugin:
- If you have been using IDE Settings Sync, your data will be automatically migrated to the new plugin, so you won’t need to take any action.
- If you are a Settings Repository user, we advise you to continue using your current setup, as the migration is still a work in progress. You’ll get an in-IDE notification once the functionality is ready.
- If you weren’t previously using a settings synchronization solution but you want to try the new one, you can enable it via Settings / Preferences | Settings Sync | Enable Settings Sync.
Improved copy-cut-paste behavior
We’ve improved the editing experience in the IDE by reworking the paste action (⌘V / Ctrl+V) behavior. Now when you copy (⌘C / Ctrl+C) or cut (⌘X / Ctrl+X) a line without any code selected, the paste action will add the contents of the clipboard to above the current line, not at your caret, as it used to in previous versions.
New Java inspections and other improvements
We’ve implemented a range of new Java inspections and quick-fixes to enhance your coding experience and protect your code from possible hazards and errors.
There’s a new inspection that detects switch expressions with a common subexpression in every branch. The quick-fix suggests moving the switch inside and shortening the code.
Another new inspection reports redundant array length checks. When the only following statement is a for loop iterating over the array, the if clause can be removed, as the length check will be executed anyway within the for loop.
We’ve introduced an inspection that reports uses of \s in string literals except for those located at the end of the line in text blocks. This inspection is accompanied with a quick-fix that suggests replacing \s with a whitespace.
There’s a new inspection that reports mismatches between Javadoc and the code, notifying you when parts of a method specification written in English and the method declaration do not correspond.
There’s a new inspection that detects unnecessary creation of arrays, lists, or strings when only one element or character is used. The quick-fix suggests simplifying these excessive constructs that might appear after inline refactoring.
The Negative int hexadecimal constant in a long context inspection has been implemented. Such constants are implicitly widened to long, meaning their higher bits become 1, rather than 0. It’s unlikely this use would be intended, and even if it was, using explicit long constants would be less confusing. The IDE suggests this as a quick-fix.
The IDE now reports redundant Stream.parallel() calls for Collection.parallelStream().
When sorted() is used in a parallel stream and forEach() is used as the terminal operation, IntelliJ IDEA suggests replacing the latter with .forEachOrdered(), ensuring that the output will be ordered.
There’s a new quick-fix to resolve a compilation error appearing when a variable that is not final or effectively final is used in lambda expressions. To fix this, IntelliJ IDEA suggests making this variable effectively final by moving the assignment to the branch without assignment.
Ability to find usages of only constructors in record classes
When calling Find usages on a record class, it is now possible to restrict the search results to only constructor usages. To find constructor instances only, place the caret right after the record name, right before opening parenthesis, or right after closing parenthesis.
Enhanced Data Flow Analysis assist in Java debugger
We’ve improved the Data Flow Analysis functionality in the Java debugger. Previously, the DFA assistant predicted the future values of some expressions. Now, when the analyzer can predict that a particular branch of the code won’t be executed, it will grey out that part of the code.
You can control this feature in Settings / Preferences | Build, Execution, Deployment | Debugger | Data Views | Java.
Maven import using the new IntelliJ IDEA Workspace Model API (Experimental)
With the IntelliJ IDEA 2022.3 EAP, we are introducing experimental Maven import functionality using the new IntelliJ Workspace Model API. This change promises up to a 10% speed increase when importing Maven projects.
The option is now enabled by default in Settings/Preferences | Build, Execution, Deployment | Build Tools | Maven | Importing. Please note that not all functionality is available at this stage. Therefore, manual module settings, such as dependency customizations or changes to Module SDK won’t be preserved upon the next reimport.
Please let us know if you encounter any issues while using this new import functionality and submit your feedback to our issue tracker.
These are the key updates for this week! For the full list of updates, see the release notes. Be sure to test out the new features and share your feedback with us on Twitter or in the comments section below. If you find a bug, please, report it to our issue tracker.
Subscribe to Blog updates
Thanks, we've got you!