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



title
5.6.1.9.5 Statements

Wrap after for-each colon :

Wrap after for-each colon :

Controls line wrapping of colons in for-statements.



"Maximal line length" is set to 70 and line wrapping for colons in for-statemens is set to always:

public class ClassA {                                                 |
    
public void method() {                                            |
        
for (MyVariable variableName :                                |
                
getCollectionFromSomewhere(a, b, c, d, e, f)) {       |
            
// ...                                                    |
        
}                                                             |
    
}                                                                 |
}                                                                     |



"Maximal line length" is set to 70 and line wrapping for colons is set to never:

public class ClassA {                                                 |
    
public void method() {                                            |
        
for (MyVariable variableName : getCollectionFromSomewhere(a, b, 
                c, d, e, f)) {
                                        |
            
// ...                                                    |
        
}                                                             |
    
}                                                                 |
}                                                                     |



"Maximal line length" is set to 70 and line wrapping for colons is set to on demand:

public class ClassA {                                                 |
    
public void method() {                                            |
        
for (MyVariable variableName :                                |
                
getCollectionFromSomewhere(a, b, c, d, e, f)) {       |
            
// ...                                                    |
        
}                                                             |
    
}                                                                 |
}                                                                     |



"Maximal line length" is set to 60 and line wrapping for colons is set to if line exceeds:

public class ClassA {                                       |
    
public void method() {                                  |
        
for (MyVariable variableName :                      |
                
getCollectionFromSomewhere(a, b, c, d, e,   |
                                           
f)) {            |
            
// ...                                          |
        
}                                                   |
    
}                                                       |
}                                                           |