Formatting: Group Multiline Alignment - Added
        Posted  
        
            by Petr
        on Oracle Blogs
        
        See other posts from Oracle Blogs
        
            or by Petr
        
        
        
        Published on Mon, 14 Nov 2011 06:06:44 -0600
        Indexed on 
            2011/11/14
            18:00 UTC
        
        
        Read the original article
        Hit count: 440
        
/Features
One week ago I have added two new properties for formating PHP code into NetBeans 7.1. In Alignment category there are new properties for Group Multiline Alignment - Assignment and Array Initializer.
 
 
The Assignment property influence position of the char '=' in a group of lines with assignments. Let see the pictures below.
 
 
On the left site - Assignment property is off and on the right site the property is on. As you can see, when the property is set on, then the assignment char '=' is placed after the longest identifier in a group. The group is defined as a number of lines that contains the same type of assignments. End of a group can be empty line, line where is only a comment, different expression, end of a block. This formatting options works for variable assignment, field initialization and constants.
The second new property is for Array Initializer.
 
 
Both properties are switched off by default.
If you will play with it, please file any problem into our Bugzilla.
© Oracle Blogs or respective owner