Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.

Bug 135576

Summary: [formatter] Method declaration wraps too early between params
Product: [Eclipse Project] JDT Reporter: Andrzej Miazga <Andrzej.Miazga>
Component: CoreAssignee: JDT-Core-Inbox <jdt-core-inbox>
Status: CLOSED WONTFIX QA Contact:
Severity: normal    
Priority: P5 CC: Olivier_Thomann
Version: 3.2Keywords: helpwanted
Target Milestone: ---   
Hardware: PC   
OS: Windows XP   
Whiteboard: stalebug

Description Andrzej Miazga CLA 2006-04-07 11:41:03 EDT
It seems that the formatter assumes the maximum line width to be 1 char less than the number given in the preferences window ('Line wrapping' tab, 'Maximum line width' property). You can see it when you set line width for preview window to 49, for 'Line wrapping -> Method Declarations -> Parameters' option. In this case the method is wrapped after 'arg3' parameter, but the 'arg4' parameter would also fit the line. It looks this way:
    void foo(int arg1,int arg2,int arg3,
            int arg4,int arg5,int arg6) {
    }
but it should be like this:
    void foo(int arg1,int arg2,int arg3,int arg4,
            int arg5,int arg6) {
    }

On the other side, the formatter doesn't wrap the method declaration when only the closing bracket (and the opening brace) is after the right margin - it is described in bug 110569.
Comment 1 Frederic Fusier CLA 2008-08-18 08:07:18 EDT
Ownership has changed for the formatter, but I surely will not have enough time to fix your bug during the 3.5 development process, hence set its priority to P5.
Please provide a patch if you definitely need the bug to be fixed in this version and I'll have a look at it...
TIA
Comment 2 Eclipse Genie CLA 2020-03-30 20:06:01 EDT
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. As such, we're closing this bug.

If you have further information on the current state of the bug, please add it and reopen this bug. 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.