-
Notifications
You must be signed in to change notification settings - Fork 2.5k
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-707: Introduced the @theia/typehierarchy
extension.
#3148
Conversation
When restarting the Theia backend without refreshing the browser:
Possible related: #3150, #3145. Something is odd with the reconnection in Java. |
|
||
child.unbind(TreeImpl); | ||
child.bind(TypeHierarchyTree).toSelf(); | ||
child.rebind(Tree).toDynamicValue(ctx => ctx.container.get(TypeHierarchyTree)); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
TODO: #3153
toDynamicValue
-> toService
.
Could you point me to the latest version of the LSP proposal for type hierarchy? I would like to test this with clangd, if I have the time. |
microsoft/vscode-languageserver-node#346 Note, this implementation differs from the proposed one. Extracted from the source:
Or in Java/Xtend: eclipse-lsp4j/lsp4j#273 |
packages/languages/src/browser/typehierarchy/typehierarchy-feature.ts
Outdated
Show resolved
Hide resolved
|
||
registerMenus(menus: MenuModelRegistry): void { | ||
super.registerMenus(menus); | ||
const menuPath = [...EDITOR_CONTEXT_MENU, 'navigation']; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Should go into its own 'type-hierarchy'
whatever menu group, instead of the 'navigation'
return <div className={'symbol-icon ' + this.icons.get(node.kind) || 'unknown'}></div>; | ||
} | ||
// tslint:disable-next-line:no-null-keyword | ||
return null; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Should be undefined
. See: #3181
I have noticed another UX issue, we should not reveal the document symbol, when expanding the nodes in the type hierarchy tree. Update: |
I see the same behavior with the call hierarchy. And after a quick comparison to Rider, I tend to agree that this is an UX issue. Personally I'd expect to reveal the symbol on selection. Unfortunately, expansion is equal to selection in trees.
... but an interesting topic. |
One thing to look out for: make sure this plays well with restarting language servers. If you rebase on top of #3215, you can try restarting a language server (I tested with Java, so you should be able to reproduce with that). I get infinite recursion during dispose: |
Why to rebased? The reconnecting issue happens from the |
Oh sorry, I missed that comment. Well, it gives you a more straightforward way to reproduce :). |
The PR: #3802. |
Closes: #707.
Signed-off-by: Akos Kitta kittaakos@typefox.io
Ready for preview: