Requires N:M mapping. I accept that this could be a controversial solution.

This mapping has 7 all-to-all groups: every node on one side corresponds to every node on the other, and none is deleted or inserted. Each member carries an all N:M badge; selecting one highlights all of its counterparts, in the tree and in the code view alike.

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–646 unchanged (646 lines)
647 else
648 {
649 buff.append("--").append(option.getLongOpt());
650 }
651
652 // if the Option has a value and a non blank argname
653 if (option.hasArg() && option.hasArgName())
654 {
655 buff.append(option.getOpt() == null ? longOptSeparator : " ");
656 buff.append("<").append(option.getArgName()).append(">");
657 }
658
659 // if the Option is not a required option
660 if (!required)
661 {
662 buff.append("]");
…lines 663–1021 unchanged (359 lines)

After

…lines 1–646 unchanged (646 lines)
647 else
648 {
649 buff.append("--").append(option.getLongOpt());
650 }
651
652 // if the Option has a value and a non blank argname
653 if (option.hasArg() && (option.getArgName() == null || option.getArgName().length() != 0))
654 {
655 buff.append(option.getOpt() == null ? longOptSeparator : " ");
656 buff.append("<").append(option.getArgName() != null ? option.getArgName() : getArgName()).append(">");
657 }
658
659 // if the Option is not a required option
660 if (!required)
661 {
662 buff.append("]");
…lines 663–1021 unchanged (359 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 beginning of the usage stat"...
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 separator displayed between a long Option and it"...
field_declaration
modifiers
public "public"
static "static"
final "final"
type_identifier "String"
variable_declarator
identifier "DEFAULT_LONG_OPT_SEPARATOR"
= "="
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 "/** The separator displayed between the long option and its "...
field_declaration
modifiers
private "private"
type_identifier "String"
variable_declarator
identifier "longOptSeparator"
= "="
identifier "DEFAULT_LONG_OPT_SEPARATOR"
; ";"
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 * Set the separator displayed between a long option"...
method_declaration (+23 nodes collapsed)
block_comment "/**\n * Returns the separator displayed between a long op"...
method_declaration
modifiers
public "public"
type_identifier "String"
identifier "getLongOptSeparator"
formal_parameters
( "("
) ")"
block
{ "{"
return_statement
return "return"
identifier "longOptSeparator"
; ";"
} "}"
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 * Prints the usage statement for the specified appl"...
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
modifiers
private "private"
void_type "void"
identifier "appendOption"
formal_parameters
( "("
formal_parameter
modifiers
final "final"
type_identifier "StringBuffer"
identifier "buff"
, ","
formal_parameter
modifiers
final "final"
type_identifier "Option"
identifier "option"
, ","
formal_parameter
modifiers
final "final"
boolean_type "boolean"
identifier "required"
) ")"
block
{ "{"
if_statement (+24 nodes collapsed)
if_statement (+74 nodes collapsed)
line_comment "// if the Option has a value and a non blank argname"
if_statement
if "if"
parenthesized_expression
( "("
binary_expression
method_invocation
identifier "option"
. "."
identifier "hasArg"
argument_list
( "("
) ")"
&& "&&"
method_invocation
identifier "option"
. "."
identifier "hasArgName"
argument_list
( "("
) ")"
) ")"
block
{ "{"
expression_statement (+27 nodes collapsed)
expression_statement
method_invocation
method_invocation
method_invocation
identifier "buff"
. "."
identifier "append"
argument_list
( "("
string_literal
" "\""
string_fragment "<"
" "\""
) ")"
. "."
identifier "append"
argument_list
( "("
method_invocation all 1:2
identifier "option" all 1:2
. "." all 1:2
identifier "getArgName" all 1:2
argument_list all 1:2
( "(" all 1:2
) ")" all 1:2
) ")"
. "."
identifier "append"
argument_list
( "("
string_literal
" "\""
string_fragment ">"
" "\""
) ")"
; ";"
} "}"
line_comment "// if the Option is not a required option"
if_statement (+24 nodes collapsed)
} "}"
block_comment "/**\n * Print the cmdLineSyntax to the specified writer, "...
method_declaration (+67 nodes collapsed)
block_comment "/**\n * Print the help for the specified Options to the s"...
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 (+712 nodes collapsed)
block_comment "/**\n * Render the specified text and return the rendered"...
method_declaration (+288 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 beginning of the usage stat"...
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 separator displayed between a long Option and it"...
field_declaration
modifiers
public "public"
static "static"
final "final"
type_identifier "String"
variable_declarator
identifier "DEFAULT_LONG_OPT_SEPARATOR"
= "="
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 "/** The separator displayed between the long option and its "...
field_declaration
modifiers
private "private"
type_identifier "String"
variable_declarator
identifier "longOptSeparator"
= "="
identifier "DEFAULT_LONG_OPT_SEPARATOR"
; ";"
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 * Set the separator displayed between a long option"...
method_declaration (+23 nodes collapsed)
block_comment "/**\n * Returns the separator displayed between a long op"...
method_declaration
modifiers
public "public"
type_identifier "String"
identifier "getLongOptSeparator"
formal_parameters
( "("
) ")"
block
{ "{"
return_statement
return "return"
identifier "longOptSeparator"
; ";"
} "}"
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 * Prints the usage statement for the specified appl"...
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
modifiers
private "private"
void_type "void"
identifier "appendOption"
formal_parameters
( "("
formal_parameter
modifiers
final "final"
type_identifier "StringBuffer"
identifier "buff"
, ","
formal_parameter
modifiers
final "final"
type_identifier "Option"
identifier "option"
, ","
formal_parameter
modifiers
final "final"
boolean_type "boolean"
identifier "required"
) ")"
block
{ "{"
if_statement (+24 nodes collapsed)
if_statement (+74 nodes collapsed)
line_comment "// if the Option has a value and a non blank argname"
if_statement
if "if"
parenthesized_expression
( "("
binary_expression
method_invocation
identifier "option"
. "."
identifier "hasArg"
argument_list
( "("
) ")"
&& "&&"
parenthesized_expression
( "("
binary_expression
binary_expression
method_invocation
identifier "option"
. "."
identifier "getArgName"
argument_list
( "("
) ")"
== "=="
null_literal "null"
|| "||"
binary_expression
method_invocation
method_invocation
identifier "option"
. "."
identifier "getArgName"
argument_list
( "("
) ")"
. "."
identifier "length"
argument_list
( "("
) ")"
!= "!="
decimal_integer_literal "0"
) ")"
) ")"
block
{ "{"
expression_statement (+27 nodes collapsed)
expression_statement
method_invocation
method_invocation
method_invocation
identifier "buff"
. "."
identifier "append"
argument_list
( "("
string_literal
" "\""
string_fragment "<"
" "\""
) ")"
. "."
identifier "append"
argument_list
( "("
ternary_expression
binary_expression
method_invocation all 1:2
identifier "option" all 1:2
. "." all 1:2
identifier "getArgName" all 1:2
argument_list all 1:2
( "(" all 1:2
) ")" all 1:2
!= "!="
null_literal "null"
? "?"
method_invocation all 1:2
identifier "option" all 1:2
. "." all 1:2
identifier "getArgName" all 1:2
argument_list all 1:2
( "(" all 1:2
) ")" all 1:2
: ":"
method_invocation
identifier "getArgName"
argument_list
( "("
) ")"
) ")"
. "."
identifier "append"
argument_list
( "("
string_literal
" "\""
string_fragment ">"
" "\""
) ")"
; ";"
} "}"
line_comment "// if the Option is not a required option"
if_statement (+24 nodes collapsed)
} "}"
block_comment "/**\n * Print the cmdLineSyntax to the specified writer, "...
method_declaration (+67 nodes collapsed)
block_comment "/**\n * Print the help for the specified Options to the s"...
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 (+712 nodes collapsed)
block_comment "/**\n * Render the specified text and return the rendered"...
method_declaration (+288 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)
} "}"