1
0
mirror of https://github.com/golang/go synced 2024-11-05 20:16:13 -07:00
go/internal/lsp/cmd/test
Danish Dua 1365742343 internal/lsp: add incoming calls hierarchy to gopls
* Adds incoming calls hierarchy to gopls. Returns function declarations/function literals/files enclosing the call/s to the function being inpected.
* Updates cmd to show ranges where calls to function in consideration are made by the caller.
* Added tests for incoming calls.

Example:
This example shows call hierarchy for PathEnclosingInterval in tools/go/ast/astutil.go
Show Call Hierarchy View: https://imgur.com/a/9VhspgA
Peek Call Hierarchy View: https://imgur.com/a/XlKubFk

Note:
* Function literals show up as <scope>.func() in call hierarchy since they don't have a name. Here scope is either the function enclosing the literal or a file for top level declarations
* Top level calls (calls not inside a function, ex: to initialize exported variables) show up as the file name
* Clicking on an item shows the the range where a call is made in the scope

Change-Id: I56426139e4e550dfabe43c9e9f1838efd1e43e38
Reviewed-on: https://go-review.googlesource.com/c/tools/+/247699
Run-TryBot: Danish Dua <danishdua@google.com>
TryBot-Result: Gobot Gobot <gobot@golang.org>
Reviewed-by: Heschi Kreinick <heschi@google.com>
2020-08-13 20:36:30 +00:00
..
call_hierarchy.go internal/lsp: add incoming calls hierarchy to gopls 2020-08-13 20:36:30 +00:00
check.go internal/lsp: add type error fixes to existing diagnostics 2020-04-08 01:45:16 +00:00
cmdtest.go internal/lsp: support extract function 2020-07-20 18:55:41 +00:00
definition.go internal/lsp/cmd: fix the command line query for definition 2020-04-27 20:15:23 +00:00
folding_range.go internal/lsp: fix a race in the command line tests 2019-11-22 16:15:56 +00:00
format.go internal/lsp: fix a race in the command line tests 2019-11-22 16:15:56 +00:00
highlight.go tools/gopls: add cmd support for highlight 2019-11-26 20:36:08 +00:00
implementation.go internal/lsp: store workspace package IDs with package paths 2020-01-09 22:04:34 +00:00
imports.go internal/lsp: fix imports issue with duplicate package decl 2020-04-16 06:17:24 +00:00
links.go internal/lsp: fix a race in the command line tests 2019-11-22 16:15:56 +00:00
prepare_rename.go internal/lsp/protocol: unmarshal to pointers when dispatching requests 2020-03-05 22:45:36 +00:00
references.go internal/lsp: add tests for references includeDeclaration setting 2020-01-23 01:39:50 +00:00
rename.go internal/lsp: fix a race in the command line tests 2019-11-22 16:15:56 +00:00
signature.go internal/lsp: remove unnecessary source.SignatureInformation type 2020-02-06 19:05:38 +00:00
suggested_fix.go internal/lsp: move undeclaredname suggested fix out of analysis 2020-07-23 23:54:27 +00:00
symbols.go internal/lsp: fix a race in the command line tests 2019-11-22 16:15:56 +00:00
workspace_symbol.go tools/gopls: add cmd support for workspace_symbol 2020-03-26 19:59:04 +00:00