Community
Participate
Working Groups
Since some versions (I think since intoducing support for Lambda expressions) the On/Off tags don't work correctly together with Save Actions. Use the following code as example: public class Example { private final String propertyA; private final String propertyB; private Example(final Builder builder) { propertyA = builder.propertyA; propertyB = builder.propertyB; } public String getPropertyA() { return propertyA; } public String getPropertyB() { return propertyB; } public static class Builder { private String propertyA; private String propertyB; public Builder setPropertyA(final String propertyA) { this.propertyA = propertyA; return this; } public Builder setPropertyB(final String propertyB) { this.propertyB = propertyB; return this; } public Example build() { return new Example(this); } } public static void main(final String[] args) { // @formatter:off final Example example = new Example.Builder() .setPropertyA("A") .setPropertyB("A") .build(); // @formatter:on } } Just formatting the code leaves the main method "as-is", while pressing Strg + S (the "format all lines" save action is activated) the code gets formatted: public static void main(final String[] args) { // @formatter:off final Example example = new Example.Builder() .setPropertyA("A") .setPropertyB("A") .build(); // @formatter:on }
Any progress here?
This bug hasn't had any activity in quite some time. Maybe the problem got resolved, was a duplicate of something else, or became less pressing for some reason - or maybe it's still relevant but just hasn't been looked at yet. If you have further information on the current state of the bug, please add it. The information can be, for example, that the problem still occurs, that you still want the feature, that more information is needed, or that the bug is (for whatever reason) no longer relevant. -- The automated Eclipse Genie.
Tested wit 4.5, it seems this problem no longer occurs after the formatter redesign. *** This bug has been marked as a duplicate of bug 303519 ***
Verified for Eclipse Version: 2020-09 (4.17) M1 with Build id: I20200707-1800