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 219414 - [73cat] Ugly code formatting when lambda is passed as argument.
Summary: [73cat] Ugly code formatting when lambda is passed as argument.
Status: CLOSED FIXED
Alias: None
Product: cnd
Classification: Unclassified
Component: Editor (show other bugs)
Version: 7.3
Hardware: PC Windows 7
: P3 normal (vote)
Assignee: Alexander Simon
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2012-10-03 05:21 UTC by kosmonaffft
Modified: 2012-10-16 16:25 UTC (History)
0 users

See Also:
Issue Type: DEFECT
Exception Reporter:


Attachments
Ugly lambda formatting. (211.91 KB, image/png)
2012-10-03 05:21 UTC, kosmonaffft
Details

Note You need to log in before you can comment on or make changes to this bug.
Description kosmonaffft 2012-10-03 05:21:23 UTC
Created attachment 125264 [details]
Ugly lambda formatting.

Ugly code formatting when lambda is passea as argument. See attachment.

I think this variant is more better (indent lambda braces like other arguments, and indent lambda body inside braces):

result = ::std::accumulate(::std::begin(x), ::std::end(x), 0.0,
                           [&m](Double a, Double x) -> Double
                           {
                               return a+ (x - m) * (x - m);
                           });
Comment 1 Leonid Lenyashin 2012-10-05 18:05:53 UTC
Please evaluate if it can be done in 7.3. If not please mark it in some way (to make it clear that it is risky and effort-consuming) and retarget to Next.
Comment 2 Alexander Simon 2012-10-09 16:14:10 UTC
fix lambda formatting:
http://hg.netbeans.org/cnd-main/rev/e30315f668e2
No UI, reused options of other braces
Comment 3 Quality Engineering 2012-10-10 03:04:42 UTC
Integrated into 'main-golden', will be available in build *201210100002* on http://bits.netbeans.org/dev/nightly/ (upload may still be in progress)
Changeset: http://hg.netbeans.org/main-golden/rev/e30315f668e2
User: Alexander Simon <alexvsimon@netbeans.org>
Log: fixing Bug #219414 [73cat] Ugly code formatting when lambda is passed as argument.
Comment 4 Alexander Simon 2012-10-10 09:53:27 UTC
added formatting options for lambda braces:
http://hg.netbeans.org/cnd-main/rev/80168e329bb0
fix indent:
http://hg.netbeans.org/cnd-main/rev/4b8e54931d61
Comment 5 Quality Engineering 2012-10-11 02:01:12 UTC
Integrated into 'main-golden', will be available in build *201210110002* on http://bits.netbeans.org/dev/nightly/ (upload may still be in progress)
Changeset: http://hg.netbeans.org/main-golden/rev/80168e329bb0
User: Alexander Simon <alexvsimon@netbeans.org>
Log: fixing Bug #219414 [73cat] Ugly code formatting when lambda is passed as argument.
- added formatting options for lambda braces
Comment 6 kosmonaffft 2012-10-16 16:21:26 UTC
Thanks for fixing it...