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



title
5.6.2.10.2 Variable/Field Declarations

Align variable/field declarations

Align variable/field declarations

Controls whether variable/field declarations are aligned within one source code chunk or not.


Align declarations:

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


Do not align declarations:

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

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




Align declarations exceeding max. line length

Align declarations exceeding max. line length

Controls whether variable/field delcarations which exceed maximal line length are aligned with other declarations or not.


Align exceeding declarations:

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

Even if declaration of field myObject exceeds the specified maximal line length it will be aligned.


Do not align exceeding declarations:

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

Declaration of field myObject exceeds the specified maximal line length. Therefore it will be not aligned.



Indent variable/field declarations by tab stops

Indent variable/field declarations by tab stops

Controls whether variable/field declarations are indented by spaces or tabulator stops.


Indent declarations by tabulator stops:

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


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

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