Community
Participate
Working Groups
Eclipse 3.1 M6 I'm writing Java code with all the code styles at default. The following lines wrap correctly: public class testc { public void func() { if (x) { button.setLayoutData(new RowData(buttonWidth, tpl .getButton1Height())); } } } But removing a single character causes it to wrap like this: public class testc { public void func() { if (x) { button .setLayoutData(new RowData(buttonWidth, tpl .getButtonHeight())); } } }
*** Bug 99027 has been marked as a duplicate of this bug. ***
Do you type this in or format? In neither scenario I can reproduce the problem using N20050608-0010. If you can reproduce using N20050608-0010 or newer please reopen and add more detailed steps to reproduce.
I tried it in N20050608-0010 and got the same problem. My co-worker gets the problem too. Here's a simpler example: public class junk { public void func() { object.methodcall(new objectname(parameter1, VeryLongFunctionCallName())); } } Paste that code segment into a java code file and then format it. (Make sure all the code formatter options are default). I get the following result: public class junk { public void func() { object .methodcall(new objectname(parameter1, VeryLongFunctionCallName())); } } Obviously, the break between "object" and ".methodcall" is incorrect. If I shorten "VeryLongFunctionCallName" by two characters and then reformat, then the problem goes away because the line is now 80 chars and doesn't need to wrap, like so: public class junk { public void func() { object.methodcall(new objectname(parameter1, ryLongFunctionCallName())); } } If I lengthen "VeryLongFunctionCallName" by one character and then reformat, then the problem also goes away and the line wraps correctly, like so: public class junk { public void func() { object.methodcall(new objectname(parameter1, AVeryLongFunctionCallName())); } } The problem seems to exist only when the line is 1 or 2 chars longer than the wrap length.
Adapted the summary to better reflect the problem.
*** This bug has been marked as a duplicate of bug 59891 ***
It was in fact more a duplicate of bug 264112, hence it's fixed since 3.6M5. *** This bug has been marked as a duplicate of bug 264112 ***
Verified for 3.6M7 using build I20100424-2000
Verified.