Community
Participate
Working Groups
It would be nice if running a Format on a buffer would break up long comments into multiple lines to respect the max line length set for the Java->Code Formatter. This should preserve the "type" of comment (// Vs /**/). Also, if one has a really long single line (//) comment and hits enter somewhere in the middle, the new line should be automatically have a // at the beginning. Likewise, since you have smart string wrapping in M2, the Format of a buffer should wrap long strings if that preference is enabled.
Requires some thought on how to combine java core formatting (java language) together with comment formatting (localized).
As formatting is based on content types, we would have a way to distinguish code from comment formatting.
Most of this has been implemented already: - code formatting causes long comment lines to wrap appropriately - hitting return in the middle of a /* */ comment causes the new line to start with "*" The only other interesting thing to potentially address would be adding the "//" characters when a "//" comment is broken into multiple lines. Leaving open for review by JDT Text team. If the "//" comment splitting is not going to be addressed, please close the bug.
>The only other interesting thing to potentially address would be adding the >"//" characters when a "//" comment is broken into multiple lines. Guess that would make sense to implement. But when I have // Here is my comment and press Enter at the end, then we would not start a new line.
Not sure I parsed what you wrote correctly, but definitely hitting return at the end should not add the "//". Only when splitting an existing comment in the middle.
You parsed well ;-)