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 253359 - wrap line before dot in lambda
Summary: wrap line before dot in lambda
Status: NEW
Alias: None
Product: java
Classification: Unclassified
Component: Editor (show other bugs)
Version: 8.1
Hardware: All All
: P3 normal (vote)
Assignee: Dusan Balek
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2015-07-08 12:55 UTC by homberghp
Modified: 2015-07-08 12:58 UTC (History)
0 users

See Also:
Issue Type: ENHANCEMENT
Exception Reporter:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description homberghp 2015-07-08 12:55:18 UTC
It would be nice if you could chose where the line break takes place when
wrapping a lambda.
My personal preference is breaking before the dot in a fluent expression, so that 
a continued line start with that dot.

This is what I currently get (8.0.2, Linux) when wrapping

long sum = getLines().
                stream().
                mapToLong( InvoiceLine::getConsumerPrice ).
                sum();


This is what I would like
long sum = getLines()
                .stream()
                .mapToLong( InvoiceLine::getConsumerPrice )
                .sum();
Comment 1 homberghp 2015-07-08 12:58:48 UTC
Probably the description should read "wrap before chained method calls"