Skip to content

Move Type Hierarchy implementation to LSP - #2376

Open
CsCherrYY wants to merge 1 commit into
redhat-developer:mainfrom
CsCherrYY:cs-typehierarchy-impl
Open

Move Type Hierarchy implementation to LSP#2376
CsCherrYY wants to merge 1 commit into
redhat-developer:mainfrom
CsCherrYY:cs-typehierarchy-impl

Conversation

@CsCherrYY

@CsCherrYY CsCherrYY commented Mar 24, 2022

Copy link
Copy Markdown
Contributor

Requires eclipse-jdtls/eclipse.jdt.ls#2033

The change is able to review/merge, but we will get several BREAKING changes, so feel free to discuss we can now continue the process or wait for further changes.

Pros:

  • supertype/subtype hierarchy view is supported in vscode, we can get dismiss/history features for free.
  • All communications about TypeHierarchy are based on LSP, as for future updates, we can git it for free.

Cons:

  • The type hierarchy in LSP only supports supertype hierarchy and subtype hierarchy, no class hierarchy. We should still hold custom implementations about the class hierarchy view.

  • Since "Show Type Hierarchy" is contributed from language client/vscode itself, we have no way to control its behavior, so the default view of "Show Type Hierarchy" would be the subtype hierarchy view. We added a new entry "Show Class hierarchy" to open the class hierarchy view by default.
    image

  • As for those types have no children, the star will always show there. This is also the limitation of current call hierarchy view.
    image

@rgrunber

Copy link
Copy Markdown
Member

Can this along with the change on the language server be revived now that we've updated to the 3.17 spec ?

@CsCherrYY

Copy link
Copy Markdown
Contributor Author

Can this along with the change on the language server be revived now that we've updated to the 3.17 spec ?

I'm looking at this. The UX change (some UI limitation) of this PR is mentioned in #2376 (comment)

Signed-off-by: Shi Chen <chenshi@microsoft.com>
注册 for free to join this conversation on GitHub. Already have an account? 登录 to comment

项目

None yet

Development

Successfully merging this pull request may close these issues.

2 participants