Today I upgraded Eclipse to Version 4.5. Since then, it formates differently:
Before:
@Override
public void close() {
try {
engine.closeSession(session);
status = NOT_CONNECTED;
} catch (final OpenpagesException e) {
log.error("Closing connection failed", e);
}
}
Now:
@Override
public void close() {
try {
engine.closeSession(session);
status = NOT_CONNECTED;
} catch (final OpenpagesException e) {
log.error("Closing connection failed", e);
}
}
This also happens for: switch, for, if and others...
It looks like the first indention level within a method body is broken.
I reviewed formatting settings but haven't seen something that may be responsible for this.
Is this a bug, or is there a setting?
Update: 01.07.2015
It only happens, if the tab size is set to 2, If it's set to 4 everything looks fine besides the waste of space...
Workaround
At the formatter settings, switch from Tabs only to mixed.
Then add 2 for Indention size and 2 for Tab size.
Switch setting back to Tabs only and apply everything.
Now formatting works like it did with version 4.4 and it uses 2 for a tab, not 4.
Workaround
At the formatter settings, switch from Tabs only to mixed. Then add 2 for Indention size and 2 for Tab size. Switch setting back to Tabs only and apply everything. Now formatting works like it did with version 4.4 and it uses 2 for a tab, not 4.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With