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.
Product Version = NetBeans IDE 7.3 Beta 2 (Build 201211062253) Operating System = Linux version 3.0.0-30-generic-pae running on i386 Java; VM; Vendor = 1.6.0_24 Runtime = OpenJDK Client VM 20.0-b12 Another one to consider ... <?php // Sometimes it is prudent to break up long lines for readability // Placing the operators at the end of each line formats ok, except maybe (?) one tab in too many $a = $b == 1 && $c == 2 && $d == 3; // placing the operators at the start of each line // (which some say is the correct way) // like this ... $a = $b == 1 && $c == 2 && $d == 3; // ... screws up: Puts it all back on one line resulting in this: $a = $b == 1 && $c == 2 && $d == 3; ?>
That "Group Multiline Assignment" feature is a whole crap and should never be implemented. Grrr :) It just makes problems... I'll try to look at it later. Thanks.
Good luck with that. It's quite a neat idea if done right.
It seems to be a buggy behavior of that first case (&& at the end of line), because wraping of binary operators is handled by Tools->Options->Editor->Formatting->PHP->Wrapping->Binary Operators. And if NEVER is set, then it should be reformatted to one line. It shouldn't be connected to Group Multiline Assignment option. Have to evaluate it more deeply. Product Version: NetBeans IDE Dev (Build 20130121-a14f31ffb7ce) Java: 1.6.0_26; Java HotSpot(TM) Client VM 20.1-b02 Runtime: Java(TM) SE Runtime Environment 1.6.0_26-b03 System: Linux version 3.5.0-21-generic running on i386; UTF-8; cs_CZ (nb)
Created attachment 130440 [details] pic of my settings FYI my settings
I take your point. But once the first case is fixed per your note the question then becomes: "how, for readability, can a statement be split over multiple lines?". In the example it is the logical operators we want to wrap on. Split the concept of "binary operators" into "logical" and "other"? Personally I don't see a use case for wrapping on binary operators as currently implemented, as for mine it makes a mess, but I guess others do?