Coverage Report - org.apache.maven.plugin.HelpMojo
 
Classes in this File Line Coverage Branch Coverage Complexity
HelpMojo
0%
0/258
0%
0/62
4,667
 
 1  
 package org.apache.maven.plugin;
 2  
 
 3  
 import java.util.ArrayList;
 4  
 import java.util.Iterator;
 5  
 import java.util.List;
 6  
 
 7  
 import org.apache.maven.plugin.AbstractMojo;
 8  
 import org.apache.maven.plugin.MojoExecutionException;
 9  
 
 10  
 /**
 11  
  * Display help information on maven-compiler-plugin.<br/> Call <pre>  mvn compiler:help -Ddetail=true -Dgoal=&lt;goal-name&gt;</pre> to display parameter details.
 12  
  *
 13  
  * @version generated on Sat Sep 04 16:10:33 CEST 2010
 14  
  * @author org.apache.maven.tools.plugin.generator.PluginHelpGenerator (version 2.6)
 15  
  * @goal help
 16  
  * @requiresProject false
 17  
  */
 18  0
 public class HelpMojo
 19  
     extends AbstractMojo
 20  
 {
 21  
     /**
 22  
      * If <code>true</code>, display all settable properties for each goal.
 23  
      * 
 24  
      * @parameter expression="${detail}" default-value="false"
 25  
      */
 26  
     private boolean detail;
 27  
 
 28  
     /**
 29  
      * The name of the goal for which to show help. If unspecified, all goals will be displayed.
 30  
      * 
 31  
      * @parameter expression="${goal}"
 32  
      */
 33  
     private java.lang.String goal;
 34  
 
 35  
     /**
 36  
      * The maximum length of a display line, should be positive.
 37  
      * 
 38  
      * @parameter expression="${lineLength}" default-value="80"
 39  
      */
 40  
     private int lineLength;
 41  
 
 42  
     /**
 43  
      * The number of spaces per indentation level, should be positive.
 44  
      * 
 45  
      * @parameter expression="${indentSize}" default-value="2"
 46  
      */
 47  
     private int indentSize;
 48  
 
 49  
 
 50  
     /** {@inheritDoc} */
 51  
     public void execute()
 52  
         throws MojoExecutionException
 53  
     {
 54  0
         if ( lineLength <= 0 )
 55  
         {
 56  0
             getLog().warn( "The parameter 'lineLength' should be positive, using '80' as default." );
 57  0
             lineLength = 80;
 58  
         }
 59  0
         if ( indentSize <= 0 )
 60  
         {
 61  0
             getLog().warn( "The parameter 'indentSize' should be positive, using '2' as default." );
 62  0
             indentSize = 2;
 63  
         }
 64  
 
 65  0
         StringBuffer sb = new StringBuffer();
 66  
 
 67  0
         append( sb, "org.apache.maven.plugins:maven-compiler-plugin:2.3.2", 0 );
 68  0
         append( sb, "", 0 );
 69  
 
 70  0
         append( sb, "Maven Compiler Plugin", 0 );
 71  0
         append( sb, "The Compiler Plugin is used to compile the sources of your project.", 1 );
 72  0
         append( sb, "", 0 );
 73  
 
 74  0
         if ( goal == null || goal.length() <= 0 )
 75  
         {
 76  0
             append( sb, "This plugin has 3 goals:", 0 );
 77  0
             append( sb, "", 0 );
 78  
         }
 79  
 
 80  0
         if ( goal == null || goal.length() <= 0 || "compile".equals( goal ) )
 81  
         {
 82  0
             append( sb, "compiler:compile", 0 );
 83  0
             append( sb, "Compiles application sources", 1 );
 84  0
             append( sb, "", 0 );
 85  0
             if ( detail )
 86  
             {
 87  0
                 append( sb, "Available parameters:", 1 );
 88  0
                 append( sb, "", 0 );
 89  
 
 90  0
                 append( sb, "annotationProcessors", 2 );
 91  0
                 append( sb, "Names of annotation processors to run. Only applies to JDK 1.6+ If not set, the default annotation processors discovery process applies.\n", 3 );
 92  0
                 append( sb, "", 0 );
 93  
 
 94  0
                 append( sb, "compilerArgument", 2 );
 95  0
                 append( sb, "Sets the unformatted argument string to be passed to the compiler if fork is set to true.\n\nThis is because the list of valid arguments passed to a Java compiler varies based on the compiler version.\n", 3 );
 96  0
                 append( sb, "", 0 );
 97  
 
 98  0
                 append( sb, "compilerArguments", 2 );
 99  0
                 append( sb, "Sets the arguments to be passed to the compiler (prepending a dash) if fork is set to true.\n\nThis is because the list of valid arguments passed to a Java compiler varies based on the compiler version.\n", 3 );
 100  0
                 append( sb, "", 0 );
 101  
 
 102  0
                 append( sb, "compilerId (Default: javac)", 2 );
 103  0
                 append( sb, "The compiler id of the compiler to use. See this guide for more information.", 3 );
 104  0
                 append( sb, "", 0 );
 105  
 
 106  0
                 append( sb, "compilerVersion", 2 );
 107  0
                 append( sb, "Version of the compiler to use, ex. \'1.3\', \'1.5\', if fork is set to true.", 3 );
 108  0
                 append( sb, "", 0 );
 109  
 
 110  0
                 append( sb, "debug (Default: true)", 2 );
 111  0
                 append( sb, "Set to true to include debugging information in the compiled class files.", 3 );
 112  0
                 append( sb, "", 0 );
 113  
 
 114  0
                 append( sb, "debuglevel", 2 );
 115  0
                 append( sb, "Keyword list to be appended to the -g command-line switch. Legal values are none or a comma-separated list of the following keywords: lines, vars, and source. If debuglevel is not specified, by default, nothing will be appended to -g. If debug is not turned on, this attribute will be ignored.", 3 );
 116  0
                 append( sb, "", 0 );
 117  
 
 118  0
                 append( sb, "encoding (Default: ${project.build.sourceEncoding})", 2 );
 119  0
                 append( sb, "The -encoding argument for the Java compiler.", 3 );
 120  0
                 append( sb, "", 0 );
 121  
 
 122  0
                 append( sb, "excludes", 2 );
 123  0
                 append( sb, "A list of exclusion filters for the compiler.", 3 );
 124  0
                 append( sb, "", 0 );
 125  
 
 126  0
                 append( sb, "executable", 2 );
 127  0
                 append( sb, "Sets the executable of the compiler to use when fork is true.", 3 );
 128  0
                 append( sb, "", 0 );
 129  
 
 130  0
                 append( sb, "failOnError (Default: true)", 2 );
 131  0
                 append( sb, "Indicates whether the build will continue even if there are compilation errors; defaults to true.", 3 );
 132  0
                 append( sb, "", 0 );
 133  
 
 134  0
                 append( sb, "fork (Default: false)", 2 );
 135  0
                 append( sb, "Allows running the compiler in a separate process. If \'false\' it uses the built in compiler, while if \'true\' it will use an executable.", 3 );
 136  0
                 append( sb, "", 0 );
 137  
 
 138  0
                 append( sb, "generatedSourcesDirectory (Default: ${project.build.directory}/generated-sources/annotations)", 2 );
 139  0
                 append( sb, "Specify where to place generated source files created by annotation processing. Only applies to JDK 1.6+\n", 3 );
 140  0
                 append( sb, "", 0 );
 141  
 
 142  0
                 append( sb, "includes", 2 );
 143  0
                 append( sb, "A list of inclusion filters for the compiler.", 3 );
 144  0
                 append( sb, "", 0 );
 145  
 
 146  0
                 append( sb, "maxmem", 2 );
 147  0
                 append( sb, "Sets the maximum size, in megabytes, of the memory allocation pool, ex. \'128\', \'128m\' if fork is set to true.", 3 );
 148  0
                 append( sb, "", 0 );
 149  
 
 150  0
                 append( sb, "meminitial", 2 );
 151  0
                 append( sb, "Initial size, in megabytes, of the memory allocation pool, ex. \'64\', \'64m\' if fork is set to true.", 3 );
 152  0
                 append( sb, "", 0 );
 153  
 
 154  0
                 append( sb, "optimize (Default: false)", 2 );
 155  0
                 append( sb, "Set to true to optimize the compiled code using the compiler\'s optimization methods.", 3 );
 156  0
                 append( sb, "", 0 );
 157  
 
 158  0
                 append( sb, "outputFileName", 2 );
 159  0
                 append( sb, "Sets the name of the output file when compiling a set of sources to a single file.", 3 );
 160  0
                 append( sb, "", 0 );
 161  
 
 162  0
                 append( sb, "proc", 2 );
 163  0
                 append( sb, "Sets whether annotation processing is performed or not. Only applies to JDK 1.6+ If not set, both compilation and annotation processing are performed at the same time.\n\nAllowed values are: none - no annotation processing is performed. only - only annotation processing is done, no compilation.\n", 3 );
 164  0
                 append( sb, "", 0 );
 165  
 
 166  0
                 append( sb, "showDeprecation (Default: false)", 2 );
 167  0
                 append( sb, "Sets whether to show source locations where deprecated APIs are used.", 3 );
 168  0
                 append( sb, "", 0 );
 169  
 
 170  0
                 append( sb, "showWarnings (Default: false)", 2 );
 171  0
                 append( sb, "Set to true to show compilation warnings.", 3 );
 172  0
                 append( sb, "", 0 );
 173  
 
 174  0
                 append( sb, "source (Default: 1.5)", 2 );
 175  0
                 append( sb, "The -source argument for the Java compiler.", 3 );
 176  0
                 append( sb, "", 0 );
 177  
 
 178  0
                 append( sb, "staleMillis (Default: 0)", 2 );
 179  0
                 append( sb, "Sets the granularity in milliseconds of the last modification date for testing whether a source needs recompilation.", 3 );
 180  0
                 append( sb, "", 0 );
 181  
 
 182  0
                 append( sb, "target (Default: 1.5)", 2 );
 183  0
                 append( sb, "The -target argument for the Java compiler.", 3 );
 184  0
                 append( sb, "", 0 );
 185  
 
 186  0
                 append( sb, "verbose (Default: false)", 2 );
 187  0
                 append( sb, "Set to true to show messages about what the compiler is doing.", 3 );
 188  0
                 append( sb, "", 0 );
 189  
             }
 190  
         }
 191  
 
 192  0
         if ( goal == null || goal.length() <= 0 || "help".equals( goal ) )
 193  
         {
 194  0
             append( sb, "compiler:help", 0 );
 195  0
             append( sb, "Display help information on maven-compiler-plugin.\nCall\n\u00a0\u00a0mvn\u00a0compiler:help\u00a0-Ddetail=true\u00a0-Dgoal=<goal-name>\nto display parameter details.", 1 );
 196  0
             append( sb, "", 0 );
 197  0
             if ( detail )
 198  
             {
 199  0
                 append( sb, "Available parameters:", 1 );
 200  0
                 append( sb, "", 0 );
 201  
 
 202  0
                 append( sb, "detail (Default: false)", 2 );
 203  0
                 append( sb, "If true, display all settable properties for each goal.", 3 );
 204  0
                 append( sb, "", 0 );
 205  
 
 206  0
                 append( sb, "goal", 2 );
 207  0
                 append( sb, "The name of the goal for which to show help. If unspecified, all goals will be displayed.", 3 );
 208  0
                 append( sb, "", 0 );
 209  
 
 210  0
                 append( sb, "indentSize (Default: 2)", 2 );
 211  0
                 append( sb, "The number of spaces per indentation level, should be positive.", 3 );
 212  0
                 append( sb, "", 0 );
 213  
 
 214  0
                 append( sb, "lineLength (Default: 80)", 2 );
 215  0
                 append( sb, "The maximum length of a display line, should be positive.", 3 );
 216  0
                 append( sb, "", 0 );
 217  
             }
 218  
         }
 219  
 
 220  0
         if ( goal == null || goal.length() <= 0 || "testCompile".equals( goal ) )
 221  
         {
 222  0
             append( sb, "compiler:testCompile", 0 );
 223  0
             append( sb, "Compiles application test sources.", 1 );
 224  0
             append( sb, "", 0 );
 225  0
             if ( detail )
 226  
             {
 227  0
                 append( sb, "Available parameters:", 1 );
 228  0
                 append( sb, "", 0 );
 229  
 
 230  0
                 append( sb, "annotationProcessors", 2 );
 231  0
                 append( sb, "Names of annotation processors to run. Only applies to JDK 1.6+ If not set, the default annotation processors discovery process applies.\n", 3 );
 232  0
                 append( sb, "", 0 );
 233  
 
 234  0
                 append( sb, "compilerArgument", 2 );
 235  0
                 append( sb, "Sets the unformatted argument string to be passed to the compiler if fork is set to true.\n\nThis is because the list of valid arguments passed to a Java compiler varies based on the compiler version.\n", 3 );
 236  0
                 append( sb, "", 0 );
 237  
 
 238  0
                 append( sb, "compilerArguments", 2 );
 239  0
                 append( sb, "Sets the arguments to be passed to the compiler (prepending a dash) if fork is set to true.\n\nThis is because the list of valid arguments passed to a Java compiler varies based on the compiler version.\n", 3 );
 240  0
                 append( sb, "", 0 );
 241  
 
 242  0
                 append( sb, "compilerId (Default: javac)", 2 );
 243  0
                 append( sb, "The compiler id of the compiler to use. See this guide for more information.", 3 );
 244  0
                 append( sb, "", 0 );
 245  
 
 246  0
                 append( sb, "compilerVersion", 2 );
 247  0
                 append( sb, "Version of the compiler to use, ex. \'1.3\', \'1.5\', if fork is set to true.", 3 );
 248  0
                 append( sb, "", 0 );
 249  
 
 250  0
                 append( sb, "debug (Default: true)", 2 );
 251  0
                 append( sb, "Set to true to include debugging information in the compiled class files.", 3 );
 252  0
                 append( sb, "", 0 );
 253  
 
 254  0
                 append( sb, "debuglevel", 2 );
 255  0
                 append( sb, "Keyword list to be appended to the -g command-line switch. Legal values are none or a comma-separated list of the following keywords: lines, vars, and source. If debuglevel is not specified, by default, nothing will be appended to -g. If debug is not turned on, this attribute will be ignored.", 3 );
 256  0
                 append( sb, "", 0 );
 257  
 
 258  0
                 append( sb, "encoding (Default: ${project.build.sourceEncoding})", 2 );
 259  0
                 append( sb, "The -encoding argument for the Java compiler.", 3 );
 260  0
                 append( sb, "", 0 );
 261  
 
 262  0
                 append( sb, "executable", 2 );
 263  0
                 append( sb, "Sets the executable of the compiler to use when fork is true.", 3 );
 264  0
                 append( sb, "", 0 );
 265  
 
 266  0
                 append( sb, "failOnError (Default: true)", 2 );
 267  0
                 append( sb, "Indicates whether the build will continue even if there are compilation errors; defaults to true.", 3 );
 268  0
                 append( sb, "", 0 );
 269  
 
 270  0
                 append( sb, "fork (Default: false)", 2 );
 271  0
                 append( sb, "Allows running the compiler in a separate process. If \'false\' it uses the built in compiler, while if \'true\' it will use an executable.", 3 );
 272  0
                 append( sb, "", 0 );
 273  
 
 274  0
                 append( sb, "generatedTestSourcesDirectory (Default: ${project.build.directory}/generated-sources/test-annotations)", 2 );
 275  0
                 append( sb, "Specify where to place generated source files created by annotation processing. Only applies to JDK 1.6+\n", 3 );
 276  0
                 append( sb, "", 0 );
 277  
 
 278  0
                 append( sb, "maxmem", 2 );
 279  0
                 append( sb, "Sets the maximum size, in megabytes, of the memory allocation pool, ex. \'128\', \'128m\' if fork is set to true.", 3 );
 280  0
                 append( sb, "", 0 );
 281  
 
 282  0
                 append( sb, "meminitial", 2 );
 283  0
                 append( sb, "Initial size, in megabytes, of the memory allocation pool, ex. \'64\', \'64m\' if fork is set to true.", 3 );
 284  0
                 append( sb, "", 0 );
 285  
 
 286  0
                 append( sb, "optimize (Default: false)", 2 );
 287  0
                 append( sb, "Set to true to optimize the compiled code using the compiler\'s optimization methods.", 3 );
 288  0
                 append( sb, "", 0 );
 289  
 
 290  0
                 append( sb, "outputFileName", 2 );
 291  0
                 append( sb, "Sets the name of the output file when compiling a set of sources to a single file.", 3 );
 292  0
                 append( sb, "", 0 );
 293  
 
 294  0
                 append( sb, "proc", 2 );
 295  0
                 append( sb, "Sets whether annotation processing is performed or not. Only applies to JDK 1.6+ If not set, both compilation and annotation processing are performed at the same time.\n\nAllowed values are: none - no annotation processing is performed. only - only annotation processing is done, no compilation.\n", 3 );
 296  0
                 append( sb, "", 0 );
 297  
 
 298  0
                 append( sb, "showDeprecation (Default: false)", 2 );
 299  0
                 append( sb, "Sets whether to show source locations where deprecated APIs are used.", 3 );
 300  0
                 append( sb, "", 0 );
 301  
 
 302  0
                 append( sb, "showWarnings (Default: false)", 2 );
 303  0
                 append( sb, "Set to true to show compilation warnings.", 3 );
 304  0
                 append( sb, "", 0 );
 305  
 
 306  0
                 append( sb, "skip", 2 );
 307  0
                 append( sb, "Set this to \'true\' to bypass unit tests entirely. Its use is NOT RECOMMENDED, but quite convenient on occasion.", 3 );
 308  0
                 append( sb, "", 0 );
 309  
 
 310  0
                 append( sb, "source (Default: 1.5)", 2 );
 311  0
                 append( sb, "The -source argument for the Java compiler.", 3 );
 312  0
                 append( sb, "", 0 );
 313  
 
 314  0
                 append( sb, "staleMillis (Default: 0)", 2 );
 315  0
                 append( sb, "Sets the granularity in milliseconds of the last modification date for testing whether a source needs recompilation.", 3 );
 316  0
                 append( sb, "", 0 );
 317  
 
 318  0
                 append( sb, "target (Default: 1.5)", 2 );
 319  0
                 append( sb, "The -target argument for the Java compiler.", 3 );
 320  0
                 append( sb, "", 0 );
 321  
 
 322  0
                 append( sb, "testCompilerArgument", 2 );
 323  0
                 append( sb, "Sets the unformatted argument string to be passed to test compiler if fork is set to true.\n\nThis is because the list of valid arguments passed to a Java compiler varies based on the compiler version.\n", 3 );
 324  0
                 append( sb, "", 0 );
 325  
 
 326  0
                 append( sb, "testCompilerArguments", 2 );
 327  0
                 append( sb, "Sets the arguments to be passed to test compiler (prepending a dash) if fork is set to true.\n\nThis is because the list of valid arguments passed to a Java compiler varies based on the compiler version.\n", 3 );
 328  0
                 append( sb, "", 0 );
 329  
 
 330  0
                 append( sb, "testExcludes", 2 );
 331  0
                 append( sb, "A list of exclusion filters for the compiler.", 3 );
 332  0
                 append( sb, "", 0 );
 333  
 
 334  0
                 append( sb, "testIncludes", 2 );
 335  0
                 append( sb, "A list of inclusion filters for the compiler.", 3 );
 336  0
                 append( sb, "", 0 );
 337  
 
 338  0
                 append( sb, "testSource", 2 );
 339  0
                 append( sb, "The -source argument for the test Java compiler.", 3 );
 340  0
                 append( sb, "", 0 );
 341  
 
 342  0
                 append( sb, "testTarget", 2 );
 343  0
                 append( sb, "The -target argument for the test Java compiler.", 3 );
 344  0
                 append( sb, "", 0 );
 345  
 
 346  0
                 append( sb, "verbose (Default: false)", 2 );
 347  0
                 append( sb, "Set to true to show messages about what the compiler is doing.", 3 );
 348  0
                 append( sb, "", 0 );
 349  
             }
 350  
         }
 351  
 
 352  0
         if ( getLog().isInfoEnabled() )
 353  
         {
 354  0
             getLog().info( sb.toString() );
 355  
         }
 356  0
     }
 357  
 
 358  
     /**
 359  
      * <p>Repeat a String <code>n</code> times to form a new string.</p>
 360  
      *
 361  
      * @param str String to repeat
 362  
      * @param repeat number of times to repeat str
 363  
      * @return String with repeated String
 364  
      * @throws NegativeArraySizeException if <code>repeat < 0</code>
 365  
      * @throws NullPointerException if str is <code>null</code>
 366  
      */
 367  
     private static String repeat( String str, int repeat )
 368  
     {
 369  0
         StringBuffer buffer = new StringBuffer( repeat * str.length() );
 370  
 
 371  0
         for ( int i = 0; i < repeat; i++ )
 372  
         {
 373  0
             buffer.append( str );
 374  
         }
 375  
 
 376  0
         return buffer.toString();
 377  
     }
 378  
 
 379  
     /** 
 380  
      * Append a description to the buffer by respecting the indentSize and lineLength parameters.
 381  
      * <b>Note</b>: The last character is always a new line.
 382  
      * 
 383  
      * @param sb The buffer to append the description, not <code>null</code>.
 384  
      * @param description The description, not <code>null</code>.
 385  
      * @param indent The base indentation level of each line, must not be negative.
 386  
      */
 387  
     private void append( StringBuffer sb, String description, int indent )
 388  
     {
 389  0
         for ( Iterator it = toLines( description, indent, indentSize, lineLength ).iterator(); it.hasNext(); )
 390  
         {
 391  0
             sb.append( it.next().toString() ).append( '\n' );
 392  
         }
 393  0
     }
 394  
 
 395  
     /** 
 396  
      * Splits the specified text into lines of convenient display length.
 397  
      * 
 398  
      * @param text The text to split into lines, must not be <code>null</code>.
 399  
      * @param indent The base indentation level of each line, must not be negative.
 400  
      * @param indentSize The size of each indentation, must not be negative.
 401  
      * @param lineLength The length of the line, must not be negative.
 402  
      * @return The sequence of display lines, never <code>null</code>.
 403  
      * @throws NegativeArraySizeException if <code>indent < 0</code>
 404  
      */
 405  
     private static List toLines( String text, int indent, int indentSize, int lineLength )
 406  
     {
 407  0
         List lines = new ArrayList();
 408  
 
 409  0
         String ind = repeat( "\t", indent );
 410  0
         String[] plainLines = text.split( "(\r\n)|(\r)|(\n)" );
 411  0
         for ( int i = 0; i < plainLines.length; i++ )
 412  
         {
 413  0
             toLines( lines, ind + plainLines[i], indentSize, lineLength );
 414  
         }
 415  
 
 416  0
         return lines;
 417  
     }
 418  
 
 419  
     /** 
 420  
      * Adds the specified line to the output sequence, performing line wrapping if necessary.
 421  
      * 
 422  
      * @param lines The sequence of display lines, must not be <code>null</code>.
 423  
      * @param line The line to add, must not be <code>null</code>.
 424  
      * @param indentSize The size of each indentation, must not be negative.
 425  
      * @param lineLength The length of the line, must not be negative.
 426  
      */
 427  
     private static void toLines( List lines, String line, int indentSize, int lineLength )
 428  
     {
 429  0
         int lineIndent = getIndentLevel( line );
 430  0
         StringBuffer buf = new StringBuffer( 256 );
 431  0
         String[] tokens = line.split( " +" );
 432  0
         for ( int i = 0; i < tokens.length; i++ )
 433  
         {
 434  0
             String token = tokens[i];
 435  0
             if ( i > 0 )
 436  
             {
 437  0
                 if ( buf.length() + token.length() >= lineLength )
 438  
                 {
 439  0
                     lines.add( buf.toString() );
 440  0
                     buf.setLength( 0 );
 441  0
                     buf.append( repeat( " ", lineIndent * indentSize ) );
 442  
                 }
 443  
                 else
 444  
                 {
 445  0
                     buf.append( ' ' );
 446  
                 }
 447  
             }
 448  0
             for ( int j = 0; j < token.length(); j++ )
 449  
             {
 450  0
                 char c = token.charAt( j );
 451  0
                 if ( c == '\t' )
 452  
                 {
 453  0
                     buf.append( repeat( " ", indentSize - buf.length() % indentSize ) );
 454  
                 }
 455  0
                 else if ( c == '\u00A0' )
 456  
                 {
 457  0
                     buf.append( ' ' );
 458  
                 }
 459  
                 else
 460  
                 {
 461  0
                     buf.append( c );
 462  
                 }
 463  
             }
 464  
         }
 465  0
         lines.add( buf.toString() );
 466  0
     }
 467  
 
 468  
     /** 
 469  
      * Gets the indentation level of the specified line.
 470  
      * 
 471  
      * @param line The line whose indentation level should be retrieved, must not be <code>null</code>.
 472  
      * @return The indentation level of the line.
 473  
      */
 474  
     private static int getIndentLevel( String line )
 475  
     {
 476  0
         int level = 0;
 477  0
         for ( int i = 0; i < line.length() && line.charAt( i ) == '\t'; i++ )
 478  
         {
 479  0
             level++;
 480  
         }
 481  0
         for ( int i = level + 1; i <= level + 4 && i < line.length(); i++ )
 482  
         {
 483  0
             if ( line.charAt( i ) == '\t' )
 484  
             {
 485  0
                 level++;
 486  0
                 break;
 487  
             }
 488  
         }
 489  0
         return level;
 490  
     }
 491  
 }