Summary: | formatter wraps line improperly | ||
---|---|---|---|
Product: | [Eclipse Project] JDT | Reporter: | Trevor Janes <trevorj> |
Component: | Core | Assignee: | Frederic Fusier <frederic_fusier> |
Status: | VERIFIED DUPLICATE | QA Contact: | |
Severity: | normal | ||
Priority: | P3 | CC: | cagatayk, daniel_megert, gunnar, jarthana, nikolaymetchev, satyam.kandula |
Version: | 3.1 | ||
Target Milestone: | 3.6 M5 | ||
Hardware: | PC | ||
OS: | Windows XP | ||
Whiteboard: |
Description
Trevor Janes
2005-06-08 14:29:12 EDT
*** 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. |