Community
Participate
Working Groups
In the "new lines" settings, I have: Insert new line before opening brace Insert new line in control statement Insert a new line inside an empty block That formats the sample code as: { if (size < currentSize) { try { size = inStream.available(); } catch (IOException e) { } } else if (size == currentSize) { ++size; } else { --size; } } Note that "else if" is on the same line. If I tick "Keep else if on the same line", I get: { if (size < currentSize) { try { size = inStream.available(); } catch (IOException e) { } } else if (size == currentSize) { ++size; } else { --size; } } Note that now the "else if" is split - ie not on the same line. Jon
is the UI presenting this option properly?
Could you clarify exactly what you mean? If you're asking whether the code formatter in the editor itself exhibits the same, behaviour, the answer is yes: with the option to keep the else-if on the same line ticked, the "if" appears on the next line.
Label has been changed (-> Insert new line between 'else if') >111106