We are using a (slightly adopted) version of the "Java style" from google, by simply importing the corresponding XML within eclipse (from here).
That works nicely, but we see one annoying problem with block comments.
Our files do have a generated copyright header, looking like:
/* some text followed by some spaces */
/* so that all lines are equally spaced */
When using the google style xml, the above turns into
/* some text followed by some spaces */
/* so that all lines are equally spaced */
When formatting with the Eclipse [built-in]
formatter, the spaces aren't removed!
I carefully checked the google XML file, and ran into this line:
<setting id="org.eclipse.jdt.core.formatter.comment.format_block_comments" false="true"/>
But alas, changing that line to use false
doesn't change anything.
Q: how to modify that google style XML file so that spaces stay within block comments?
The Eclipse [built-in] style has 'Enable header comment formatting' turned off (the org.eclipse.jdt.core.formatter.comment.format_header
value in the XML). So it is leaving the header comment alone.