85

Gogland EAP 17: Type Hierarchy, Call Hierarchy, Parameter Hints, Vendor Scope, a...

 6 years ago
source link: https://blog.jetbrains.com/go/2017/10/26/gogland-eap-17-type-hierarchy-call-hierarchy-parameter-hints-vendor-scope-and-more/
Go to the source link to view the article. You can view the picture content, updated content and better typesetting reading experience. If the link is broken, please click the button below to view the snapshot at that time.

Early Access Program Features

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

Andrey Cheptsov
Andrey Cheptsov October 26, 2017

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:

go-Screen-Shot-2017-10-23-at-11.59.33.png

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:

go-Screen-Shot-2017-10-23-at-12.13.06.png

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:

go-Screen-Shot-2017-10-23-at-12.14.30.png

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

go-Screen-Shot-2017-10-23-at-12.17.43.png

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:

go-Screen-Shot-2017-10-24-at-11.27.55.png

Diff viewer

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

go-Screen-Shot-2017-10-25-at-08.35.09.png

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:
go-Screen-Shot-2017-10-25-at-08.40.24.png

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!

  • Share

About Joyk


Aggregate valuable and interesting links.
Joyk means Joy of geeK