Implement missing functionality for call hierarchy API#9681
Conversation
0ddc096 to
30957f7
Compare
| mappings['vscode.prepareCallHierarchy'] = ['vscode.prepareCallHierarchy', CONVERT_VSCODE_TO_MONACO, CONVERT_MONACO_TO_VSCODE]; | ||
| mappings['vscode.provideIncomingCalls'] = ['vscode.provideIncomingCalls', CONVERT_VSCODE_TO_MONACO, CONVERT_MONACO_TO_VSCODE]; | ||
| mappings['vscode.provideOutgoingCalls'] = ['vscode.provideOutgoingCalls', CONVERT_VSCODE_TO_MONACO, CONVERT_MONACO_TO_VSCODE]; | ||
| mappings['vscode.open'] = ['vscode.open', CONVERT_VSCODE_TO_MONACO]; |
There was a problem hiding this comment.
Strictly speaking, this isn't necessary to get the version of the plugin downloaded by our scripts to work because it uses vscode.window.showTextDocument rather than this command. However, later versions of the plugin use the vscode.open command, and we have an off-by-one issue when handling TextDocumentShowOptions passed by plugins into that command.
90d9069 to
c7d27e4
Compare
|
@colin-grant-work |
Thanks for the heads up. Always nice to have someone else to blame 🙂 |
|
@colin-grant-work |
|
I tested a little the changes and can confirm that in general it works well for me! I noticed that the source is not displayed for items: VS Code: Theia: Another difference which I found: @colin-grant-work I'm not requesting a fix - I think we can improve it in a separate PR - just sharing what I detected within review the PR... |
What do you mean? |
Good find. I'm not sure what's going on here - I'll check how that data is specified in the tree items created by the plugin and how we're handling them.
It does work... sort of. I think the difference here is that VSCode transfers focus to the editor on double click, so you can see your cursor, but Theia transfers focus back to the reference view, so the editor cursor disappears. If you click the editor tab to focus the editor, the cursor should be in the same place in Theia as it is in VSCode. I recall seeing code with something like |
|
@RomanNikitenko, I think that what you're seeing in VSCode may be a fairly recent addition or depend on other functionality. Running VSCode 1.50 in the same environment as I run Theia, here's what I see: And when double clicking to open the reference, focus stays in the references widget (orange/brown is the focus color for the tree, and no cursor is present in the editor): If you activate the editor, the cursor should be at the beginning of the function that calls the function you're interested in. The plugin is passing Running the most recent VSCode, I get the behavior you describe, but the version of the plugin that we're using is quite old (0.0.47 vs current 0.0.80), so I think we shouldn't expect to see the exact same behavior in the two contexts. |
c7d27e4 to
f3e78a2
Compare
thank you for the investigation and detailed explanation! |
|
@colin-grant-work |
Thanks for pointing that out. I'll check the diff command, and if it's as straightforward to fix as |
f3e78a2 to
e1b4995
Compare
Adding |
|
I'll merge this tomorrow if there are no objections, to leave some time before the release. |
e1b4995 to
8087f06
Compare
Signed-off-by: Colin Grant <colin.grant@ericsson.com>
8087f06 to
f01a647
Compare






What it does
Fixes #9612 by implementing the commands used by the vscode-references-view plugin to retrieve call hierarchy information.
It also:
CurrentEditorAccessclass in thecall-hierarchypackage in favor of the one implemented in theeditorpackage.How to test
Calls: Show Call Hierarchy CommandReview checklist
Reminder for reviewers
Signed-off-by: Colin Grant colin.grant@ericsson.com