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



title
5.6.2.7.8 Colons

Space before colons of base specifiers

Space before colons of base specifiers

Controls whether a white space is inserted before colons of base specifiers or not.


Insert a white space before:

class·AnotherTest·:Test                 


Do not insert a white space before:

class·AnotherTest:Test                  



Space after colons of base specifiers

Space after colons of base specifiers

Controls whether a white space is inserted after colons of base specifiers or not.


Insert a white space after:

class·AnotherTest:·Test                 


Do not insert a white space after:

class·AnotherTest:Test                  



Space before colons of constructor initializers

Space before colons of constructor initializers

Controls whether a white space is inserted before colons of constructor initializers or not.


Insert a white space before:

AnotherTest(int·a,·int·b)·:Test(a,·b)   


Do not insert a white space before:

AnotherTest(int·a,·int·b):Test(a,·b)    



Space after colons of constructor initializers

Space after colons of constructor initializers

Controls whether a white space is inserted after colons of constructor initializers or not.


Insert a white space after:

AnotherTest(int·a,·int·b):·Test(a,·b)   


Do not insert a white space after:

AnotherTest(int·a,·int·b):Test(a,·b)    



Space before colons of ternary conditions

Space before colons of ternary conditions

Controls whether a white space is inserted before ternary colons or not.


Insert a white space before:

int·x·=·(a·==·0)·?·b·:·c;               


Do not insert a white space before:

int·x·=·(a·==·0)·?·b:·c;                



Space after colons of ternary conditions

Space after colons of ternary conditions

Controls whether a white space is inserted after ternary colons or not.


Insert a white space after:

int·x·=·(a·==·0)·?·b·:·c;               


Do not insert a white space after:

int·x·=·(a·==·0)·?·b·:c;                




See also... See also: Space before question marks of ternary conditions , Space after question marks of ternary conditions

Space before colons of labels

Space before colons of labels

Controls whether a white space is inserted before label colons or not.


Insert a white space before:

myLabel·:···while·(a·<·10)·{            
···············...                      
···············break·myLabel;           
···············...                      
············}                           


Do not insert a white space before:

myLabel:····while·(a·<·10)·{            
···············...                      
···············break·myLabel;           
···············...                      
············}                           



Space after colons of labels

Space after colons of labels

Controls whether a white space is inserted after label colons or not.


Insert a white space after:

myLabel:·while·(a·<·10)·{               
···...                                  
···break·myLabel;                       
···...                                  
}                                       


Do not insert a white space after:

myLabel:while·(a·<·10)·{                
···...                                  
···break·myLabel;                       
···...                                  
}                                       



Space before colons in switch-case blocks

Space before colons in switch-case blocks

Controls whether a white space is inserted before case colons or not.


Insert a white space before:

switch(a)·{                             
····case·1·:                            
········cout·<<·"one";                  
········break;                          
····case·2·:                            
········cout·<<·"two";                  
········break;                          
····case·3·:                            
········cout·<<·"three";                
········break;                          
····default·:                           
}                                       


Do not insert a white space before:

switch(a)·{                             
····case·1:                             
········cout·<<·"one";                  
········break;                          
····case·2:                             
········cout·<<·"two";                  
········break;                          
····case·3:                             
········cout·<<·"three";                
········break;                          
····default:                            
}                                       



Space before colons of bit fields

Space before colons of bit fields

Controls whether a white space is inserted before colons of bit fields or not.


Insert a white space before:

bool·field1·:0;                         
bool
·field2·:1;                         


Do not insert a white space before:

bool·field1:0;                          
bool
·field2:1;                          



Space after colons of bit fields

Space after colons of bit fields

Controls whether a white space is inserted after colons of bit fields or not.


Insert a white space before:

bool·field1:·0;                         
bool
·field2:·1;                         


Do not insert a white space after:

bool·field1:0;                          
bool
·field2:1;