IntelliJ IDEA 2020.1 Beta 2: Code Vision and Run Configurations as Files

Artem Sarkisov

IntelliJ IDEA 2020.1 Beta has just been updated. While this build mostly polishes the new features for the upcoming v2020.1, there are a couple of improvements that we haven’t already announced.

Code Vision

We have taken our first steps toward implementing the Code Vision functionality, similar to the one implemented in JetBrains Rider. As of IntelliJ IDEA 2020.1, Code Vision can show you the usages and implementations of Java symbols. To enable the feature, go to Preferences / Settings | Editor | Inlay Hints | Java, choose Code Vision, and check the related Show hints… checkboxes:

You will notice that the IDE now shows you the number of times a symbol is used right above its declaration. For instance, here’s an example of implementations and usages of a Java interface:

As you see in the gif, this usages info is interactive, so you can navigate to the usages by simply choosing and clicking the desired one.

We will be adding more useful context info, such as version control info, and improving discoverability in the next major releases.

Store Run Configurations as files

Previously, IntelliJ IDEA stored your shared run configurations in the `.idea/runConfigurations` folder of your project. This made it harder to share run configurations with your team members through version control if the `.idea` folder was added to `.gitignore`, and hence, it was ignored by Git.

Starting with v2020.1, you can choose any location within your project folder for your run configurations. To do so, open the Run/Debug Configurations dialog, check Store as project file in the upper right part of the dialog, and click on the gear icon. This will open a popup which allows you to choose where to store your run configurations:

Once you do this, the IDE will save your run configuration as a `*.run.xml` file in the specified folder so you can add it to Git and later share it with your colleagues.

Note that if you’ve added the `.idea` folder to `.gitignore`, the IDE will suggest you store your run configurations in the `…/project_folder/.run/` directory by default.

To learn more about all of the latest features announced during our weekly EAPs, check out the posts tagged as IntelliJ IDEA 2020.1 on this blog.

The release notes list all of the closed tickets in this Beta build.

Happy developing!

Comments below can no longer be edited.

25 Responses to IntelliJ IDEA 2020.1 Beta 2: Code Vision and Run Configurations as Files

  1. Mike says:

    March 25, 2020

    Since the build 201.6073.9 there is no a link to release notes upon publishing every new build:

    • Artem Sarkisov says:

      March 25, 2020

      Thank you, Mike; fixed!

  2. Dimitri says:

    March 25, 2020

    I am very excited to finally see the Code Vision feature in IDEA.

    I absolutely love it in Rider and use it a lot. It’s what made me reconsider using it instead of VIsual Studio, which has a similar feature since a long time.

    Is it planned to implement this feature soon for Kotlin code as well?

  3. Amr says:

    March 26, 2020

    is it possible to use code vision for custom plugins plugins?

    • Dmitry Jemerov says:

      April 7, 2020

      Yes. Code Vision is implemented using the standard editor inlays API which can be used in custom plugins as well.

  4. Sebastian says:

    March 26, 2020

    I really like Code Vision! Great idea and very useful!

    There is a UI-bug though, having an (inner) enum like this:

    public enum Foo {

    …Code Vision annotates every member and adds a new line after each, like this:

    public enum Foo {
    1 usage
    2 usages
    1 usage

    I don’t know if this is intentional, but having enums with lots of members, this approach takes way to much space and doesn’t look very nice 🙂

    • Sebastian says:

      March 26, 2020

      (identation was removed by blog software, each annotation is “over” the annotated member)

    • Dmitry Jemerov says:

      April 7, 2020

      Thanks! I’ve filed a YouTrack issue:

  5. Mike says:

    March 26, 2020

    Code Vision is a great feature, hope to see it somewhere soon in JS-projects as well.
    And in general, IDEA has a lot great features, which are solely available in Java, please, consider align the Java and JS code analysis/inspections & refactoring features.

    • Dmitry Jemerov says:

      April 7, 2020

      JavaScript is a dynamically typed language, which makes it basically impossible to obtain exact usage counts for declarations. Because of this, Code Vision as implemented for Java doesn’t really make sense for JS.

      The lack of static typing is the key reason for the lack of feature parity between Java and JS.

  6. Mike says:

    March 26, 2020

    Store Run Configurations as files is a great feature, but I was surprised to realize that IDEA exports the run configuration files with the sensitive credentials in a plain text!

    Would it not be better to encrypt this data prior storing such data in XML-file?

    Also, it would be better to add an option to automatically add these files (.run folder) to Git ignore and even enable it by default to avoid pushing personal configurations with DEV-credentials to the code repository.

    Anyway, the tickets are: IDEA-236118, IDEA-236122

    • Alexander Doroshko says:

      March 26, 2020

      The idea behind the ‘Store as project file’ check box is the opposite: allow to share run configurations through Version Control, even if the `.idea` folder is in `.gitignore`. If you don’t want to add run config to Git, just don’t check ‘Store as project file’. Also answered in the tickets.

  7. Tomasz says:

    March 26, 2020

    This update is awesome!
    I can see another improvement to run configurations. Could you please add an option to hide specific configuration from ‘Run configuration…’ menu? I’m working with microservices (about 50) and for each one I have debug configuration. Instead of running each one I use ‘compound’ configuration. However, all of that configurations are still visible, even though I don’t need them anymore.

  8. Mariusz Nowak says:

    March 27, 2020

    I find the code vision very useful. I miss one thing: possibility to narrow usages to production code only, e.g. a method is often referenced once in production code but multiple times in test code, this is sometimes ambiguous.

  9. HappyUser says:

    March 27, 2020

    Code vision is great, glad to see it coming to IDEA for Java code! Are there any plans for Kotlin and Scala support too?

  10. Mouamle Hasan says:

    March 28, 2020

    It would be nice if we can disable it for fields.

    • Dmitry Jemerov says:

      April 7, 2020

      Why exactly do you need this?

  11. Jarvis Mercer says:

    March 30, 2020

    Thank you for making great tools for devs
    What is the last version of the 2019 cycle? before 2020 release
    I want to stick with the last version of 2019 until some version of the 2020 cycle come through and pass
    Many developers have this question from our conference
    Thanks in advance


Subscribe for updates