-
Notifications
You must be signed in to change notification settings - Fork 408
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
GH-508: Support Call Hierarchy #1306
Conversation
70ac5fd
to
92bd75a
Compare
org.eclipse.jdt.ls.core/src/org/eclipse/jdt/ls/core/internal/JDTUtils.java
Outdated
Show resolved
Hide resolved
org.eclipse.jdt.ls.core/src/org/eclipse/jdt/ls/core/internal/handlers/CallHierarchyHandler.java
Outdated
Show resolved
Hide resolved
org.eclipse.jdt.ls.core/src/org/eclipse/jdt/ls/core/internal/handlers/CallHierarchyHandler.java
Show resolved
Hide resolved
org.eclipse.jdt.ls.core/src/org/eclipse/jdt/ls/core/internal/handlers/JsonRpcHelpers.java
Show resolved
Hide resolved
org.eclipse.jdt.ls.core/src/org/eclipse/jdt/ls/core/internal/handlers/CallHierarchyHandler.java
Show resolved
Hide resolved
org.eclipse.jdt.ls.core/src/org/eclipse/jdt/ls/core/internal/handlers/CallHierarchyHandler.java
Show resolved
Hide resolved
org.eclipse.jdt.ls.core/src/org/eclipse/jdt/ls/core/internal/handlers/CallHierarchyHandler.java
Show resolved
Hide resolved
e1b20ef
to
8dae866
Compare
…JDT UI to LS. Signed-off-by: Akos Kitta <kittaakos@typefox.io>
…rPlugin`. Also, reused the `StringMatcher` from the CA instead of `jdt.ui.util`. Signed-off-by: Akos Kitta <kittaakos@typefox.io>
Signed-off-by: Akos Kitta <kittaakos@typefox.io>
Closes eclipse-jdtls#508 Signed-off-by: Akos Kitta <kittaakos@typefox.io>
Signed-off-by: Jinbo Wang <jinbwan@microsoft.com>
Signed-off-by: Jinbo Wang <jinbwan@microsoft.com>
Signed-off-by: Jinbo Wang <jinbwan@microsoft.com>
Signed-off-by: Jinbo Wang <jinbwan@microsoft.com>
8dae866
to
0cf7521
Compare
About fixing the recursive call problem, the server has to add some cache to record the visited history and use that to detect a ring. The jdt.ls just needs cache the method wrapper, and then call This works well for the normal "Show Call Hierarchy" view. Because it will send a new prepareCallHierarchy request whenever you hovers at a new position, click the buttons of refresh or switching the direction in the top right corner. So the server is able to leverage the prepareCallHierarchy request to clean up the cache. But in "Peek Call Hierarchy" view, only hovers at a new position, VS Code will send a prepareCallHierarchy request. Clicking direction button at the top right corner will not send prepare request. So the cache has no chance to be clean up, and it may cause problems after you switch several times. See the issue microsoft/vscode#87176. Given the issue, i justdisable the recursion check by default, it's easy to add it back. IMO, The resolving of the next level is driven by users, e.g by expanding tree nodes, the recursion may be not a big problem. In current stage, the correctness is more important than this enhancement. However, i will keep discussing with VS Code about the right solution to fix the recursion. @fbricon How do you think? |
…rchy Signed-off-by: Jinbo Wang <jinbwan@microsoft.com>
0cf7521
to
d4dd35f
Compare
Yeah we can probably live without recursion guard for now, and maybe try to figure out how to do it properly next |
close #508
I have two PRs to update lsp4j to adopt the new call hierarchy protocol.
please use redhat-developer/vscode-java#1194 PR to integrate test this feature.
Thank @kittaakos for contributing the base PR #925, the new PR is based on that, and add changes to adopt the latest LSP for call hierarchy.