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

Provide semantic tokens for class files #1511

Merged
merged 1 commit into from
Jul 21, 2020

Conversation

0dinD
Copy link
Contributor

@0dinD 0dinD commented Jul 21, 2020

This is a very simple change, code-wise. But it allows the client of the language server to request semantic tokens not only for source files, but also for class files in libraries. This is done by using the preexisting JDTUtils.resolveTypeRoot(String uri) method, which either resolves a source file or a class file into an ITypeRoot based on the request protocol (file://... or jdt://...).

Signed-off-by: 0dinD <zerodind@gmail.com>
@fbricon
Copy link
Contributor

fbricon commented Jul 21, 2020

@0dinD pretty cool! Do you think you could add a unit test though?

@0dinD
Copy link
Contributor Author

0dinD commented Jul 21, 2020

@fbricon sure, I can look into adding a unit test.

@fbricon fbricon merged commit 68787e1 into eclipse-jdtls:master Jul 21, 2020
@fbricon
Copy link
Contributor

fbricon commented Jul 21, 2020

@0dinD I'm merging now because the change is safe to release, but please provide anti-regression tests as soon as you can. Thanks!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants