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

Summary: if else-if else formatting
Product: java Reporter: PatrikOlsson
Component: SourceAssignee: Svata Dedic <sdedic>
Status: NEW ---    
Severity: normal    
Priority: P3    
Version: 7.1   
Hardware: PC   
OS: Windows Vista   
Issue Type: ENHANCEMENT Exception Reporter:

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.