Skip to content
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

JDK Standard Library Hovers #80

Merged
merged 8 commits into from
Nov 30, 2020
Merged

Conversation

Strum355
Copy link
Contributor

@Strum355 Strum355 commented Nov 13, 2020

Untested for versions above 8. Please hold back all tears when reading JDK8CompatFileManager class

@Strum355 Strum355 changed the title WIP: JDK 8 (+?) Standard Library Hovers WIP: JDK Standard Library Hovers Nov 21, 2020
Turns out passing in an "empty" sourcefilemanager keeps the validator happy, which feels like a weird hack
But it seems to work? And we dont really need a full file manager as we're only parsing, not analyzing.
On that note, we're ditching analyzing. Even if the cost could be offset to making this whole spiel async,
the failure rate was too high (to be investigated), and with some more manual work of equality checking,
we should be able to get the same results for significantly cheaper and more "reliably"
As we no longer analyze deps, we dont get symbol info eg the owner symbol
Hence we cant deduce what the owning class of a method is to avoid collision scenarios where a single comp unit has multiple identical methods or vars in different nested classes
We work around this by having one DocExtractionVisitor per class decl, which holds the ClassTree ref for other visitor methods to reference to check what class we are in
@Strum355 Strum355 force-pushed the nsc/java-stdlib-hover branch from eb612ff to 2586043 Compare November 30, 2020 01:41
@Strum355 Strum355 changed the title WIP: JDK Standard Library Hovers JDK Standard Library Hovers Nov 30, 2020
@Strum355 Strum355 merged commit 73e8c14 into nsc/comsunsource Nov 30, 2020
@Strum355 Strum355 deleted the nsc/java-stdlib-hover branch November 30, 2020 01:45
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
lib/com.sun.source For issues/PRs regarding the com.sun.source based lsif-java lsif-java team/code-intelligence
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants