Skip to content

Conversation

@SougandhS
Copy link
Contributor

@SougandhS SougandhS commented Aug 21, 2025

This commit provides ui to enable or disable markdown formatting

image

Fixes :
eclipse-jdt/eclipse.jdt.core#4335

What it does

How to test

Author checklist

@SougandhS
Copy link
Contributor Author

This should be merged once eclipse-jdt/eclipse.jdt.core#4336 is merged

@SougandhS
Copy link
Contributor Author

@mateusz-matela
Should this new markdown option come under java docs
image

or keep as it is in PR like a separate global one ?

@mateusz-matela
Copy link
Member

@mateusz-matela Should this new markdown option come under java docs
or keep as it is in PR like a separate global one ?

By my intuition most users would look for it next to the "Enable block/Javadoc" settings

.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)
Copy link
Member

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.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Above java doc
image

How about keeping markdown as child of javadoc (as it mostly related to javadoc)
image

Copy link
Member

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"?

Copy link
Member

@mateusz-matela mateusz-matela Sep 10, 2025

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

Copy link
Contributor Author

Choose a reason for hiding this comment

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

How about this ?
image

Copy link
Contributor Author

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.

@SougandhS SougandhS force-pushed the MarkdownViewSupprt branch 3 times, most recently from dc47e6a to 89d18b3 Compare September 14, 2025 11:48
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
@SougandhS
Copy link
Contributor Author

Merging this now

@SougandhS SougandhS merged commit 1d1a2ff into eclipse-jdt:master Sep 15, 2025
13 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