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

Bug 466920

Summary: Code formatting: Separate option "Wrap before operator" for strings and other items?
Product: [Eclipse Project] JDT Reporter: Stefan Eidelloth <matameko>
Component: CoreAssignee: Mateusz Matela <mateusz.matela>
Status: VERIFIED DUPLICATE QA Contact:
Severity: enhancement    
Priority: P3 CC: daniel_megert, jarthana, mateusz.matela
Version: 4.5   
Target Milestone: 4.11 M1   
Hardware: All   
OS: All   
Whiteboard:

Description Stefan Eidelloth CLA 2015-05-09 14:38:20 EDT
I would like to use line wrapping after operator for Strings and line wrapping before operator for other items (numbers, custom objects,..)

int foo =  baaa
           + veryveryveryloooooongexpression
           - shortexpression
           + anotherexpression;


String message = "Would you like to use line wrapping at " + position +
                 " ? If you want to keep that behavior press Enter."

If the first item in the binary expression is a String, I would like to disable the formatting option "Wrap after operator" and otherwise enable the "Wrap after operator"

=> Please introduce an additional option to allow this behavior.
(And please make sure this works for line wrapping inside method calls as well. Related bug report: https://bugs.eclipse.org/bugs/show_bug.cgi?id=466919 )
Comment 2 Mateusz Matela CLA 2018-12-28 16:52:48 EST

*** This bug has been marked as a duplicate of bug 543079 ***
Comment 3 Jay Arthanareeswaran CLA 2019-01-08 09:06:55 EST
Verified for 4.11 M1 using build I20190107-2050.