Search code examples
formattingeclipse-cdtline-breaks

Force line-breaks in eclipse CDT formatter


I'm trying to get Eclipse to stop squashing my enums onto a single line. When searching online I keep seeing people (eg this question) referring to a 'force split' checkbox, but I'm not seeing one in my Formatter options (in CDT Juno). Is this a java-specific option?

There is a checkbox 'never join already-wrapped lines', is this what they mean? Unfortunately I already Formatted my files assuming that 'every element on a new line' actually meant 'every element on a new line', so this doesn't help

On the 'Line Wrapping' tab I have selected 'Wrap all elements, every element on a new line', but this doesn't seem to be having any effect.


Solution

  • I don't think it's Java specific. I downloaded the CDT version of Juno and the 'force split' checkbox is there.

    CDT Formatter

    My version of CDT Juno was: Juno Service Release 1 Build id: 20120920-0800