IntelliJ IDEA 2020.1 EAP was updated today. The new EAP build adds improvements to the debugger and the profiler, and it introduces a new Commit toolwindow along with the LightEdit mode. Keep reading to learn all about these exciting changes.
- Other improvements
Dataflow analysis assistance
IntelliJ IDEA v2020.1 adds dataflow analysis assistance to the debugger, which predicts and shows you possible exceptions and always true/always false conditions based on the current state of the program execution.
When you debug Java code and reach a breakpoint, the IDE runs the dataflow analysis based on the current state of the program and shows you what will happen next, before the code execution reaches that point:
You can read all the details about this new feature in Integrating Java Dataflow Analysis and the Debugger.
Pin to top
Another small but helpful improvement is the ability to pin any of an object’s fields to the top of its fields list. This can come in handy when the object has so many fields that it becomes difficult to find the ones you need to investigate:
We’ve added another minor debugger improvement that allows you to connect to a debugging session from a remote machine through IPv6.
Focus on method calls
Now when you analyze your application’s performance with the CPU profiler, you can use a number of additional options to focus more specifically on a chosen method call and filter out the unnecessary ones:
- Focus on Subtree shows the selected method call and all the following calls in the subtree. When this is selected, the parent time-sample counter displays the overall time spent in the selected subtree.
- Focus on Call shows the selected method and the methods that call it. When this is selected, every time frame shows only the time spent in the selected method.
- Exclude Subtree ignores the selected method call and all the following calls in the subtree.
- Exclude Call excludes the selected method and all calls to it.
Visit the Profiling tools section to learn how to install and use this feature to analyze applications in IntelliJ IDEA Ultimate.
Collapse recursive calls
IntelliJ IDEA now detects recursive calls when the same method is called higher up in the stack. The IDE now encourages you to take these calls out of the subtree, allowing you to bypass recursion and focus on the methods that consume most of the resources and on the calls that they make.
Recursive calls are indicated with this new special icon in the Call Tree tab:
Analyze HProf memory snapshots
IntelliJ IDEA 2020.1 enables you to open
.hprof memory dump files without taking up too much of your RAM.
To open the .hprof file, go to Help | Find action and type “hprof” to find the Open Hprof Snapshot action:
Once you have chosen the .hprof file, the IDE will open it in the Profiler tool window:
A number of tabs appear in the picture above. Here’s what they do:
- Summary shows common information like the total size, number of instances and stack traces of the file.
- GC Roots shows all the root objects grouped by classes.
- Classes lists all classes sorted by their numbers of instances or size.
- Object view (double-click on an object) lists all the class instances with the field value viewer.
Note that in v2020.1 we are working on the very first version of this new feature. More sophisticated analysis should become available in the next major versions. As usual, we’re excited to see your feedback and suggestions in the comments.
New Commit tool window
We have been working on the new commit tool window for quite some time. In the previous EAP series, we tested several approaches to the Commit UI. Now in 2020.1 we’ve come up with a new tool window for the task. Here is what it looks like:
The new commit tool window incorporates the Local Changes and Shelf tabs. This tool window covers all commit-related tasks, like checking diffs, selecting files and chunks to commit, and entering a commit message. Commit is a vertical tool window located on the left, which leaves room for the entire editor to show the diff.
We are still working to improve the new tool window, and your suggestions and general feedback are very welcome in the comments!
The new LightEdit Mode allows you to open files in a simple editor window without creating or loading a project. It’s been developed in response to a frequent request to use IntelliJ IDEA as a general-purpose text editor [IDEA-62898].
The easiest way to try LightEdit mode is to open a file from the command line by executing “idea file” where file refers to a file that exists in the local file system:
For more information on how to create a command line launcher, see Opening files from command line.
You can also use the Open action from the IntelliJ IDEA’s welcome screen or Open with…| IntelliJ IDEA from your OS’s system file manager.
Though the LightEdit Mode doesn’t provide the full set of the IDE features, it starts and works considerably faster. LightEdit mode is convenient for quick changes in arbitrary local text, source, and configuration files. This feature is in an early stage of development, and we are planning to implement gradual improvements and fixes over the coming EAP builds.
You can now preview intentions before you apply them to your code. After pressing Alt+Enter to choose an available intention action, you now can also press Alt+Space to see a preview:
The new Zen Mode has been added to get rid of possible distractions and to help you focus completely on your code. In its essence, this new mode combines the Distraction Free Mode and the Full Screen Mode, so that you don’t have to enable or disable both of these modes every time you want to enter or exit them.
Just like with any other editor mode, to enable the Zen Mode, go to View | Appearance | Enter Zen Mode, or choose it from the Quick Switch Scheme popup (Ctrl+` | View mode | Enter Zen Mode).
Check out the full release notes for the exact list of closed tickets.
That’s it for now! We’ll keep publishing the EAP builds for v2020.1 with more fixes and improvements each week. Stay tuned!