Is there any way to stop the formatter in Eclipse from removing space in the following type of code?
uint16_t ABC = 0x123;
uint16_t ALPHA = 0x543;
uint8_t UNICORNSOUP = 0x80;
This ends up as:
uint16_t ABC = 0x123;
uint16_t ALPHA = 0x543;
uint8_t UNICORNSOUP = 0x80;
It leaves #define's alone but not assignments, I think the issue is in the formatter under White Space > Expressions > Assignments you can select to have space before the assignment operator and after but this either has no space or a single space, you can't select to leave as is or only insert if no space.
The other issue is it is reformatting enums from
enum FastLoggingStopCondition
{
FAST_LOGGING_STOP_INACTIVE = 0,
FAST_LOGGING_STOP_ACK = 1
};
to:
enum FastLoggingStopCondition
{
FAST_LOGGING_STOP_INACTIVE=0, FAST_LOGGING_STOP_ACK=1
};
Is it possible to change this behaviour?
Alternative formatters that can be run from Eclipse or outside of Eclipse that are tailored to C could be a possibility if Eclipse can't be hammered into submission.