-
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
Support Type Hierarchy #1656
Support Type Hierarchy #1656
Conversation
how about adding some unit tests? |
Sure. I'll add some then. |
This doesn't seem to work for me. If I just try to call "Show Type Hierarchy" on java.io.File, I see 2 popups the first time : "MISSING provider", and "command 'java.action.resolveTypeHierarchy' not found". Afterwords I just see the latter. Looking at the code I see :
gets sent to executeCommand(..). However in TypeHierarchyCommand, both resolveChildren/resolveParents, will return null if the last parameter, "resolve", is 0. |
@rgrunber For the last parameter of openTypeHierarchy, that's the mechanism to lazy load the focus type with large number of parents and children. We'll return a focusItem with null parents and children first. It will be regarded as unresolved but we can show it early with its own name, description, etc. When we try to expand it (once you open the type hierarchy view, the focusItem is going to be expanded automatically), |
Ok, so my initial impression is that this is really nice! redhat-developer/vscode-java@c7894ce fixed the issue. Is there any reason not to include this in the patch if it is in fact the more correct way to do the call ? Might this be a bug in VSCode itself maybe on different platforms ? I'd still like to do a closer look on the JDT-LS side to see if there's anything to improve, but it looks pretty good. A few comments/observations (not necessarily needing to be addressed) :
|
@rgrunber
It's my mistake to miss the
I find this issue as well. In fact, we should get the children of the current item's children because we would like to show the collapse status of the current item's children, such as
From my personal perspective, I'd like to keep consistent with
It should be guarded for it makes no sense if there is no opened java file. And the behavior of calling from command palette should be optimized. Thanks!
That's sounds very useful. If I understand correctly, the user can manually find override method by such as |
+100 |
d720fec
to
8e63f6b
Compare
Signed-off-by: Shi Chen <[email protected]>
8e63f6b
to
c4a23de
Compare
Signed-off-by: Shi Chen <[email protected]>
Signed-off-by: Shi Chen <[email protected]>
Overall, this works pretty well and I think it's in a pretty good state. Once the remaining issues are resolved, I think we should merge. I plan to do a release by the end of the week so it probably makes sense to introduce this afterwards. |
Signed-off-by: Shi Chen <[email protected]>
Signed-off-by: Shi Chen <[email protected]>
Signed-off-by: Shi Chen <[email protected]>
Can we release Type Hierarchy in 1.0 milestone? |
Signed-off-by: Shi Chen <[email protected]>
Signed-off-by: Shi Chen <[email protected]>
Signed-off-by: Shi Chen <[email protected]>
test this please |
Signed-off-by: Shi Chen <[email protected]>
test this please |
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.
Have a play at the latest commit, it works well. I plan to merge it at the end of this week.
Relates to redhat-developer/vscode-java#1790, please see that PR for more details.
Signed-off-by: Shi Chen [email protected]