Add QuickAssist for adding/updating field access modifiers - #3863
Merged
Conversation
Adds a new quick assist that offers "Change modifier for '<name>'" on fields with existing access modifiers, and "Add Access Modifier" on package-private fields.
Contributor
|
Can one of the admins verify this patch? |
Contributor
Author
|
Hi @jjohnstn, |
jjohnstn
approved these changes
Aug 12, 2026
jjohnstn
left a comment
Contributor
There was a problem hiding this comment.
I'm ok with the patch, but it is a bit inconsistent due to the upstream code. When it is already package-private, we offer to add a modifier, but there is no way to change to package-private. I guess this could be done with a remove modifier action in the future.
Contributor
Author
The backend does expose package-private but couldn't find anything relevant to it in https://github.com/redhat-developer/vscode-java/ too, I think it is microsoft-vscode that does the labelling work, and decides what to show in the dropdown. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Adds a new Quick Assist for adding or changing the access modifier of a field. For fields without an explicit access modifier, it offers “Add Access Modifier”, while fields with an existing modifier get “Change modifier for ''”. This provides a convenient way to update field visibility directly from the Quick Assist menu, avoiding the need to manually edit the field declaration and making access modifier changes quicker and easier during development.