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–85 unchanged (85 lines)
86 // prefixes temporary storage
87 final Set newPrefixes = new HashSet();
88
89 // process the options
90 for (final Iterator i = options.iterator(); i.hasNext();) {
91 final Option option = (Option) i.next();
92
93 if (option instanceof Argument) {
94 i.remove();
95 newAnonymous.add(option);
96 } else {
97 final Set triggers = option.getTriggers();
98
…lines 99–515 unchanged (417 lines)

After

…lines 1–85 unchanged (85 lines)
86 // prefixes temporary storage
87 final Set newPrefixes = new HashSet();
88
89 // process the options
90 for (final Iterator i = options.iterator(); i.hasNext();) {
91 final Option option = (Option) i.next();
92 option.setParent(this);
93
94 if (option instanceof Argument) {
95 i.remove();
96 newAnonymous.add(option);
97 } else {
98 final Set triggers = option.getTriggers();
…lines 99–516 unchanged (418 lines)

Before

program
block_comment "/*\n * Licensed to the Apache Software Foundation (ASF) under"...
package_declaration
package "package"
scoped_identifier
scoped_identifier
scoped_identifier
scoped_identifier
identifier "org"
. "."
identifier "apache"
. "."
identifier "commons"
. "."
identifier "cli2"
. "."
identifier "option"
; ";"
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 "HashSet"
; ";"
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"
; ";"
import_declaration
import "import"
scoped_identifier
scoped_identifier
identifier "java"
. "."
identifier "util"
. "."
identifier "ListIterator"
; ";"
import_declaration
import "import"
scoped_identifier
scoped_identifier
identifier "java"
. "."
identifier "util"
. "."
identifier "Map"
; ";"
import_declaration
import "import"
scoped_identifier
scoped_identifier
identifier "java"
. "."
identifier "util"
. "."
identifier "Set"
; ";"
import_declaration
import "import"
scoped_identifier
scoped_identifier
identifier "java"
. "."
identifier "util"
. "."
identifier "SortedMap"
; ";"
import_declaration
import "import"
scoped_identifier
scoped_identifier
identifier "java"
. "."
identifier "util"
. "."
identifier "TreeMap"
; ";"
import_declaration
import "import"
scoped_identifier
scoped_identifier
scoped_identifier
scoped_identifier
identifier "org"
. "."
identifier "apache"
. "."
identifier "commons"
. "."
identifier "cli2"
. "."
identifier "Argument"
; ";"
import_declaration
import "import"
scoped_identifier
scoped_identifier
scoped_identifier
scoped_identifier
identifier "org"
. "."
identifier "apache"
. "."
identifier "commons"
. "."
identifier "cli2"
. "."
identifier "DisplaySetting"
; ";"
import_declaration
import "import"
scoped_identifier
scoped_identifier
scoped_identifier
scoped_identifier
identifier "org"
. "."
identifier "apache"
. "."
identifier "commons"
. "."
identifier "cli2"
. "."
identifier "Group"
; ";"
import_declaration
import "import"
scoped_identifier
scoped_identifier
scoped_identifier
scoped_identifier
identifier "org"
. "."
identifier "apache"
. "."
identifier "commons"
. "."
identifier "cli2"
. "."
identifier "HelpLine"
; ";"
import_declaration
import "import"
scoped_identifier
scoped_identifier
scoped_identifier
scoped_identifier
identifier "org"
. "."
identifier "apache"
. "."
identifier "commons"
. "."
identifier "cli2"
. "."
identifier "Option"
; ";"
import_declaration
import "import"
scoped_identifier
scoped_identifier
scoped_identifier
scoped_identifier
identifier "org"
. "."
identifier "apache"
. "."
identifier "commons"
. "."
identifier "cli2"
. "."
identifier "OptionException"
; ";"
import_declaration
import "import"
scoped_identifier
scoped_identifier
scoped_identifier
scoped_identifier
identifier "org"
. "."
identifier "apache"
. "."
identifier "commons"
. "."
identifier "cli2"
. "."
identifier "WriteableCommandLine"
; ";"
import_declaration
import "import"
scoped_identifier
scoped_identifier
scoped_identifier
scoped_identifier
scoped_identifier
identifier "org"
. "."
identifier "apache"
. "."
identifier "commons"
. "."
identifier "cli2"
. "."
identifier "resource"
. "."
identifier "ResourceConstants"
; ";"
block_comment "/**\n * An implementation of Group\n */"
class_declaration
modifiers
public "public"
class "class"
identifier "GroupImpl"
superclass
extends "extends"
type_identifier "OptionImpl"
super_interfaces
implements "implements"
type_list
type_identifier "Group"
class_body
{ "{"
field_declaration
modifiers
private "private"
final "final"
type_identifier "String"
variable_declarator
identifier "name"
; ";"
field_declaration
modifiers
private "private"
final "final"
type_identifier "String"
variable_declarator
identifier "description"
; ";"
field_declaration
modifiers
private "private"
final "final"
type_identifier "List"
variable_declarator
identifier "options"
; ";"
field_declaration
modifiers
private "private"
final "final"
integral_type
int "int"
variable_declarator
identifier "minimum"
; ";"
field_declaration
modifiers
private "private"
final "final"
integral_type
int "int"
variable_declarator
identifier "maximum"
; ";"
field_declaration
modifiers
private "private"
final "final"
type_identifier "List"
variable_declarator
identifier "anonymous"
; ";"
field_declaration
modifiers
private "private"
final "final"
type_identifier "SortedMap"
variable_declarator
identifier "optionMap"
; ";"
field_declaration
modifiers
private "private"
final "final"
type_identifier "Set"
variable_declarator
identifier "prefixes"
; ";"
block_comment "/**\n * Creates a new GroupImpl using the specified param"...
constructor_declaration
modifiers
public "public"
identifier "GroupImpl"
formal_parameters (+34 nodes collapsed)
constructor_body
{ "{"
explicit_constructor_invocation
super "super"
argument_list
( "("
decimal_integer_literal "0"
, ","
false "false"
) ")"
; ";"
expression_statement
assignment_expression
field_access
this "this"
. "."
identifier "name"
= "="
identifier "name"
; ";"
expression_statement
assignment_expression
field_access
this "this"
. "."
identifier "description"
= "="
identifier "description"
; ";"
expression_statement
assignment_expression
field_access
this "this"
. "."
identifier "minimum"
= "="
identifier "minimum"
; ";"
expression_statement
assignment_expression
field_access
this "this"
. "."
identifier "maximum"
= "="
identifier "maximum"
; ";"
line_comment "// store a copy of the options to be used by the"
line_comment "// help methods"
expression_statement
assignment_expression
field_access
this "this"
. "."
identifier "options"
= "="
method_invocation
identifier "Collections"
. "."
identifier "unmodifiableList"
argument_list
( "("
identifier "options"
) ")"
; ";"
line_comment "// anonymous Argument temporary storage"
local_variable_declaration
modifiers
final "final"
type_identifier "List"
variable_declarator
identifier "newAnonymous"
= "="
object_creation_expression
new "new"
type_identifier "ArrayList"
argument_list
( "("
) ")"
; ";"
line_comment "// map (key=trigger & value=Option) temporary storage"
local_variable_declaration (+21 nodes collapsed)
line_comment "// prefixes temporary storage"
local_variable_declaration
modifiers
final "final"
type_identifier "Set"
variable_declarator
identifier "newPrefixes"
= "="
object_creation_expression
new "new"
type_identifier "HashSet"
argument_list
( "("
) ")"
; ";"
line_comment "// process the options"
for_statement
for "for"
( "("
local_variable_declaration
modifiers
final "final"
type_identifier "Iterator"
variable_declarator
identifier "i"
= "="
method_invocation
identifier "options"
. "."
identifier "iterator"
argument_list
( "("
) ")"
; ";"
method_invocation
identifier "i"
. "."
identifier "hasNext"
argument_list
( "("
) ")"
; ";"
) ")"
block
{ "{"
local_variable_declaration
modifiers
final "final"
type_identifier "Option"
variable_declarator
identifier "option"
= "="
cast_expression
( "("
type_identifier "Option"
) ")"
method_invocation
identifier "i"
. "."
identifier "next"
argument_list
( "("
) ")"
; ";"
if_statement (+113 nodes collapsed)
} "}"
expression_statement
assignment_expression
field_access
this "this"
. "."
identifier "anonymous"
= "="
method_invocation
identifier "Collections"
. "."
identifier "unmodifiableList"
argument_list
( "("
identifier "newAnonymous"
) ")"
; ";"
expression_statement
assignment_expression
field_access
this "this"
. "."
identifier "optionMap"
= "="
method_invocation
identifier "Collections"
. "."
identifier "unmodifiableSortedMap"
argument_list
( "("
identifier "newOptionMap"
) ")"
; ";"
expression_statement
assignment_expression
field_access
this "this"
. "."
identifier "prefixes"
= "="
method_invocation
identifier "Collections"
. "."
identifier "unmodifiableSet"
argument_list
( "("
identifier "newPrefixes"
) ")"
; ";"
} "}"
method_declaration (+201 nodes collapsed)
method_declaration
modifiers
public "public"
type_identifier "Set"
identifier "getPrefixes"
formal_parameters
( "("
) ")"
block
{ "{"
return_statement
return "return"
identifier "prefixes"
; ";"
} "}"
method_declaration (+21 nodes collapsed)
method_declaration (+449 nodes collapsed)
method_declaration (+294 nodes collapsed)
method_declaration
modifiers
public "public"
type_identifier "String"
identifier "getPreferredName"
formal_parameters
( "("
) ")"
block
{ "{"
return_statement
return "return"
identifier "name"
; ";"
} "}"
method_declaration
modifiers
public "public"
type_identifier "String"
identifier "getDescription"
formal_parameters
( "("
) ")"
block
{ "{"
return_statement
return "return"
identifier "description"
; ";"
} "}"
method_declaration (+45 nodes collapsed)
method_declaration (+633 nodes collapsed)
method_declaration (+334 nodes collapsed)
block_comment "/**\n * Gets the member Options of thie Group.\n * Not"...
method_declaration
modifiers
public "public"
type_identifier "List"
identifier "getOptions"
formal_parameters
( "("
) ")"
block
{ "{"
return_statement
return "return"
identifier "options"
; ";"
} "}"
block_comment "/**\n * Gets the anonymous Arguments of this Group.\n "...
method_declaration
modifiers
public "public"
type_identifier "List"
identifier "getAnonymous"
formal_parameters
( "("
) ")"
block
{ "{"
return_statement
return "return"
identifier "anonymous"
; ";"
} "}"
method_declaration (+105 nodes collapsed)
method_declaration
modifiers
public "public"
integral_type
int "int"
identifier "getMinimum"
formal_parameters
( "("
) ")"
block
{ "{"
return_statement
return "return"
identifier "minimum"
; ";"
} "}"
method_declaration
modifiers
public "public"
integral_type
int "int"
identifier "getMaximum"
formal_parameters
( "("
) ")"
block
{ "{"
return_statement
return "return"
identifier "maximum"
; ";"
} "}"
method_declaration (+22 nodes collapsed)
method_declaration (+144 nodes collapsed)
} "}"
class_declaration (+117 nodes collapsed)

After

program
block_comment "/*\n * Licensed to the Apache Software Foundation (ASF) under"...
package_declaration
package "package"
scoped_identifier
scoped_identifier
scoped_identifier
scoped_identifier
identifier "org"
. "."
identifier "apache"
. "."
identifier "commons"
. "."
identifier "cli2"
. "."
identifier "option"
; ";"
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 "HashSet"
; ";"
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"
; ";"
import_declaration
import "import"
scoped_identifier
scoped_identifier
identifier "java"
. "."
identifier "util"
. "."
identifier "ListIterator"
; ";"
import_declaration
import "import"
scoped_identifier
scoped_identifier
identifier "java"
. "."
identifier "util"
. "."
identifier "Map"
; ";"
import_declaration
import "import"
scoped_identifier
scoped_identifier
identifier "java"
. "."
identifier "util"
. "."
identifier "Set"
; ";"
import_declaration
import "import"
scoped_identifier
scoped_identifier
identifier "java"
. "."
identifier "util"
. "."
identifier "SortedMap"
; ";"
import_declaration
import "import"
scoped_identifier
scoped_identifier
identifier "java"
. "."
identifier "util"
. "."
identifier "TreeMap"
; ";"
import_declaration
import "import"
scoped_identifier
scoped_identifier
scoped_identifier
scoped_identifier
identifier "org"
. "."
identifier "apache"
. "."
identifier "commons"
. "."
identifier "cli2"
. "."
identifier "Argument"
; ";"
import_declaration
import "import"
scoped_identifier
scoped_identifier
scoped_identifier
scoped_identifier
identifier "org"
. "."
identifier "apache"
. "."
identifier "commons"
. "."
identifier "cli2"
. "."
identifier "DisplaySetting"
; ";"
import_declaration
import "import"
scoped_identifier
scoped_identifier
scoped_identifier
scoped_identifier
identifier "org"
. "."
identifier "apache"
. "."
identifier "commons"
. "."
identifier "cli2"
. "."
identifier "Group"
; ";"
import_declaration
import "import"
scoped_identifier
scoped_identifier
scoped_identifier
scoped_identifier
identifier "org"
. "."
identifier "apache"
. "."
identifier "commons"
. "."
identifier "cli2"
. "."
identifier "HelpLine"
; ";"
import_declaration
import "import"
scoped_identifier
scoped_identifier
scoped_identifier
scoped_identifier
identifier "org"
. "."
identifier "apache"
. "."
identifier "commons"
. "."
identifier "cli2"
. "."
identifier "Option"
; ";"
import_declaration
import "import"
scoped_identifier
scoped_identifier
scoped_identifier
scoped_identifier
identifier "org"
. "."
identifier "apache"
. "."
identifier "commons"
. "."
identifier "cli2"
. "."
identifier "OptionException"
; ";"
import_declaration
import "import"
scoped_identifier
scoped_identifier
scoped_identifier
scoped_identifier
identifier "org"
. "."
identifier "apache"
. "."
identifier "commons"
. "."
identifier "cli2"
. "."
identifier "WriteableCommandLine"
; ";"
import_declaration
import "import"
scoped_identifier
scoped_identifier
scoped_identifier
scoped_identifier
scoped_identifier
identifier "org"
. "."
identifier "apache"
. "."
identifier "commons"
. "."
identifier "cli2"
. "."
identifier "resource"
. "."
identifier "ResourceConstants"
; ";"
block_comment "/**\n * An implementation of Group\n */"
class_declaration
modifiers
public "public"
class "class"
identifier "GroupImpl"
superclass
extends "extends"
type_identifier "OptionImpl"
super_interfaces
implements "implements"
type_list
type_identifier "Group"
class_body
{ "{"
field_declaration
modifiers
private "private"
final "final"
type_identifier "String"
variable_declarator
identifier "name"
; ";"
field_declaration
modifiers
private "private"
final "final"
type_identifier "String"
variable_declarator
identifier "description"
; ";"
field_declaration
modifiers
private "private"
final "final"
type_identifier "List"
variable_declarator
identifier "options"
; ";"
field_declaration
modifiers
private "private"
final "final"
integral_type
int "int"
variable_declarator
identifier "minimum"
; ";"
field_declaration
modifiers
private "private"
final "final"
integral_type
int "int"
variable_declarator
identifier "maximum"
; ";"
field_declaration
modifiers
private "private"
final "final"
type_identifier "List"
variable_declarator
identifier "anonymous"
; ";"
field_declaration
modifiers
private "private"
final "final"
type_identifier "SortedMap"
variable_declarator
identifier "optionMap"
; ";"
field_declaration
modifiers
private "private"
final "final"
type_identifier "Set"
variable_declarator
identifier "prefixes"
; ";"
block_comment "/**\n * Creates a new GroupImpl using the specified param"...
constructor_declaration
modifiers
public "public"
identifier "GroupImpl"
formal_parameters (+34 nodes collapsed)
constructor_body
{ "{"
explicit_constructor_invocation
super "super"
argument_list
( "("
decimal_integer_literal "0"
, ","
false "false"
) ")"
; ";"
expression_statement
assignment_expression
field_access
this "this"
. "."
identifier "name"
= "="
identifier "name"
; ";"
expression_statement
assignment_expression
field_access
this "this"
. "."
identifier "description"
= "="
identifier "description"
; ";"
expression_statement
assignment_expression
field_access
this "this"
. "."
identifier "minimum"
= "="
identifier "minimum"
; ";"
expression_statement
assignment_expression
field_access
this "this"
. "."
identifier "maximum"
= "="
identifier "maximum"
; ";"
line_comment "// store a copy of the options to be used by the"
line_comment "// help methods"
expression_statement
assignment_expression
field_access
this "this"
. "."
identifier "options"
= "="
method_invocation
identifier "Collections"
. "."
identifier "unmodifiableList"
argument_list
( "("
identifier "options"
) ")"
; ";"
line_comment "// anonymous Argument temporary storage"
local_variable_declaration
modifiers
final "final"
type_identifier "List"
variable_declarator
identifier "newAnonymous"
= "="
object_creation_expression
new "new"
type_identifier "ArrayList"
argument_list
( "("
) ")"
; ";"
line_comment "// map (key=trigger & value=Option) temporary storage"
local_variable_declaration (+21 nodes collapsed)
line_comment "// prefixes temporary storage"
local_variable_declaration
modifiers
final "final"
type_identifier "Set"
variable_declarator
identifier "newPrefixes"
= "="
object_creation_expression
new "new"
type_identifier "HashSet"
argument_list
( "("
) ")"
; ";"
line_comment "// process the options"
for_statement
for "for"
( "("
local_variable_declaration
modifiers
final "final"
type_identifier "Iterator"
variable_declarator
identifier "i"
= "="
method_invocation
identifier "options"
. "."
identifier "iterator"
argument_list
( "("
) ")"
; ";"
method_invocation
identifier "i"
. "."
identifier "hasNext"
argument_list
( "("
) ")"
; ";"
) ")"
block
{ "{"
local_variable_declaration
modifiers
final "final"
type_identifier "Option"
variable_declarator
identifier "option"
= "="
cast_expression
( "("
type_identifier "Option"
) ")"
method_invocation
identifier "i"
. "."
identifier "next"
argument_list
( "("
) ")"
; ";"
expression_statement
method_invocation
identifier "option"
. "."
identifier "setParent"
argument_list
( "("
this "this"
) ")"
; ";"
if_statement (+113 nodes collapsed)
} "}"
expression_statement
assignment_expression
field_access
this "this"
. "."
identifier "anonymous"
= "="
method_invocation
identifier "Collections"
. "."
identifier "unmodifiableList"
argument_list
( "("
identifier "newAnonymous"
) ")"
; ";"
expression_statement
assignment_expression
field_access
this "this"
. "."
identifier "optionMap"
= "="
method_invocation
identifier "Collections"
. "."
identifier "unmodifiableSortedMap"
argument_list
( "("
identifier "newOptionMap"
) ")"
; ";"
expression_statement
assignment_expression
field_access
this "this"
. "."
identifier "prefixes"
= "="
method_invocation
identifier "Collections"
. "."
identifier "unmodifiableSet"
argument_list
( "("
identifier "newPrefixes"
) ")"
; ";"
} "}"
method_declaration (+201 nodes collapsed)
method_declaration
modifiers
public "public"
type_identifier "Set"
identifier "getPrefixes"
formal_parameters
( "("
) ")"
block
{ "{"
return_statement
return "return"
identifier "prefixes"
; ";"
} "}"
method_declaration (+21 nodes collapsed)
method_declaration (+449 nodes collapsed)
method_declaration (+294 nodes collapsed)
method_declaration
modifiers
public "public"
type_identifier "String"
identifier "getPreferredName"
formal_parameters
( "("
) ")"
block
{ "{"
return_statement
return "return"
identifier "name"
; ";"
} "}"
method_declaration
modifiers
public "public"
type_identifier "String"
identifier "getDescription"
formal_parameters
( "("
) ")"
block
{ "{"
return_statement
return "return"
identifier "description"
; ";"
} "}"
method_declaration (+45 nodes collapsed)
method_declaration (+633 nodes collapsed)
method_declaration (+334 nodes collapsed)
block_comment "/**\n * Gets the member Options of thie Group.\n * Not"...
method_declaration
modifiers
public "public"
type_identifier "List"
identifier "getOptions"
formal_parameters
( "("
) ")"
block
{ "{"
return_statement
return "return"
identifier "options"
; ";"
} "}"
block_comment "/**\n * Gets the anonymous Arguments of this Group.\n "...
method_declaration
modifiers
public "public"
type_identifier "List"
identifier "getAnonymous"
formal_parameters
( "("
) ")"
block
{ "{"
return_statement
return "return"
identifier "anonymous"
; ";"
} "}"
method_declaration (+105 nodes collapsed)
method_declaration
modifiers
public "public"
integral_type
int "int"
identifier "getMinimum"
formal_parameters
( "("
) ")"
block
{ "{"
return_statement
return "return"
identifier "minimum"
; ";"
} "}"
method_declaration
modifiers
public "public"
integral_type
int "int"
identifier "getMaximum"
formal_parameters
( "("
) ")"
block
{ "{"
return_statement
return "return"
identifier "maximum"
; ";"
} "}"
method_declaration (+22 nodes collapsed)
method_declaration (+144 nodes collapsed)
} "}"
class_declaration (+117 nodes collapsed)