Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.
Bug 354060 - Java formatter line width setting is ignored
Summary: Java formatter line width setting is ignored
Status: CLOSED INVALID
Alias: None
Product: JDT
Classification: Eclipse Project
Component: Core (show other bugs)
Version: 3.8   Edit
Hardware: PC Windows 7
: P3 normal (vote)
Target Milestone: ---   Edit
Assignee: JDT-Core-Inbox CLA
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2011-08-05 18:17 EDT by Marcel CLA
Modified: 2011-08-08 14:03 EDT (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 Marcel CLA 2011-08-05 18:17:31 EDT
Build Identifier: 20110218-0911

The line width settings are all set to 132 characters, but the formatter assumes 80 characters in quite a few instances. Example:

    public void x() {
        xxxxxxxxxxxxx xxxxx = xxxxxxxxxxxxxxxxxxxxxxxxxx(3,
                new int[] { 3, 4, 3 }, 2);
        xxx xxxxx = xxxxxxxxx(3, new int[] { 3, 4, 3 }, 2);
    }

wraps the first assignment even though it is far from 132 chars wide. A similar assignment, but <80 characters wide, will not wrap.

Reproducible: Always

Steps to Reproduce:
1. Create formatter profile with Maximum Line Width set to 132
2. format some code with length >80 <132
3. See it wrap unnecessary
Comment 1 Ayushman Jain CLA 2011-08-08 01:23:07 EDT
Can you please attach your formatter profile? (Export from the formatter settings and attach here). Thanks!
Comment 2 Marcel CLA 2011-08-08 14:03:08 EDT
Nevermind. Probaly user error. There was a strangly named ("-") local project preference that overrode the global settings.