Repository navigation
Preserve compliance level when formatter settings need version update - #3320
Open
jonahgraham wants to merge 1 commit into
Open
jonahgraham wants to merge 1 commit into
jonahgraham wants to merge 1 commit into
Conversation
Contributor
Author
Feel free to move the issue from core to ui and I will update the commit message too. |
Member
|
jonahgraham
force-pushed
the
fix-core-5792
branch
from
November 20, 2026 18:37
68dc7d5 to
670f328
Compare
Contributor
Author
TIL that GitHub re-writes my previous comments with no edit history when issues are moved. |
Fixes case where opening a project in a newer version of JDT would lose compliance level when formatting. This means newer Java version is used for parsing the Java file. This leads to incorrect formatting in some cases, such as when `///` comments are present in the source. For pre-java 23 these are just normal line comments, for Java 23+ these are markdown block comments. Fixes eclipse-jdt#3321
jonahgraham
force-pushed
the
fix-core-5792
branch
from
November 20, 2026 19:03
670f328 to
f508f35
Compare
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.
What it does
Fixes case where opening a project in a newer version of JDT would lose compliance level when formatting. This means newer Java version is used for parsing the Java file. This leads to incorrect formatting in some cases, such as when
///comments are present in the source. For pre-java 23 these are just normal line comments, for Java 23+ these are markdown block comments.Fixes #3321
How to test
Open project with older
formatter_settings_version=19(inorg.eclipse.jdt.ui.prefs) and Java compliance level < 23 and format a file containing///style comments. They get interpreted as Markdown block comments instead of Java line comments.Author checklist