-
Notifications
You must be signed in to change notification settings - Fork 853
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
Use StructureProvider to populate navigator #7483
Use StructureProvider to populate navigator #7483
Conversation
Good idea. At first glance, it seems good. |
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.
Looks fine to me.
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.
I am not much opposed to reusing the StructureProvider
, but won't this mean we will get the dynamic LSP panel for all MIME types that have StructurePovider
, in addition to their existing navigator panels?
Great. I am glad you find the new dependency on
That was the case. Maybe it is not that bad, especially when the Since 7ef43e0 we display |
We at Enso are finally adding VSCode outline view into Enso VSCode extension:
We had to write our own EnsoStructure provider. As the snapshots in the pull request demonstrate it is working fine in VSCode.
However: I also want it to work in NetBeans and IGV!
I see little point writing own navigator implementation and registering it in the Enso NBM. Especially when my original vision of the LSP API saw it as a way to hook into VSCode as well as NetBeans by writing one implementation and using it in both systems. This PR is my attempt to contribute to that vision.
lsp.client
module now checks for presence of StructureProviderStructureElement
hierarchy and builds nodes for the elementsThe functionality is very close to the already existing functionality that works via LSP4J interfaces. Maybe there is a way to share the navigators - either by abstracting the functionality to common interfaces or by bridging (now deprecated)
org.eclipse.lsp4j.SymbolInformation
toStructureElement
- what do you think? Abstracted common functionality in 47d411b and using it in edf081fIn any case, I'd be thankful if NetBeans recognized various LSP API providers and used them in the classical UI where appropriate. This is how NetBeans look with this PR and Enso4Igv NBM version v1.36.114: