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

Bug 380094

Summary: [formatter] Doesn't wrap method declaration exceeding line length
Product: [Eclipse Project] JDT Reporter: Nobody - feel free to take it <nobody>
Component: CoreAssignee: JDT-Core-Inbox <jdt-core-inbox>
Status: RESOLVED DUPLICATE QA Contact:
Severity: normal    
Priority: P3 CC: amj87.iitr, markus.kell.r, nobody
Version: 3.8   
Target Milestone: ---   
Hardware: PC   
OS: Windows 7   
Whiteboard:

Description Nobody - feel free to take it CLA 2012-05-20 21:03:05 EDT
Build Identifier: 20120216-1857 

My Java formatter is set to a width of 120 characters, and I have a checkstyle configuration which also has the same setting.

On one line of code, when formatted, Eclipse says that its fine and won't put code on a new line and indent (it'll revert it to a single line if you attempt to).  However, the line length is 122, and Checkstyle is therefore saying its invalid.

Reproducible: Always

Steps to Reproduce:
1. Set Eclipse code formatter for Java to have a max line length of 120
2. Write a line of java that's 122 characters long.
(i.e.: void testIfThisWorks(final String variable1, final String variable2, final String variable3, final String variable4);)
3. Ctrl+F (or format), it'll remain on 122 lines.
Comment 1 Markus Keller CLA 2012-05-21 09:18:21 EDT
Probably a dup of bug 110569 or bug 303519.
Comment 2 Ayushman Jain CLA 2012-05-21 12:32:39 EDT
(In reply to comment #1)
> Probably a dup of bug 110569 or bug 303519.

Yup, this should be handled along with bug 303519

*** This bug has been marked as a duplicate of bug 303519 ***