Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.
Bug 466919 - Code formatting: Line wrapping before/after operator is reverse for method arguments
Summary: Code formatting: Line wrapping before/after operator is reverse for method ar...
Status: VERIFIED FIXED
Alias: None
Product: JDT
Classification: Eclipse Project
Component: Core (show other bugs)
Version: 4.4.2   Edit
Hardware: PC Windows 7
: P3 minor (vote)
Target Milestone: 4.5 M7   Edit
Assignee: JDT-Core-Inbox CLA
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2015-05-09 14:29 EDT by Stefan Eidelloth CLA
Modified: 2015-05-19 00:03 EDT (History)
3 users (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Stefan Eidelloth CLA 2015-05-09 14:29:44 EDT
If I enable the option "Wrap before operator" for Binary expressions in the Formatter settings and disable the general option "Never join already wrapped lines", I would expect that lines are wrapped before operators. 

However, the following example is wrapped after the operator:

statusBuilder.append("This set is not yet present in the database!\n" +
                "You can save it by hitting the 'Save' button below.\n");

If I didable the option "Wrap before operator". The behavior is reversed.

Also see following stackoverflow article that I wrote on line wrapping:
http://stackoverflow.com/questions/30093578/how-to-use-different-line-wrapping-for-strings-and-other-items-in-eclipse-for-ja
Comment 1 Mateusz Matela CLA 2015-05-11 16:16:54 EDT
I can't reproduce. Are you sure you're using Eclipse 4.5 (the latest is milestone 7) as you suggest?
Comment 2 Stefan Eidelloth CLA 2015-05-12 00:49:33 EDT
Oh, I am very sorry for that. I thought my Eclipse would be up to date and I forgot to consider the version. Thanks a lot.
Comment 3 Jay Arthanareeswaran CLA 2015-05-12 01:02:32 EDT
Mateusz, do you have an idea which commit addressed this?
Comment 4 Manoj N Palat CLA 2015-05-19 00:03:15 EDT
Verified for Eclipse Mars 4.5 RC1 build id: I20150514-1000