-
Notifications
You must be signed in to change notification settings - Fork 109
Add option to enable or disable markdown formatting #2447
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
Conversation
|
This should be merged once eclipse-jdt/eclipse.jdt.core#4336 is merged |
|
@mateusz-matela or keep as it is in PR like a separate global one ? |
d1704b0 to
be969d8
Compare
org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/preferences/formatter/FormatterMessages.java
Outdated
Show resolved
Hide resolved
...lipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/preferences/formatter/FormatterModifyDialog.java
Outdated
Show resolved
Hide resolved
org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/text/java/JavaFormattingContext.java
Outdated
Show resolved
Hide resolved
By my intuition most users would look for it next to the "Enable block/Javadoc" settings |
be969d8 to
80c203d
Compare
80c203d to
55848e5
Compare
| .gap() | ||
| .pref(FormatterMessages.FormatterModifyDialog_comments_pref_enable_javadoc, DefaultCodeFormatterConstants.FORMATTER_COMMENT_FORMAT_JAVADOC_COMMENT) | ||
| .pref(FormatterMessages.FormatterModifyDialog_comments_pref_enable_block, DefaultCodeFormatterConstants.FORMATTER_COMMENT_FORMAT_BLOCK_COMMENT) | ||
| .pref(FormatterMessages.FormatterModifyDialog_comments_pref_enable_markdown, DefaultCodeFormatterConstants.FORMATTER_COMMENT_FORMAT_MARKDOWN_COMMENT) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Now that I think about it, this would fit better one position up (or even above the javadoc?). Markdown is more related to javadoc comment, so putting it between block and line comments seems strange.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Markdown as the first item looks OK, especially considering that maybe in the future it will be more widely used than the old Javadoc comment type :)
I don't like the last suggestion as it looks like one item somehow depends on the other and you can't enable markdown formatting without enabling javadoc formatting.
But now I start to wonder about the terminology, because a markdown comment is a kind javadoc comment, right? Maybe we should terms like "Markdown Javadoc" and "Classic Javadoc"?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
And if we want to be pedantic, we should replace all occurrences of "Javadoc" with "JavaDoc" as this is how it's consistently used in official documents like https://docs.oracle.com/en/java/javase/23/javadoc/using-markdown-documentation-comments.html#GUID-27E3BB65-BF86-4F8A-9C6C-A864682BEA84
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
And if we want to be pedantic, we should replace all occurrences of "Javadoc" with "JavaDoc" as this is how it's consistently used in official documents like https://docs.oracle.com/en/java/javase/23/javadoc/using-markdown-documentation-comments.html#GUID-27E3BB65-BF86-4F8A-9C6C-A864682BEA84
This would be nice.
dc47e6a to
89d18b3
Compare
This commit provides ui to enable or disable markdown formatting and rename Javadoc formatter name in ui partial fix : eclipse-jdt/eclipse.jdt.core#4335
89d18b3 to
c0746c6
Compare
org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/text/java/JavaFormattingContext.java
Outdated
Show resolved
Hide resolved
|
Merging this now |




This commit provides ui to enable or disable markdown formatting
Fixes :
eclipse-jdt/eclipse.jdt.core#4335
What it does
How to test
Author checklist