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



title
5.6.1.11.2 Deleting

Delete block comments

Delete block comments

Removes all block comments.

Block comments are from type /* ... */ and contain muliple comment lines.
To keep all block comments from original source code just disable this setting.


Original input source code example:

public class MyClass {                  
    
int x, y, z;                        
                                        
    
/*                                  
     * some more declarations           
     */                                 
    
String a, b, c;                     
    ...                                 
}                                       


After deleting block comments:

public class MyClass {                  
    
int x, y, z;                        
    
String a, b, c;                     
    ...                                 
}                                       



Delete single-line comments

Delete single-line comments

Removes all single-line comments.

Single-line comments are from type /* ... */ and only contain one comment line.
To keep all single line comments from original source code just disable this setting.


Original input source code example:

public class MyClass {                  
    
int x, y, z;                        
                                        
    
/* some more declarations */        
    
String a, b, c;                     
    ...                                 
}                                       


After deleting single-line comments:

public class MyClass {                  
    
int x, y, z;                        
    
String a, b, c;                     
    ...                                 
}                                       



Delete end-of-line comments

Delete end-of-line comments

Removes all end-of-line comments.

End-of-line comments are from type // ... and do not appear as trailing comments.
To keep all single-line comments from original source code just disable this setting.


Original input source code example:

public class MyClass {                  
    
int x, y, z;                        
                                        
    
// some more                        
    
// declarations                     
    
String a, b, c;                     
    ...                                 
}                                       


After deleting end-of-line comments:

public class MyClass {                  
    
int x, y, z;                        
    
String a, b, c;                     
    ...                                 
}                                       



Delete trailing comments

Delete trailing comments

Removes all trailing comments.

Trailing comments are all kind of comments which appear on the same line as the code they describe. They are placed at the end of a line.
To keep all trailing comments from original source code just disable this setting.


Original input source code example:

public class MyClass {                  
    
int x, y, z;       // integer declarations
    
String a, b, c;    // String declarations
    
...                                 
}                                       


After deleting trailing comments:

public class MyClass {                  
    
int x, y, z;                        
    
String a, b, c;                     
    ...                                 
}                                       



Never delete comments beginning in first column

Never delete comments beginning in first column

Disables deletion of comments which start in the first column of source code.

First column comments are usually commented out source code elements which begin in the first column.


Do not change first column comments:

public class MyClass                    
{                                       
    
public void method() {              
/*                                      
      long i = 0;                       
      while (i < n) {                   
         result *= i;                   
         i++;                           
      }                                 
*/                                      
                                        
      
doSomethingElse();                
   }                                    
}                                       


Allow deletion of first column comments and the previous example would look like:

public class MyClass                    
{                                       
    
public void method() {              
      doSomethingElse();                
   }                                    
}                                       

This removes commented out source code elements. For that reason setting "Never delete comments beginning in first column" can be used to protect commented out source code.