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

Fix multiline semantic highlighting for 'implements', 'extends', and 'permits' keywords #2995

Merged
merged 1 commit into from
Dec 8, 2023

Conversation

hopehadfield
Copy link
Contributor

Addresses #2920 (comment)

Before:
Screenshot from 2023-12-07 11-49-44
Screenshot from 2023-12-07 16-42-47

After:
Screenshot from 2023-12-07 14-52-59
Screenshot from 2023-12-07 16-41-24

@rgrunber
Copy link
Contributor

rgrunber commented Dec 8, 2023

retest this please.

Copy link
Contributor

@rgrunber rgrunber left a 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.

@rgrunber
Copy link
Contributor

rgrunber commented Dec 8, 2023

Screenshot from 2023-12-08 14-27-41

If we can also do permits as discussed that would be cool.

@hopehadfield hopehadfield changed the title Fix multiline semantic highlighting for 'implements' and 'extends' keywords Fix multiline semantic highlighting for 'implements', 'extends', and 'permits' keywords Dec 8, 2023
Copy link
Contributor

@rgrunber rgrunber left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The permits works well for me now. I guess we can live with guarding off the token so it's only added when the execution environment is Java >= 17 since that's when sealed types were finalized. With that said I don't think it'd be that bad to support it even if a user mistakenly types it. The validation would still inform them the token is not supported.

Last thing is to just add a testcase for sealed classes.

…'permits' keywords

Signed-off-by: Hope Hadfield <hhadfiel@redhat.com>
@rgrunber rgrunber merged commit 2584b80 into eclipse-jdtls:master Dec 8, 2023
6 of 7 checks passed
@hopehadfield hopehadfield deleted the implements-highlight branch December 12, 2023 16:34
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