|
Project
|
IntelliJ IDEA
|
|
Priority
|
Normal |
|
Type
|
Feature |
|
Fix versions
|
No Fix versions |
|
State
|
Fixed |
|
Assignee
|
Denis Zhdanov |
|
Subsystem
|
Code Formatting and Code Style |
|
Affected versions
|
No Affected versions |
|
Fixed in build
|
Obviously these are not identical to javadoc comment text, mostly noting the absence of HTML directives. But otherwise the same formatting would apply – just take blank lines to mean blank lines, not new "<p>" directives. Just preserve my comment leader and that's fine.
I would think that if this is done, also formatting blocks (or selected sets of) standalone block comments would be easy to include. It's just a different comment leader at some level. Lots of folks use successive lines of "//" comments instead of "/*...*/" comments.
Soft line-wrapping is not the same thing as this feature request. Soft line-wrapping is a visual-only enhancement to the editor to display long content in a more easy-to-read manner. What I (and Ken) are requesting here is to have IntelliJ actually apply the Javadoc formatter to:
/* This is a comment */
// This is also a comment
styles of comments correctly. Eclipse has actually does this since the 2.0 release and it's incredibley helpful for folks that do a lot of commenting in their code to have really long comment blocks wrap and fit within the margins.
We actually want line breaks inserted as well as any necessary comment line prefixes inserted to nicely format our in-code documentation.
I'm hoping it's not actually that hard to impl (since the formatter already does the right behavior with /** blah / comments, just not / blah */ or // blah – comments.
Corresponding tests are added:
From the option name, I couldn't tell if this addressed the original bug which was the Javadoc formatting rules being applied to slash-dot (/*) and slash-slash (//) comments with regards to:
I'm not request you change scope or anything drastic (as much as I would love to see this done) I just wanted to manage my expectations for the upcoming release so I'm not suicidal when 9.1 comes out :)
Mentioned feature targets all such lines (regardless their semantic like comment, javadoc, string etc). I.e. it makes formatter break long lines, insert necessary symbols as necessary and adjust new lines indentation as well.
You can wait for the next IJ X EAP and try it yourself.