Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.
Bug 299473 - Max line length is not enforced by Java code formatter
Summary: Max line length is not enforced by Java code formatter
Status: RESOLVED DUPLICATE of bug 110569
Alias: None
Product: JDT
Classification: Eclipse Project
Component: Core (show other bugs)
Version: 3.5.1   Edit
Hardware: PC Windows XP
: P3 minor (vote)
Target Milestone: ---   Edit
Assignee: Frederic Fusier CLA
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2010-01-13 05:38 EST by Julien HENRY CLA
Modified: 2010-01-13 06:23 EST (History)
1 user (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Julien HENRY CLA 2010-01-13 05:38:14 EST
Build Identifier: 20090920-1017

In Preferences -> Java -> Formatter I have set Maximum line width to 120. But there are some cases where the formatter is not correctly wrapping the line.

Example:
    private void deleteDecom(final EntityManager em, final SubsystemId subsystemId, final MessagesLogger messagesLogger) {
is 123 character long.

Changing max line length to 118 make it wrap the line:
    private void deleteDecom(final EntityManager em, final SubsystemId subsystemId,
            final MessagesLogger messagesLogger) {

Reproducible: Always

Steps to Reproduce:
1.See details
Comment 1 Remy Suen CLA 2010-01-13 06:09:31 EST
(In reply to comment #0)
> In Preferences -> Java -> Formatter I have set Maximum line width to 120. But
> there are some cases where the formatter is not correctly wrapping the line.

Java tooling bugs goes to JDT, Java formatter bugs in particular goes to JDT/Core.
Comment 2 Frederic Fusier CLA 2010-01-13 06:23:31 EST
There are several bugs already opened around this issue.
Set as duplicate of the nearest one...

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