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

Bug 350945

Summary: "Binary expressions" formatting (code style) error
Product: [Tools] CDT Reporter: Gil Barash <scobido1984>
Component: cdt-editorAssignee: Project Inbox <cdt-editor-inbox>
Status: RESOLVED WORKSFORME QA Contact: Anton Leherbauer <aleherb+eclipse>
Severity: normal    
Priority: P3 CC: cdtdoug, yevshif, zeratul976
Version: 8.0   
Target Milestone: ---   
Hardware: PC   
OS: Windows 7   
Whiteboard:

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.