Code view:

A painting is a person's account of this edit as text, recorded independently of the node mapping - a rendering often has several equally defensible answers where the mapping has one. Deletions and insertions carry no position on the opposite side in a painting, so that panel draws no caret for them.

Before

…lines 1–818 unchanged (818 lines)
819 }
820 sb.append(rtrim(text.substring(0, pos))).append(defaultNewLine);
821
822 if (nextLineTabStop >= width)
823 {
824 // stops infinite loop happening
825 throw new IllegalStateException("Total width is less than the width of the argument and indent " +
826 "- no room for the description");
827 }
828
829 // all following lines must be padded with nextLineTabStop space
830 // characters
831 final String padding = createPadding(nextLineTabStop);
832
…lines 833–986 unchanged (154 lines)

After

…lines 1–818 unchanged (818 lines)
819 }
820 sb.append(rtrim(text.substring(0, pos))).append(defaultNewLine);
821
822 if (nextLineTabStop >= width)
823 {
824 // stops infinite loop happening
825 nextLineTabStop = width - 1;
826 }
827
828 // all following lines must be padded with nextLineTabStop space
829 // characters
830 final String padding = createPadding(nextLineTabStop);
831
…lines 832–985 unchanged (154 lines)

Before

program
block_comment "/**\n * Licensed to the Apache Software Foundation (ASF) unde"...
package_declaration
package "package"
scoped_identifier
scoped_identifier
scoped_identifier
identifier "org"
. "."
identifier "apache"
. "."
identifier "commons"
. "."
identifier "cli"
; ";"
import_declaration
import "import"
scoped_identifier
scoped_identifier
identifier "java"
. "."
identifier "io"
. "."
identifier "PrintWriter"
; ";"
import_declaration
import "import"
scoped_identifier
scoped_identifier
identifier "java"
. "."
identifier "util"
. "."
identifier "ArrayList"
; ";"
import_declaration
import "import"
scoped_identifier
scoped_identifier
identifier "java"
. "."
identifier "util"
. "."
identifier "Collection"
; ";"
import_declaration
import "import"
scoped_identifier
scoped_identifier
identifier "java"
. "."
identifier "util"
. "."
identifier "Collections"
; ";"
import_declaration
import "import"
scoped_identifier
scoped_identifier
identifier "java"
. "."
identifier "util"
. "."
identifier "Comparator"
; ";"
import_declaration
import "import"
scoped_identifier
scoped_identifier
identifier "java"
. "."
identifier "util"
. "."
identifier "Iterator"
; ";"
import_declaration
import "import"
scoped_identifier
scoped_identifier
identifier "java"
. "."
identifier "util"
. "."
identifier "List"
; ";"
block_comment "/** \n * A formatter of help messages for the current command"...
class_declaration
modifiers
public "public"
class "class"
identifier "HelpFormatter"
class_body
{ "{"
line_comment "// ---------------------------------------------------------"...
block_comment "/** default number of characters per line */"
field_declaration
modifiers
public "public"
static "static"
final "final"
integral_type
int "int"
variable_declarator
identifier "DEFAULT_WIDTH"
= "="
decimal_integer_literal "74"
; ";"
block_comment "/** default padding to the left of each line */"
field_declaration
modifiers
public "public"
static "static"
final "final"
integral_type
int "int"
variable_declarator
identifier "DEFAULT_LEFT_PAD"
= "="
decimal_integer_literal "1"
; ";"
block_comment "/**\n * the number of characters of padding to be prefixe"...
field_declaration
modifiers
public "public"
static "static"
final "final"
integral_type
int "int"
variable_declarator
identifier "DEFAULT_DESC_PAD"
= "="
decimal_integer_literal "3"
; ";"
block_comment "/** the string to display at the begining of the usage state"...
field_declaration
modifiers
public "public"
static "static"
final "final"
type_identifier "String"
variable_declarator
identifier "DEFAULT_SYNTAX_PREFIX"
= "="
string_literal
" "\""
string_fragment "usage: "
" "\""
; ";"
block_comment "/** default prefix for shortOpts */"
field_declaration
modifiers
public "public"
static "static"
final "final"
type_identifier "String"
variable_declarator
identifier "DEFAULT_OPT_PREFIX"
= "="
string_literal
" "\""
string_fragment "-"
" "\""
; ";"
block_comment "/** default prefix for long Option */"
field_declaration
modifiers
public "public"
static "static"
final "final"
type_identifier "String"
variable_declarator
identifier "DEFAULT_LONG_OPT_PREFIX"
= "="
string_literal
" "\""
string_fragment "--"
" "\""
; ";"
block_comment "/** default name for an argument */"
field_declaration
modifiers
public "public"
static "static"
final "final"
type_identifier "String"
variable_declarator
identifier "DEFAULT_ARG_NAME"
= "="
string_literal
" "\""
string_fragment "arg"
" "\""
; ";"
line_comment "// ---------------------------------------------------------"...
block_comment "/**\n * number of characters per line\n *\n * @depr"...
field_declaration
modifiers
public "public"
integral_type
int "int"
variable_declarator
identifier "defaultWidth"
= "="
identifier "DEFAULT_WIDTH"
; ";"
block_comment "/**\n * amount of padding to the left of each line\n *"...
field_declaration
modifiers
public "public"
integral_type
int "int"
variable_declarator
identifier "defaultLeftPad"
= "="
identifier "DEFAULT_LEFT_PAD"
; ";"
block_comment "/**\n * the number of characters of padding to be prefixe"...
field_declaration
modifiers
public "public"
integral_type
int "int"
variable_declarator
identifier "defaultDescPad"
= "="
identifier "DEFAULT_DESC_PAD"
; ";"
block_comment "/**\n * the string to display at the begining of the usag"...
field_declaration
modifiers
public "public"
type_identifier "String"
variable_declarator
identifier "defaultSyntaxPrefix"
= "="
identifier "DEFAULT_SYNTAX_PREFIX"
; ";"
block_comment "/**\n * the new line string\n *\n * @deprecated Sco"...
field_declaration
modifiers
public "public"
type_identifier "String"
variable_declarator
identifier "defaultNewLine"
= "="
method_invocation
identifier "System"
. "."
identifier "getProperty"
argument_list
( "("
string_literal
" "\""
string_fragment "line.separator"
" "\""
) ")"
; ";"
block_comment "/**\n * the shortOpt prefix\n *\n * @deprecated Sco"...
field_declaration
modifiers
public "public"
type_identifier "String"
variable_declarator
identifier "defaultOptPrefix"
= "="
identifier "DEFAULT_OPT_PREFIX"
; ";"
block_comment "/**\n * the long Opt prefix\n *\n * @deprecated Sco"...
field_declaration
modifiers
public "public"
type_identifier "String"
variable_declarator
identifier "defaultLongOptPrefix"
= "="
identifier "DEFAULT_LONG_OPT_PREFIX"
; ";"
block_comment "/**\n * the name of the argument\n *\n * @deprecate"...
field_declaration
modifiers
public "public"
type_identifier "String"
variable_declarator
identifier "defaultArgName"
= "="
identifier "DEFAULT_ARG_NAME"
; ";"
block_comment "/**\n * Comparator used to sort the options when they out"...
field_declaration
modifiers
protected "protected"
type_identifier "Comparator"
variable_declarator
identifier "optionComparator"
= "="
object_creation_expression
new "new"
type_identifier "OptionComparator"
argument_list
( "("
) ")"
; ";"
block_comment "/**\n * Sets the 'width'.\n *\n * @param width the "...
method_declaration (+24 nodes collapsed)
block_comment "/**\n * Returns the 'width'.\n *\n * @return the 'w"...
method_declaration
modifiers
public "public"
integral_type
int "int"
identifier "getWidth"
formal_parameters
( "("
) ")"
block
{ "{"
return_statement
return "return"
identifier "defaultWidth"
; ";"
} "}"
block_comment "/**\n * Sets the 'leftPadding'.\n *\n * @param padd"...
method_declaration (+24 nodes collapsed)
block_comment "/**\n * Returns the 'leftPadding'.\n *\n * @return "...
method_declaration
modifiers
public "public"
integral_type
int "int"
identifier "getLeftPadding"
formal_parameters
( "("
) ")"
block
{ "{"
return_statement
return "return"
identifier "defaultLeftPad"
; ";"
} "}"
block_comment "/**\n * Sets the 'descPadding'.\n *\n * @param padd"...
method_declaration (+24 nodes collapsed)
block_comment "/**\n * Returns the 'descPadding'.\n *\n * @return "...
method_declaration
modifiers
public "public"
integral_type
int "int"
identifier "getDescPadding"
formal_parameters
( "("
) ")"
block
{ "{"
return_statement
return "return"
identifier "defaultDescPad"
; ";"
} "}"
block_comment "/**\n * Sets the 'syntaxPrefix'.\n *\n * @param pre"...
method_declaration (+23 nodes collapsed)
block_comment "/**\n * Returns the 'syntaxPrefix'.\n *\n * @return"...
method_declaration
modifiers
public "public"
type_identifier "String"
identifier "getSyntaxPrefix"
formal_parameters
( "("
) ")"
block
{ "{"
return_statement
return "return"
identifier "defaultSyntaxPrefix"
; ";"
} "}"
block_comment "/**\n * Sets the 'newLine'.\n *\n * @param newline "...
method_declaration (+23 nodes collapsed)
block_comment "/**\n * Returns the 'newLine'.\n *\n * @return the "...
method_declaration
modifiers
public "public"
type_identifier "String"
identifier "getNewLine"
formal_parameters
( "("
) ")"
block
{ "{"
return_statement
return "return"
identifier "defaultNewLine"
; ";"
} "}"
block_comment "/**\n * Sets the 'optPrefix'.\n *\n * @param prefix"...
method_declaration (+23 nodes collapsed)
block_comment "/**\n * Returns the 'optPrefix'.\n *\n * @return th"...
method_declaration
modifiers
public "public"
type_identifier "String"
identifier "getOptPrefix"
formal_parameters
( "("
) ")"
block
{ "{"
return_statement
return "return"
identifier "defaultOptPrefix"
; ";"
} "}"
block_comment "/**\n * Sets the 'longOptPrefix'.\n *\n * @param pr"...
method_declaration (+23 nodes collapsed)
block_comment "/**\n * Returns the 'longOptPrefix'.\n *\n * @retur"...
method_declaration
modifiers
public "public"
type_identifier "String"
identifier "getLongOptPrefix"
formal_parameters
( "("
) ")"
block
{ "{"
return_statement
return "return"
identifier "defaultLongOptPrefix"
; ";"
} "}"
block_comment "/**\n * Sets the 'argName'.\n *\n * @param name the"...
method_declaration (+23 nodes collapsed)
block_comment "/**\n * Returns the 'argName'.\n *\n * @return the "...
method_declaration
modifiers
public "public"
type_identifier "String"
identifier "getArgName"
formal_parameters
( "("
) ")"
block
{ "{"
return_statement
return "return"
identifier "defaultArgName"
; ";"
} "}"
block_comment "/**\n * Comparator used to sort the options when they out"...
method_declaration
modifiers
public "public"
type_identifier "Comparator"
identifier "getOptionComparator"
formal_parameters
( "("
) ")"
block
{ "{"
return_statement
return "return"
identifier "optionComparator"
; ";"
} "}"
block_comment "/**\n * Set the comparator used to sort the options when "...
method_declaration (+53 nodes collapsed)
block_comment "/**\n * Print the help for <code>options</code> with the "...
method_declaration (+36 nodes collapsed)
block_comment "/**\n * Print the help for <code>options</code> with the "...
method_declaration (+40 nodes collapsed)
block_comment "/**\n * Print the help for <code>options</code> with the "...
method_declaration (+42 nodes collapsed)
block_comment "/**\n * Print the help for <code>options</code> with the "...
method_declaration (+48 nodes collapsed)
block_comment "/**\n * Print the help for <code>options</code> with the "...
method_declaration (+49 nodes collapsed)
block_comment "/**\n * Print the help for <code>options</code> with the "...
method_declaration (+84 nodes collapsed)
block_comment "/**\n * Print the help for <code>options</code> with the "...
method_declaration (+69 nodes collapsed)
block_comment "/**\n * Print the help for <code>options</code> with the "...
method_declaration (+243 nodes collapsed)
block_comment "/**\n * <p>Prints the usage statement for the specified a"...
method_declaration (+319 nodes collapsed)
block_comment "/**\n * Appends the usage clause for an OptionGroup to a "...
method_declaration (+197 nodes collapsed)
block_comment "/**\n * Appends the usage clause for an Option to a Strin"...
method_declaration (+213 nodes collapsed)
block_comment "/**\n * Print the cmdLineSyntax to the specified writer, "...
method_declaration (+67 nodes collapsed)
block_comment "/**\n * <p>Print the help for the specified Options to th"...
method_declaration (+77 nodes collapsed)
block_comment "/**\n * Print the specified text to the specified PrintWr"...
method_declaration (+37 nodes collapsed)
block_comment "/**\n * Print the specified text to the specified PrintWr"...
method_declaration (+77 nodes collapsed)
line_comment "// ---------------------------------------------------------"...
block_comment "/**\n * Render the specified Options and return the rende"...
method_declaration (+654 nodes collapsed)
block_comment "/**\n * Render the specified text and return the rendered"...
method_declaration
modifiers
protected "protected"
type_identifier "StringBuffer"
identifier "renderWrappedText"
formal_parameters
( "("
formal_parameter
type_identifier "StringBuffer"
identifier "sb"
, ","
formal_parameter
integral_type
int "int"
identifier "width"
, ","
formal_parameter
integral_type
int "int"
identifier "nextLineTabStop"
, ","
formal_parameter
type_identifier "String"
identifier "text"
) ")"
block
{ "{"
local_variable_declaration
integral_type
int "int"
variable_declarator
identifier "pos"
= "="
method_invocation
identifier "findWrapPos"
argument_list
( "("
identifier "text"
, ","
identifier "width"
, ","
decimal_integer_literal "0"
) ")"
; ";"
if_statement (+33 nodes collapsed)
expression_statement (+31 nodes collapsed)
if_statement
if "if"
parenthesized_expression
( "("
binary_expression
identifier "nextLineTabStop"
>= ">="
identifier "width"
) ")"
block
{ "{"
line_comment "// stops infinite loop happening"
throw_statement
throw "throw"
object_creation_expression
new "new"
type_identifier "IllegalStateException"
argument_list
( "("
binary_expression
string_literal
" "\""
string_fragment "Total width is less than the width of the argument and inden"...
" "\""
+ "+"
string_literal
" "\""
string_fragment "- no room for the description"
" "\""
) ")"
; ";"
} "}"
line_comment "// all following lines must be padded with nextLineTabStop s"...
line_comment "// characters"
local_variable_declaration
modifiers
final "final"
type_identifier "String"
variable_declarator
identifier "padding"
= "="
method_invocation
identifier "createPadding"
argument_list
( "("
identifier "nextLineTabStop"
) ")"
; ";"
while_statement (+144 nodes collapsed)
} "}"
block_comment "/**\n * Finds the next text wrap position after <code>sta"...
method_declaration (+337 nodes collapsed)
block_comment "/**\n * Return a String of padding of length <code>len</c"...
method_declaration (+71 nodes collapsed)
block_comment "/**\n * Remove the trailing whitespace from the specified"...
method_declaration (+115 nodes collapsed)
line_comment "// ------------------------------------------------------ Pa"...
line_comment "// ---------------------------------------------------------"...
line_comment "// ---------------------------------------------------------"...
block_comment "/**\n * This class implements the <code>Comparator</code>"...
class_declaration (+78 nodes collapsed)
} "}"

