Jindent - Java Source Code Formatter http://www.jindent.com
 



title
5.6.2.10.3 Assignments

Align assignments

Align assignments

Controls whether assignments are aligned within one source code chunk or not.


Align assignments:

int field1     = 10;                    
int field2     = 0x0100010101;          
String message = "some text here...";   


Do not align assignments:

int field1 = 10;                        
int field2 = 0x0100010101;              
String message = "some text here...";   

See also... See also: Jindent - Settings - Formatter - C / C++ - Alignments - Chunks




Align assignments exceeding max. line length

Align assignments exceeding max. line length

Controls whether assignments which exceed maximal line length are aligned with other assignments or not.


Align exceeding assignments:

int field1       = 10;                                                |
int field2       = 0x0100010101;                                      |
char[] message   = "some text here...";                               |
MyClass myObject = new MyObject(parameterOne, parameterTwo,           |
                                
paremeterThree);                      |

Even if assignment of variable myObject exceeds the specified maximal line length it will be aligned.


Do not align exceeding assignments:

int field1     = 10;                                                  |
int field2     = 0x0100010101;                                        |
char[] message = "some text here...";                                 |
MyClass myObject = new MyObject(parameterOne, parameterTwo,           |
                                
paremeterThree);                      |

Assignment of variable myObject exceeds the specified maximal line length. Therefore it will be not aligned.



Indent assignments by tab stops

Indent assignments by tab stops

Controls whether assignments are indented by spaces or tabulator stops.


Indent assignments by tabulator stops:

int field1->--->10;                   
int field2->--->0x0100010101;         
char[] message->"some text here...";  


Do not indent assignments by tabulator stops, rather use white spaces:

int·field1·····=·10;                    
int·field2·····=·0x0100010101;          
char[]·message·=·"some·text·here...";