Community
Participate
Working Groups
Build Identifier: I20100608-0911 if the text/code in between of my off and on tag is "short", the comment containing the off tag gets formatted (indentation removed) even if it shouldn't (according to the "Off/On Tags" preference page). I do not exactly know what the text length limit is that causes the formatter to miss-function, but the example below should explain the problem Reproducible: Always Steps to Reproduce: //formatting the the following code will cause the removal of the indentation of the comment "//@formatter:off"... @RunWith(Suite.class) @SuiteClasses({ //@formatter:off A.class, A.class, A.class, A.class, A.class, A.class, A.class, A.class, A.class //@formatter:on }) public class A { } // ... whereas in the following sample it wont @RunWith(Suite.class) @SuiteClasses({ //STOP-ECLIPSE-FORMATTING AAAAAAAAAAAAAA.class, AAAAAAAAAAAAAA.class, AAAAAAAAAAAAAA.class, AAAAAAAAAAAAAA.class, AAAAAAAAAAAAAA.class, AAAAAAAAAAAAAA.class, AAAAAAAAAAAAAA.class, AAAAAAAAAAAAAA.class, AAAAAAAAAAAAAA.class //START-ECLIPSE-FORMATTING }) public class AAAAAAAAAAAAAA { }
the example contains a little mistake. The second example should also contain "@formatter:off" / "@formatter:on" instead of "STOP-ECLIPSE-FORMATTING " / "START-ECLIPSE-FORMATTING".
I couldn't reproduce the problem. Can you please use a newer build and check again? Thanks.
On the current nightly build (7.2.2011) the problem is not existing anymore. However, the current stable version 3.7M5 still contains the problem. Seems that the problem was solved somehow (either this ticket is a duplicate or the problem vanished alongside another bug/bugfix).
(In reply to comment #3) > On the current nightly build (7.2.2011) the problem is not existing anymore. > However, the current stable version 3.7M5 still contains the problem. I'm trying this on M5 and still can't see the problem. There's nothing we did on the formatter post M5. So this doesnt look like an M5 issue either if the current nightly build is fine.
Created attachment 188508 [details] Java Code Formatter Profile Now I'm getting a bit confused. I downloaded 3.6, 3.7M1, 3.7M5 and the last nightly and cannot reproduce the problem on any of them what got me pretty confused. I figured out however, that the formatter configuration causes the problem. So after importing the javaFormatter.xml (which is attached), the problem should be reproducible.
(In reply to comment #5) > Created attachment 188508 [details] [diff] > Java Code Formatter Profile Thanks. Now I can reproduce iff I use the above profile AND turn on the on/off tags AND make sure that class name contains more than 2 A's. The only difference in this profile from the built in profile is in the Formatter>Line wrapping>Maximum line width setting. When this is set to >= 90, only then this bug shows up. Will investigate, time permitting.
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.