Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.
Bug 350945 - "Binary expressions" formatting (code style) error
Summary: "Binary expressions" formatting (code style) error
Status: RESOLVED WORKSFORME
Alias: None
Product: CDT
Classification: Tools
Component: cdt-editor (show other bugs)
Version: 8.0   Edit
Hardware: PC Windows 7
: P3 normal (vote)
Target Milestone: ---   Edit
Assignee: Project Inbox CLA
QA Contact: Anton Leherbauer CLA
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2011-07-01 10:55 EDT by Gil Barash CLA
Modified: 2016-12-29 01:11 EST (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 Gil Barash CLA 2011-07-01 10:55:26 EDT
When customizing the code style, under the "line wrapping" tab, choose the "Binary expressions" element in the tree. 
Set "indent policy" to "wrap only when necessary" and "indent on column".

This is the result:

int foo()
{
  int sum = 100 + 200 + 300 + 400 + 500
            + 600
            + 700
            + 800;

While I would expect (which is similar to what I get when choosing "default indentation"):

int foo()
{
  int sum = 100 + 200 + 300 + 400 + 500
            + 600 + 700 + 800;
Comment 1 Nathan Ridge CLA 2015-12-15 21:18:43 EST
I just tried this, and I get the second (expected) result.
Comment 2 Nathan Ridge CLA 2016-12-29 01:11:03 EST
Closing per comment 1. Feel free to reopen if you're still seeing this.