IntelliJ IDEA 2020.1 EAP7: Improvements for Git, New Java Inspections

Posted on by Artem Sarkisov

IntelliJ IDEA 2020.1 EAP was updated today. This post explains some of the recently added changes and different minor improvements.

Commit tool window & Commit dialog

Install Git from the IDE

New Java inspections

Auto-import of settings

Commit tool window & Commit dialog

Many of you have given us feedback about the Commit tool window since we enabled it by default for all users in v2020.1 EAP. Taking into account all the different opinions about the commit functionality, both inside and outside JetBrains, we’ve changed its behavior. Here’s how.

The Commit dialog is enabled by default again, as it was in v2019.3 and earlier. The commit features look exactly like they used to before v2020.1. This way, we don’t break the fashion in which millions of IntelliJ IDEA users are accustomed to committing things.

If you do prefer the Commit tool window, you can re-enable it by going to Preferences / Settings | Version Control | Commit Dialog and then selecting Commit from local changes without showing the Commit dialog (see the screenshot below). In the future, we will promote the new UI in the Commit dialog to allow in-place switching.

With that said, it’s worth mentioning that starting with v2020.1, all new users will still get the Commit tool window as the default way of committing changes. This means that if you start IntelliJ IDEA on a clean machine without using any configs from previous builds, you will see the Commit tool window by default. You can, of course, get back to the modal Commit dialog by unchecking the Commit from Local Changes without showing the Commit dialog option, which was mentioned earlier. See the image above.

Install Git from the IDE

Starting with v2020.1, you will no longer need to download Git manually if you don’t have it on your machine. For instance, when you choose to import a project from version control from the Welcome wizard, the IDE will not only look for Git on your machine, but it will also offer to download and set it up for you in the background:

Similarly, when you have a project that uses Git and the IDE cannot find the path to the Git executable, it will show you a notification and offer to download and install Git for you:

However, you will probably want to check your path to Git before downloading it once again. Remember that you can always do this, and you can configure other Git settings in Preferences / Settings | Version Control | Git.

New Java inspections

In v2020.1 EAP, we’ve added a number of Java inspections. For instance, the IDE now checks capitalization in SimpleDateFormat patterns, where it’s easy to make a mistake, and suggests a quick-fix:

Similarly, the IDE analyzes other date formatting cases, such as HH:MM, mm:SS, and MM/DD.

You will discover that the IDE now reports and suggests eliminating unnecessary escaping characters in string literals. It also finds more redundant method calls and adds other inspections.

Here is the list of all the new and updated inspections for Java in v2020.1.

Auto-import of settings

We have removed the Import Settings dialog for all existing users. Now, only users who do not have a config folder from the previously installed IDE versions, but who have accepted the License and Privacy Policy, will see the Import Settings dialog when the IDE starts for the first time.

Note that the path to the IDE’s config files has changed with v2020.1:

That’s it for today, but we will have more to tell you about in the next few v2020.1 EAP builds. Stay tuned!

Check out the release notes for the other closed tickets in this EAP build.

Happy Developing!

Comments below can no longer be edited.

