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 208949 - if else-if else formatting
Summary: if else-if else formatting
Status: NEW
Alias: None
Product: java
Classification: Unclassified
Component: Source (show other bugs)
Version: 7.1
Hardware: PC Windows Vista
: P3 normal (vote)
Assignee: Svata Dedic
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2012-02-28 12:34 UTC by PatrikOlsson
Modified: 2013-09-02 14:19 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 PatrikOlsson 2012-02-28 12:34:38 UTC
Under formatting rules for Java, category Braces there is an option special "else if" treatment. This option appear to have been inverted by design or error.

When checked the rule will disable the formatting of if-else statements into cascading if-statements.

When unchecked (default) the rule will perform irreversible code changes to the code namely introduce the cascading if-statements.

Suggested change, invert the option, when checked the "special" treatment should be enabled. Default option should continue to be off to avoid irreversible code changes.

(I signed up to report this as this "feature" has ruined 100+ files over a period of time without me noticing it. Irreversible code changes and being default option is not a good combo.)
Comment 1 PatrikOlsson 2012-02-28 13:19:41 UTC
Recommend that the option is also renamed to something similar to "Cascade if-else statements" (default off). Current name "Special "else-if" Treatment" is rather undescriptive.