This Bugzilla instance is a read-only archive of historic NetBeans bug reports. To report a bug in NetBeans please follow the project's instructions for reporting issues.

Bug 178381

Summary: Multiline Alignment with Binary Operators
Product: java Reporter: majiknet <majiknet>
Component: SourceAssignee: Dusan Balek <dbalek>
Status: NEW ---    
Severity: normal CC: majiknet
Priority: P3    
Version: 6.x   
Hardware: PC   
OS: Windows 7   
Issue Type: ENHANCEMENT Exception Reporter:

Description majiknet 2009-12-09 09:45:35 UTC
In 6.8, automatic formatting for multiline alignment seems to have changed from 6.7. If I manually add a line-break after an operator, then in 6.7 it would align correctly with the start of the expression. In 6.8, it now removes the line-break and returns the remainder of the statement back to the original line. This does not happen if the line-break is before the operator, only when it is after.

As an example:

int a = 1 +
2;

"Source > Format" becomes:

int a = 1 + 2;

However, if I start with:

int a = 1
+ 2;

"Source > Format" becomes:

int a = 1
        + 2;

This is throwing a number of checkstyle errors at me as I'm wanting the operator to be before the break, and not at the start of the new line.
Comment 1 Jiri Prox 2009-12-09 11:33:18 UTC
The formatter follows java formatting conventions. 
But definitely there is a space for more formatting settings