|
|
|
|
|
|
Re: Preserve whitespace between code and comment doesn't? [message #1841567 is a reply to message #1739310] |
Thu, 20 May 2021 17:11  |
Eclipse User |
|
|
|
Will Lyons wrote on Fri, 29 July 2016 15:18Jonah:
typedef struct aglorithm1_storage_t
{
float result[MAX_SIZE + 1]; //!< this is a comment! It explains what the variable is used for
float epsilon; //!< this is also a comment! Not quite as flashy but still important
int32_t counter; //!< me too! er, 3, oh whatever. I'm important darnit
float buffer[MAX_SIZE + 1]; //!< guess what I am... another unique snowflake, just like all the others
} aglorithm1_storage_t;
I'm thinking it has something to do with the print margin, because when I make that much bigger suddenly it doesn't move the comments. I thought somewhere there was an option to wrap comments to multiple lines but maybe I'm thinking of the Java version of Eclipse (which I use more often).
Your guess seems correct - as this sample works for me - but you have to set Maximum Line Width (in formatting settings -> Line Wrapping) to something big enough. For the sample in Comment 0 the comments exceed the 80 characters which is the default, so the whitespace is discarded.
This issue has resurfaced again recently and there may be more info in this bug report: https://bugs.eclipse.org/bugs/show_bug.cgi?id=573674
|
|
|
Powered by
FUDForum. Page generated in 0.04233 seconds