Skip to content

Add setting to make new classes package-private instead of public - #4484

Merged
datho7561 merged 2 commits into
redhat-developer:mainfrom
MeherSru:fix-3870-class-template
Aug 13, 2026
Merged

Add setting to make new classes package-private instead of public#4484
datho7561 merged 2 commits into
redhat-developer:mainfrom
MeherSru:fix-3870-class-template

Conversation

@MeherSru

Copy link
Copy Markdown
Contributor

This adds a new setting: java.templates.preferPackagePrivateVisibility
When turned on, new Java files (class/interface/enum/record) won't
be created with "public" anymore. They'll be package-private instead.

@MeherSru
MeherSru marked this pull request as ready for review August 13, 2026 16:10
@datho7561

datho7561 commented Aug 13, 2026

Copy link
Copy Markdown
Contributor

This PR seems to work well without the server side changes in jdtls. Are the server side changes needed? If so, what do they do? oops figured it out

@datho7561

Copy link
Copy Markdown
Contributor

Fixes #3870

@datho7561 datho7561 modified the milestone: End of July 2026 Aug 13, 2026

@datho7561 datho7561 left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Looks good and works well. Thanks, Meher!

@datho7561
datho7561 merged commit 56d9cc3 into redhat-developer:main Aug 13, 2026
2 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants