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.
Sun's published code conventions specify source formatting that is not supported by the built-in formatter. http://java.sun.com/docs/codeconv/html/CodeConvTOC.doc.html In particular the "wrapping" section http://java.sun.com/docs/codeconv/html/CodeConventions.doc3.html#248 clearly specifies that lines should break BEFORE and operator (for good reason), yet the built-in formatter breaks lines after operators. E.g. Sun code conventions would break a line like this: longName1 = longName2 * (longName3 + longName4 - longName5) + 4 * longname6; But the NetBeans formatter would break the same line like this: longName1 = longName2 * (longName3 + longName4 - longName5) + 4 * longname6; Since the operator is left dangling at the en of the line, where it still may need horizontal scrolling to become visible, it is less clear how the continuation line relates to the previous line. Coding preferences aside, the published conventions should be supported.
*** Issue 153536 has been marked as a duplicate of this issue. ***
*** Issue 155190 has been marked as a duplicate of this issue. ***
This CR will be fixed in 6.7 or not?
Fixed in jet-main. http://hg.netbeans.org/jet-main/rev/ba0c10e2adc1
Integrated into 'main-golden', will be available in build *200907310201* on http://bits.netbeans.org/dev/nightly/ (upload may still be in progress) Changeset: http://hg.netbeans.org/main-golden/rev/ba0c10e2adc1 User: Dusan Balek <dbalek@netbeans.org> Log: Issue #151154: Formatter does not support Sun code conventions - fixed.
Is this new behavior configurable or is it hard-coded?
Currently, the behavior is hard-coded, however, you could file a RFE for it.
RFE filed: bug # 177873