Gogland EAP 17: Type Hierarchy, Call Hierarchy, Parameter Hints, Vendor Scope, and More

Meet Gogland EAP 17. Along with the usual bugfixes the update also includes a few notable changes.

Vendor directories scope

To make the code navigation and search more straightforward, we moved the code from inside the vendor directories out of the Project Files scope and made it a part of the Project & Libraries scope instead. Now when you use an IDE feature you can control whether you want to include or exclude the code from the vendor folders. As an added bonus, because of how scopes work in the IDE, now you can also manage the way the code is visually presented:

Hierarchy tool window

There are two new features to help you work with the code: Type Hierarchy (Ctrl+H) and Call Hierarchy (Ctrl+Alt+H). Both are available on demand and appear in the Hierarchy tool window.

Type Hierarchy works when your caret is at an interface or a struct:

Based on the mode selected in the tool window toolbar, the interface displays either when the type at caret extend or implements, or when the types that implements the type at the caret:

Call Hierarchy works when your caret is at a function reference and collects the tree of function calls inside the function.

Note: The Hierarchy tool window is are not automatically updated as you navigate through the source code, it has to be triggered manually.

Parameter hints for named return values

The Parameter Hints already familiar to you have been updated and now display the hints for the named return values:

Diff viewer

The Diff viewer now supports the Ignore imports and formatting option for Go files:

This comes handy if you want to focus only on the changes in the code itself, not import statements or formatting.

Other improvements

  • The File Watchers which were recently introduced to replace On Save actions haven’t respected environment variables when executing. Now they do.
  • The IDE now warns you if the code uses non-strict comparison of integer types with the maximum or minimum values. Such checks are always true and may indicate a possible bug.
  • When using a version of Go prior to 1.8, the IDE reports incorrect conversions of structs with tags.
  • Last but not least, there’s a new inspection that finds unnecessarily exported identifiers and prompts unexport them via a quick-fix. You can either enable it or run it manually on the scope you need:

Since we’re approaching the release date, we very much appreciate your feedback. Please report any issues or glitches you find and simply share your feedback. Thanks for helping us make the release great. Stay tuned!

Happy developing!

This entry was posted in EAP, New Features. Bookmark the permalink.

17 Responses to Gogland EAP 17: Type Hierarchy, Call Hierarchy, Parameter Hints, Vendor Scope, and More

  1. Boris says:

    Hi,

    thanks for another great features! :)

    I just need to get file watcher to work for scratch files, I asked on blogpost about EAP 16 here https://blog.jetbrains.com/go/2017/10/18/gogland-eap-16-file-watcher-tons-of-new-inspections-smarter-navigate-to-test-and-more/#comment-2746, but Alexander’s advice didn’t help me :(

    I even tried to set “File type” for File Watcher to “Scratch” instead of “Go” and use “All Places” for Scope, but “goimports” is still not run after I save the file :(

    And another question is, what are those arrows in “Call Hierarchy” picture? I suppose it’s folded “return” or something like that, but I can’t see any option how to use it :)

    Thanks!

  2. Boris says:

    Hi,

    no problems and thanks for your help :)

    One more issue with that one-line return code folding is that I don’t see your fancy arrow, only “-^”. I suppose it has something to do with my font, I’m trying it with “Fira Coda” with ligatures enabled.

    Thanks.

  3. Dani says:

    After I upgraded to this version, quite often the IDE gets crazy continuously flashing the message “scanning files to index”. Restarting the IDE does not fix it.

    Anyway to rollback to the previous version?

    thanks

    • Andrey Cheptsov says:

      Does it happen on the first project opening or after an update from VCS or updating GOPTH? Does it finish after some time? Does it repeat unexpectedly? Please share more details, if possible along with logs attached to the issue. We will investigate it.

    • Alexander Zolotov says:

      Hi Dani,

      I think you can fix this in this way: invoke Help | Edit Custom Properties and add go.mark.vendor.as.library=false line

      I’d appreciate if you help us to recreate this. Let’s start with filing an issue at https://youtrack.jetbrains.com and attaching logs (Help | Show Logs in )

      • Dani says:

        >> invoke Help | Edit Custom Properties …

        I did. I’ll let you know if it helps.
        I submitted bug report 1623052

        thanks

      • abs says:

        Thanks for sharing the information about go.mark.vendor.as.library flag. We prefer to keep it false, as we actively work on the code in that directory.

  4. Sergey K says:

    Hi! First of all, thanks for the update!
    Can you set icons for structs and interfaces with different colors? Now they are both green with the only difference in “I” or “T” inside — not that easy to distinguish.

  5. Nicolás Mendoza says:

    Thanks, great work!.

  6. kaweh says:

    hi
    [bug report]
    There are a problem with “Remote host Access” when I use EAP 15+, EAP 14 is OK
    EAP always said “Can not access hostname” ba la ba la…
    Can someone help me to solve this problem. btw, username, port and password is OK

  7. Pingback: What else is hidden in the 2018.3 EAP 1? – Golang News

Leave a Reply to Boris Cancel reply

Your email address will not be published. Required fields are marked *