Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.
Bug 413885 - [formatter] Eclipse Formatter Not Obeying Own Rules
Summary: [formatter] Eclipse Formatter Not Obeying Own Rules
Status: CLOSED DUPLICATE of bug 303519
Alias: None
Product: JDT
Classification: Eclipse Project
Component: Core (show other bugs)
Version: 4.3   Edit
Hardware: PC Windows 7
: P3 normal (vote)
Target Milestone: 4.5   Edit
Assignee: JDT-Core-Inbox CLA
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2013-07-28 19:51 EDT by Nobody - feel free to take it CLA
Modified: 2015-11-07 14:40 EST (History)
3 users (show)

See Also:


Attachments
Eclipse Formatter (30.42 KB, text/plain)
2013-07-28 19:52 EDT, Nobody - feel free to take it CLA
no flags Details

Note You need to log in before you can comment on or make changes to this bug.
Description Nobody - feel free to take it CLA 2013-07-28 19:51:09 EDT
Hi,

My Eclipse formatter is currently set to wrap after 120 characters.

However, on formatting, it will sometimes keep lines over that amount.

For example, if you format the following piece of code with the attached formatter, it will return as being valid on 1 line.  Checkstyle immediately has a heart attack, and says it's over 120 characters (which is correct).

Oddly, if I set it to wrap after 110 characters, it will in fact wrap at a point that would be valid for that many characters. :S


public boolean hasMinInputs() {
    return (hasSecurityType() || hasTriplet() || hasCustodianCash() || hasCustodianStock() || hasHoldingId() || hasImagineSite());
}

Thanks,
Michael
Comment 1 Nobody - feel free to take it CLA 2013-07-28 19:52:01 EDT
Created attachment 233867 [details]
Eclipse Formatter
Comment 2 Noopur Gupta CLA 2013-07-29 04:15:58 EDT
Probably a duplicate of bug 303519 or bug 349535?
Comment 3 Mateusz Matela CLA 2015-11-07 14:40:00 EST
This problem no longer occurs after the formatter redesign.

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