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.
The following code is wrapped differently depending on the always / if long setting. // a single line $array = array(A\Long\ClassName::CONSTANT, A\Long\ClassName::CONSTANT2, A\Long\ClassName::CONSTANT3, A\Long\ClassName::CONSTANT4, A\Long\ClassName::CONSTANT5); With if long: $array = array(A\Long\ClassName::CONSTANT, A\Long\ClassName::CONSTANT2, A\Long\ClassName::CONSTANT3, A\Long\ClassName::CONSTANT4, A\Long\ClassName::CONSTANT5); With always: $array = array( A\Long\ClassName::CONSTANT, A\Long\ClassName::CONSTANT2, A\Long\ClassName::CONSTANT3, A\Long\ClassName::CONSTANT4, A\Long\ClassName::CONSTANT5); To me, the "if long" option results in much less readable code. Also, note that with "if long," the length of the lines still exceed the length specific in prefs.
IMHO the curent behavior is correct, "always" is not "if long" and NetBeans respects it. Or what is your expected result? (In reply to brettprofitt from comment #0) > Also, note > that with "if long," the length of the lines still exceed the length > specific in prefs. Yes, this is a valid bug. Thanks.
To be honest, it's been so long that I don't remember the specific case or know if it's still a bug. From my comments, it sounds like the config option should only change _when_ wrapping happens and not _how_ it happens. The first option ("wrap if long") is a true wrapping, while the second option is closer to "reformat array declaration" and not actual wrapping.
The current behavior (still identical in 8.2) is consistent with other behavior such as "Method Parameters". While I agree it may be a bit surprising, I don't think it should be changed. Or alternatively, a new wrapping option should be added. But IMHO, this should be closed as WONTFIX.