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 257620 - format nested "if else" goes too much
Summary: format nested "if else" goes too much
Status: NEW
Alias: None
Product: editor
Classification: Unclassified
Component: Formatting & Indentation (show other bugs)
Version: 8.1
Hardware: PC Mac OS X
: P3 normal (vote)
Assignee: Dusan Balek
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2016-01-19 08:54 UTC by bzimage
Modified: 2016-01-19 08:57 UTC (History)
0 users

See Also:
Issue Type: DEFECT
Exception Reporter:


Attachments
demo code (2.25 KB, application/octet-stream)
2016-01-19 08:54 UTC, bzimage
Details
after format screen shot (67.06 KB, image/png)
2016-01-19 08:57 UTC, bzimage
Details

Note You need to log in before you can comment on or make changes to this bug.
Description bzimage 2016-01-19 08:54:18 UTC
Created attachment 158174 [details]
demo code

Nested "if else" maybe redundant, but it makes code more readable, such as the put method in the demo code. But when applied with format, it will reduce the if else level. I dont think this reduce work should be done by format, it will be more reasonable for hint to give a hint that nested "if else" can be "unnested".
Comment 1 bzimage 2016-01-19 08:57:04 UTC
Created attachment 158175 [details]
after format screen shot