I have (Java) comments such as:
/* * The quick brown fox jumped over the lazy dog. * * * Notes: * - The quick brown fox jumped over the lazy dog. The quick brown fox * jumped over the lazy dog. The quick brown fox jumped over the lazy * dog. * - The second quick brown fox jumped over the lazy dog. The quick brown * jumped over the lazy dog. The quick brown fox jumped over the lazy * dog. */
The Eclipse auto-formatter sets the comment line width properly, but makes it:
/* * The quick brown fox jumped over the lazy dog. * * * Notes: - The quick brown fox jumped over the lazy dog. The quick brown fox jumped over the lazy * dog. The quick brown fox jumped over the lazy dog. - The second quick brown fox jumped over the * lazy dog. The quick brown jumped over the lazy dog. The quick brown fox jumped over the lazy dog. */
How do I the code formatter to leave the bulleted lists as-is, while still otherwise processing the comment?
Notes:
To change these settings, use Window -> Preferences -> Java -> Code Style -> Formatter.
Eclipse: Change the block comment style of ctrl+shift+/
Go to Source | Format Document or press Ctrl+Shift+F.
This answer says that you add a hypen right after the opening /*
, i.e.:
/*- * The quick brown fox jumped over the lazy dog. * * * Notes: * - The quick brown fox jumped over the lazy dog. The quick brown fox * jumped over the lazy dog. The quick brown fox jumped over the lazy * dog. * - The second quick brown fox jumped over the lazy dog. The quick brown * jumped over the lazy dog. The quick brown fox jumped over the lazy * dog. */
This worked for me too.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With