After

program
block_comment "/**\n * Licensed to the Apache Software Foundation (ASF) unde"...
package_declaration
package "package"
scoped_identifier
scoped_identifier
scoped_identifier
identifier "org"
. "."
identifier "apache"
. "."
identifier "commons"
. "."
identifier "cli"
; ";"
import_declaration
import "import"
scoped_identifier
scoped_identifier
identifier "java"
. "."
identifier "io"
. "."
identifier "PrintWriter"
; ";"
import_declaration
import "import"
scoped_identifier
scoped_identifier
identifier "java"
. "."
identifier "util"
. "."
identifier "ArrayList"
; ";"
import_declaration
import "import"
scoped_identifier
scoped_identifier
identifier "java"
. "."
identifier "util"
. "."
identifier "Collection"
; ";"
import_declaration
import "import"
scoped_identifier
scoped_identifier
identifier "java"
. "."
identifier "util"
. "."
identifier "Collections"
; ";"
import_declaration
import "import"
scoped_identifier
scoped_identifier
identifier "java"
. "."
identifier "util"
. "."
identifier "Comparator"
; ";"
import_declaration
import "import"
scoped_identifier
scoped_identifier
identifier "java"
. "."
identifier "util"
. "."
identifier "Iterator"
; ";"
import_declaration
import "import"
scoped_identifier
scoped_identifier
identifier "java"
. "."
identifier "util"
. "."
identifier "List"
; ";"
block_comment "/** \n * A formatter of help messages for the current command"...
class_declaration
modifiers
public "public"
class "class"
identifier "HelpFormatter"
class_body
{ "{"
line_comment "// ---------------------------------------------------------"...
block_comment "/** default number of characters per line */"
field_declaration
modifiers
public "public"
static "static"
final "final"
integral_type
int "int"
variable_declarator
identifier "DEFAULT_WIDTH"
= "="
decimal_integer_literal "74"
; ";"
block_comment "/** default padding to the left of each line */"
field_declaration
modifiers
public "public"
static "static"
final "final"
integral_type
int "int"
variable_declarator
identifier "DEFAULT_LEFT_PAD"
= "="
decimal_integer_literal "1"
; ";"
block_comment "/**\n * the number of characters of padding to be prefixe"...
field_declaration
modifiers
public "public"
static "static"
final "final"
integral_type
int "int"
variable_declarator
identifier "DEFAULT_DESC_PAD"
= "="
decimal_integer_literal "3"
; ";"
block_comment "/** the string to display at the begining of the usage state"...
field_declaration
modifiers
public "public"
static "static"
final "final"
type_identifier "String"
variable_declarator
identifier "DEFAULT_SYNTAX_PREFIX"
= "="
string_literal
" "\""
string_fragment "usage: "
" "\""
; ";"
block_comment "/** default prefix for shortOpts */"
field_declaration
modifiers
public "public"
static "static"
final "final"
type_identifier "String"
variable_declarator
identifier "DEFAULT_OPT_PREFIX"
= "="
string_literal
" "\""
string_fragment "-"
" "\""
; ";"
block_comment "/** default prefix for long Option */"
field_declaration
modifiers
public "public"
static "static"
final "final"
type_identifier "String"
variable_declarator
identifier "DEFAULT_LONG_OPT_PREFIX"
= "="
string_literal
" "\""
string_fragment "--"
" "\""
; ";"
block_comment "/** default name for an argument */"
field_declaration
modifiers
public "public"
static "static"
final "final"
type_identifier "String"
variable_declarator
identifier "DEFAULT_ARG_NAME"
= "="
string_literal
" "\""
string_fragment "arg"
" "\""
; ";"
line_comment "// ---------------------------------------------------------"...
block_comment "/**\n * number of characters per line\n *\n * @depr"...
field_declaration
modifiers
public "public"
integral_type
int "int"
variable_declarator
identifier "defaultWidth"
= "="
identifier "DEFAULT_WIDTH"
; ";"
block_comment "/**\n * amount of padding to the left of each line\n *"...
field_declaration
modifiers
public "public"
integral_type
int "int"
variable_declarator
identifier "defaultLeftPad"
= "="
identifier "DEFAULT_LEFT_PAD"
; ";"
block_comment "/**\n * the number of characters of padding to be prefixe"...
field_declaration
modifiers
public "public"
integral_type
int "int"
variable_declarator
identifier "defaultDescPad"
= "="
identifier "DEFAULT_DESC_PAD"
; ";"
block_comment "/**\n * the string to display at the begining of the usag"...
field_declaration
modifiers
public "public"
type_identifier "String"
variable_declarator
identifier "defaultSyntaxPrefix"
= "="
identifier "DEFAULT_SYNTAX_PREFIX"
; ";"
block_comment "/**\n * the new line string\n *\n * @deprecated Sco"...
field_declaration
modifiers
public "public"
type_identifier "String"
variable_declarator
identifier "defaultNewLine"
= "="
method_invocation
identifier "System"
. "."
identifier "getProperty"
argument_list
( "("
string_literal
" "\""
string_fragment "line.separator"
" "\""
) ")"
; ";"
block_comment "/**\n * the shortOpt prefix\n *\n * @deprecated Sco"...
field_declaration
modifiers
public "public"
type_identifier "String"
variable_declarator
identifier "defaultOptPrefix"
= "="
identifier "DEFAULT_OPT_PREFIX"
; ";"
block_comment "/**\n * the long Opt prefix\n *\n * @deprecated Sco"...
field_declaration
modifiers
public "public"
type_identifier "String"
variable_declarator
identifier "defaultLongOptPrefix"
= "="
identifier "DEFAULT_LONG_OPT_PREFIX"
; ";"
block_comment "/**\n * the name of the argument\n *\n * @deprecate"...
field_declaration
modifiers
public "public"
type_identifier "String"
variable_declarator
identifier "defaultArgName"
= "="
identifier "DEFAULT_ARG_NAME"
; ";"
block_comment "/**\n * Comparator used to sort the options when they out"...
field_declaration
modifiers
protected "protected"
type_identifier "Comparator"
variable_declarator
identifier "optionComparator"
= "="
object_creation_expression
new "new"
type_identifier "OptionComparator"
argument_list
( "("
) ")"
; ";"
block_comment "/**\n * Sets the 'width'.\n *\n * @param width the "...
method_declaration (+24 nodes collapsed)
block_comment "/**\n * Returns the 'width'.\n *\n * @return the 'w"...
method_declaration
modifiers
public "public"
integral_type
int "int"
identifier "getWidth"
formal_parameters
( "("
) ")"
block
{ "{"
return_statement
return "return"
identifier "defaultWidth"
; ";"
} "}"
block_comment "/**\n * Sets the 'leftPadding'.\n *\n * @param padd"...
method_declaration (+24 nodes collapsed)
block_comment "/**\n * Returns the 'leftPadding'.\n *\n * @return "...
method_declaration
modifiers
public "public"
integral_type
int "int"
identifier "getLeftPadding"
formal_parameters
( "("
) ")"
block
{ "{"
return_statement
return "return"
identifier "defaultLeftPad"
; ";"
} "}"
block_comment "/**\n * Sets the 'descPadding'.\n *\n * @param padd"...
method_declaration (+24 nodes collapsed)
block_comment "/**\n * Returns the 'descPadding'.\n *\n * @return "...
method_declaration
modifiers
public "public"
integral_type
int "int"
identifier "getDescPadding"
formal_parameters
( "("
) ")"
block
{ "{"
return_statement
return "return"
identifier "defaultDescPad"
; ";"
} "}"
block_comment "/**\n * Sets the 'syntaxPrefix'.\n *\n * @param pre"...
method_declaration (+23 nodes collapsed)
block_comment "/**\n * Returns the 'syntaxPrefix'.\n *\n * @return"...
method_declaration
modifiers
public "public"
type_identifier "String"
identifier "getSyntaxPrefix"
formal_parameters
( "("
) ")"
block
{ "{"
return_statement
return "return"
identifier "defaultSyntaxPrefix"
; ";"
} "}"
block_comment "/**\n * Sets the 'newLine'.\n *\n * @param newline "...
method_declaration (+23 nodes collapsed)
block_comment "/**\n * Returns the 'newLine'.\n *\n * @return the "...
method_declaration
modifiers
public "public"
type_identifier "String"
identifier "getNewLine"
formal_parameters
( "("
) ")"
block
{ "{"
return_statement
return "return"
identifier "defaultNewLine"
; ";"
} "}"
block_comment "/**\n * Sets the 'optPrefix'.\n *\n * @param prefix"...
method_declaration (+23 nodes collapsed)
block_comment "/**\n * Returns the 'optPrefix'.\n *\n * @return th"...
method_declaration
modifiers
public "public"
type_identifier "String"
identifier "getOptPrefix"
formal_parameters
( "("
) ")"
block
{ "{"
return_statement
return "return"
identifier "defaultOptPrefix"
; ";"
} "}"
block_comment "/**\n * Sets the 'longOptPrefix'.\n *\n * @param pr"...
method_declaration (+23 nodes collapsed)
block_comment "/**\n * Returns the 'longOptPrefix'.\n *\n * @retur"...
method_declaration
modifiers
public "public"
type_identifier "String"
identifier "getLongOptPrefix"
formal_parameters
( "("
) ")"
block
{ "{"
return_statement
return "return"
identifier "defaultLongOptPrefix"
; ";"
} "}"
block_comment "/**\n * Sets the 'argName'.\n *\n * @param name the"...
method_declaration (+23 nodes collapsed)
block_comment "/**\n * Returns the 'argName'.\n *\n * @return the "...
method_declaration
modifiers
public "public"
type_identifier "String"
identifier "getArgName"
formal_parameters
( "("
) ")"
block
{ "{"
return_statement
return "return"
identifier "defaultArgName"
; ";"
} "}"
block_comment "/**\n * Comparator used to sort the options when they out"...
method_declaration
modifiers
public "public"
type_identifier "Comparator"
identifier "getOptionComparator"
formal_parameters
( "("
) ")"
block
{ "{"
return_statement
return "return"
identifier "optionComparator"
; ";"
} "}"
block_comment "/**\n * Set the comparator used to sort the options when "...
method_declaration (+53 nodes collapsed)
block_comment "/**\n * Print the help for <code>options</code> with the "...
method_declaration (+36 nodes collapsed)
block_comment "/**\n * Print the help for <code>options</code> with the "...
method_declaration (+40 nodes collapsed)
block_comment "/**\n * Print the help for <code>options</code> with the "...
method_declaration (+42 nodes collapsed)
block_comment "/**\n * Print the help for <code>options</code> with the "...
method_declaration (+48 nodes collapsed)
block_comment "/**\n * Print the help for <code>options</code> with the "...
method_declaration (+49 nodes collapsed)
block_comment "/**\n * Print the help for <code>options</code> with the "...
method_declaration (+84 nodes collapsed)
block_comment "/**\n * Print the help for <code>options</code> with the "...
method_declaration (+69 nodes collapsed)
block_comment "/**\n * Print the help for <code>options</code> with the "...
method_declaration (+243 nodes collapsed)
block_comment "/**\n * <p>Prints the usage statement for the specified a"...
method_declaration (+319 nodes collapsed)
block_comment "/**\n * Appends the usage clause for an OptionGroup to a "...
method_declaration (+197 nodes collapsed)
block_comment "/**\n * Appends the usage clause for an Option to a Strin"...
method_declaration (+213 nodes collapsed)
block_comment "/**\n * Print the cmdLineSyntax to the specified writer, "...
method_declaration (+67 nodes collapsed)
block_comment "/**\n * <p>Print the help for the specified Options to th"...
method_declaration (+77 nodes collapsed)
block_comment "/**\n * Print the specified text to the specified PrintWr"...
method_declaration (+37 nodes collapsed)
block_comment "/**\n * Print the specified text to the specified PrintWr"...
method_declaration (+77 nodes collapsed)
line_comment "// ---------------------------------------------------------"...
block_comment "/**\n * Render the specified Options and return the rende"...
method_declaration (+654 nodes collapsed)
block_comment "/**\n * Render the specified text and return the rendered"...
method_declaration
modifiers
protected "protected"
type_identifier "StringBuffer"
identifier "renderWrappedText"
formal_parameters
( "("
formal_parameter
type_identifier "StringBuffer"
identifier "sb"
, ","
formal_parameter
integral_type
int "int"
identifier "width"
, ","
formal_parameter
integral_type
int "int"
identifier "nextLineTabStop"
, ","
formal_parameter
type_identifier "String"
identifier "text"
) ")"
block
{ "{"
local_variable_declaration
integral_type
int "int"
variable_declarator
identifier "pos"
= "="
method_invocation
identifier "findWrapPos"
argument_list
( "("
identifier "text"
, ","
identifier "width"
, ","
decimal_integer_literal "0"
) ")"
; ";"
if_statement (+33 nodes collapsed)
expression_statement (+31 nodes collapsed)
if_statement
if "if"
parenthesized_expression
( "("
binary_expression
identifier "nextLineTabStop"
>= ">="
identifier "width"
) ")"
block
{ "{"
line_comment "// stops infinite loop happening"
expression_statement
assignment_expression
identifier "nextLineTabStop"
= "="
binary_expression
identifier "width"
- "-"
decimal_integer_literal "1"
; ";"
} "}"
line_comment "// all following lines must be padded with nextLineTabStop s"...
line_comment "// characters"
local_variable_declaration
modifiers
final "final"
type_identifier "String"
variable_declarator
identifier "padding"
= "="
method_invocation
identifier "createPadding"
argument_list
( "("
identifier "nextLineTabStop"
) ")"
; ";"
while_statement (+144 nodes collapsed)
} "}"
block_comment "/**\n * Finds the next text wrap position after <code>sta"...
method_declaration (+337 nodes collapsed)
block_comment "/**\n * Return a String of padding of length <code>len</c"...
method_declaration (+71 nodes collapsed)
block_comment "/**\n * Remove the trailing whitespace from the specified"...
method_declaration (+115 nodes collapsed)
line_comment "// ------------------------------------------------------ Pa"...
line_comment "// ---------------------------------------------------------"...
line_comment "// ---------------------------------------------------------"...
block_comment "/**\n * This class implements the <code>Comparator</code>"...
class_declaration (+78 nodes collapsed)
} "}"