26 Responses to IntelliJ IDEA 2020.1 EAP7: Improvements for Git, New Java Inspections

  1. unodgs says:

    March 5, 2020

    Could you please restore release note link in update dialog (like it was in 2019.3)

    • Artem Sarkisov says:

      March 13, 2020

      I’m looking for a workaround for that to restore it in the future builds. Do you prefer to read release notes rather than a blog post?

  2. Alex Katlein says:

    March 5, 2020

    Why was the location of the configuration files changed?

    • Gauthier PLM says:

      March 8, 2020

      They said in another post that the new paths match the standard of each platforms. Before, the path was the same on all platforms but didn’t respect the standard of each OS.

      • Artem Sarkisov says:

        March 13, 2020

        I confirm, thanks Gauthier.

  3. Pablo says:

    March 5, 2020

    I do not like the change of config files.
    Please keep it under %HOMEPATH%.

    • Sebastian says:

      March 13, 2020

      There are standards for this. On Linux its the Base Directory specification. Windows has similar standards. IMHO its a good thing if applications respect such standards.

      See also: https://specifications.freedesktop.org/basedir-spec/basedir-spec-latest.html

      • Artem Sarkisov says:

        March 13, 2020

        True, we are now following the respective OS standards. Thank you, Sebastian.

  4. Tamas Herman says:

    March 5, 2020

    Is there a way to display the diffs of a file in a commit, *next* to the modified file-tree (like it was before), instead of *below* the whole branches/commits/files columns?

    I love the side-by-side diff mode, but in this case I sometimes just switched into unified mode to still see the whole width of the file.

    Currently I can see the whole width, even in side-by-side mode, for sure, but I only see about half the lines and a lot of vertical space is just empty.

    As a rule of thumb, I would say horizontal space is cheap, vertical space is expensive…

  5. Christopher Rucinski says:

    March 5, 2020

    Install Git from the IDE should be a Toolbox feature! Leave it for non-Toolbox users, but Toolbox should also allow me to manage my Git resource. Install, update, remove, move, etc.

    This could also work with managing Java, Python, Gradle, etc…

    • Gauthier PLM says:

      March 8, 2020

      This would indeed be a very nice feature.

  6. Mike says:

    March 5, 2020

    I so much loved inplace commit.
    But with some latest update you moved diff window into editor. In such case it became unusable to me.
    So I had to return back to commit dialog.
    Is there a plan to restore inplace diff? Or make i optional?

    > “We do believe though that switching to the new Commit tool window has a lot of benefits for instance, … it provides the full-sized diff in the editor.”

    This is not a benefit. It blocks my editor 🙁

    • Artem Sarkisov says:

      March 13, 2020

      Hi Mike,

      I guess for now I can suggest you to disable the automatic diff preview in the editor by clicking the Preview Diff icon (see https://imgur.com/o4u4IgA), and invoke the diff viewer when you need it with CMD+D/CTRL+D

    • Robin says:

      April 13, 2020

      So much agreed. I loved the non-modal commit dialog before 2020.1 with the inline diff viewer to the side. I used that heavily. But with the change to move the diff viewer into the editor, and fix the diff preview of the “Changed files” panel to the bottom, I can’t stand it. This is worse than the modal commit dialog, so I’ve had to revert back to that

  7. TheBestPessimist says:

    March 6, 2020

    For those who like the non-modal git toolwindow + non-modal commit, but dislike diff-preview inside editor (and consider diff-preview should be located inside the toolwindow), you should check the following issues:
    https://youtrack.jetbrains.com/issue/IDEA-231847
    https://youtrack.jetbrains.com/issue/IDEA-231132

  8. Raziel says:

    March 6, 2020

    Change the wording of the option: “Commit from local changes without showing the Commit dialog” to something like “Use old version control dialog”. An option’s wording should be self-documenting, that sentence doesn’t mean anything to anyone coming from an older version of IntelliJ/CLion who just wants their version control back to how it used to work.

    With regards to “In the future, we will promote the new UI in the Commit dialog to allow in-place switching”. Please don’t, no one wants a button or text to ‘promote’ the new commit tool window when they’ve explicitly said they don’t want to use it.

    Just have users pick which one they prefer on their first launch of the new version and have an option with simple wording to switch between the two options.

    • Dmitriy Smirnov says:

      March 13, 2020

      Thanks for the feedback. The option will be renamed, to make it clearer and easier to find, and to correspond with promotions.
      Promotions will be easy to hide and won’t appear for those who explicitly disabled the new UI. It will also include in-place switch to turn the UI on or off.

      > Just have users pick which one they prefer on their first launch
      This won’t work, because most users have no idea what the new UI looks like as they have never seen it.

  9. Maxim Yanchenko says:

    March 9, 2020

    Can we have the Commit dialog to behave like git add -p, i.e. any changes done in that dialog are NOT saved into the original files and only affect what’s committed? It’s a feature I use a lot from thew command line, and I expect IDE to replace the command line for me, at least for common scenarios, as git add -p really is.

    • Dmitriy Smirnov says:

      March 13, 2020

      This will be highly confusing with the current implementation, so there are no plans to do so.
      However, full git stage support is on the roadmap

  10. Shorn says:

    April 10, 2020

    Re: changes to import settings

    It seems the import settings dialog doesn’t give any feedback if you point it at a wrong directory.

    I customise my idea config directory via ~/.idea.properties file, so my old 2019.3 config directory wasn’t in the place where the import settings dialog defaulted to. I forgot this and just clicked through – IDEA didn’t tell me that the directory I tried to import from was invalid/didn’t contain and config. So I thought it had imported the settings, when in fact it had just ignored me. I was quite confused at first, I thought you has messed up the import settings again. But I just need to re-do the import settings and make sure I pointed at the correct 2019.3 config directory.

    Import settings should tell you when it doesn’t do anything because you pointed it at the wrong directory.

  11. Pavlo Kolesnykov says:

    April 15, 2020

    Hi everyone I didn’t find an option of commit amending in the new non-modal commit dialog. Could you clarify is it hidden somewhere or you didn’t put it there?

    • Artem Sarkisov says:

      April 20, 2020

      Hi,
      there’s a checkbox next to the Commit button. Can you see it?

      • Pavlo Kolesnykov says:

        May 3, 2020

        now I can, but right after update was installed it wasn’t there

  12. lwen says:

    April 20, 2020

    git merge when conflict remote auto resolved conflict and push will lose my local code

    • Dmitriy Smirnov says:

      April 20, 2020

      Sorry for the inconvenience.
      However, I was not able to reproduce the issue. Could you please submit a request to https://youtrack.jetbrains.com/issues/IDEA with the scenario to reproduce and logs attached.

Subscribe

Subscribe for updates