Skip to content
Advertisement

Tag: code-formatting

How to make Eclipse align the ?: ternary operator?

I need the exact same effect as in this question but in Eclipse. It should only do the alignment if I explcitly insert a new line before the “:” or if the second operand (the “true” expression) is too long. Example: Answer This original answer was for Galileo which is well over a decade ago, so I’m updating it to

Advertisement