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–137 unchanged (137 lines)
138
139 public void processValues(final WriteableCommandLine commandLine,
140 final ListIterator arguments,
141 final Option option)
142 throws OptionException {
143 // count of arguments processed for this option.
144 int argumentCount = 0;
145
146 while (arguments.hasNext() && (argumentCount < maximum)) {
147 final String allValuesQuoted = (String) arguments.next();
148 final String allValues = stripBoundaryQuotes(allValuesQuoted);
149
150 // should we ignore things that look like options?
…lines 151–376 unchanged (226 lines)

After

…lines 1–137 unchanged (137 lines)
138
139 public void processValues(final WriteableCommandLine commandLine,
140 final ListIterator arguments,
141 final Option option)
142 throws OptionException {
143 // count of arguments processed for this option.
144 int argumentCount = commandLine.getUndefaultedValues(option).size();
145
146 while (arguments.hasNext() && (argumentCount < maximum)) {
147 final String allValuesQuoted = (String) arguments.next();
148 final String allValues = stripBoundaryQuotes(allValuesQuoted);
149
150 // should we ignore things that look like options?
…lines 151–376 unchanged (226 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 "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 "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 "Set"
; ";"
import_declaration
import "import"
scoped_identifier
scoped_identifier
identifier "java"
. "."
identifier "util"
. "."
identifier "StringTokenizer"
; ";"
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 "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"
; ";"
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 "ResourceHelper"
; ";"
import_declaration
import "import"
scoped_identifier
scoped_identifier
scoped_identifier
scoped_identifier
scoped_identifier
identifier "org"
. "."
identifier "apache"
. "."
identifier "commons"
. "."
identifier "cli2"
. "."
identifier "validation"
. "."
identifier "InvalidArgumentException"
; ";"
import_declaration
import "import"
scoped_identifier
scoped_identifier
scoped_identifier
scoped_identifier
scoped_identifier
identifier "org"
. "."
identifier "apache"
. "."
identifier "commons"
. "."
identifier "cli2"
. "."
identifier "validation"
. "."
identifier "Validator"
; ";"
block_comment "/**\n * An implementation of an Argument.\n */"
class_declaration
modifiers
public "public"
class "class"
identifier "ArgumentImpl"
superclass
extends "extends"
type_identifier "OptionImpl"
super_interfaces
implements "implements"
type_list
type_identifier "Argument"
class_body
{ "{"
field_declaration
modifiers
private "private"
static "static"
final "final"
integral_type
char "char"
variable_declarator
identifier "NUL"
= "="
character_literal "'\\0'"
; ";"
block_comment "/**\n * The default value for the initial separator char."...
field_declaration
modifiers
public "public"
static "static"
final "final"
integral_type
char "char"
variable_declarator
identifier "DEFAULT_INITIAL_SEPARATOR"
= "="
identifier "NUL"
; ";"
block_comment "/**\n * The default value for the subsequent separator ch"...
field_declaration
modifiers
public "public"
static "static"
final "final"
integral_type
char "char"
variable_declarator
identifier "DEFAULT_SUBSEQUENT_SEPARATOR"
= "="
identifier "NUL"
; ";"
block_comment "/**\n * The default token to indicate that remaining argu"...
field_declaration
modifiers
public "public"
static "static"
final "final"
type_identifier "String"
variable_declarator
identifier "DEFAULT_CONSUME_REMAINING"
= "="
string_literal
" "\""
string_fragment "--"
" "\""
; ";"
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"
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"
integral_type
char "char"
variable_declarator
identifier "initialSeparator"
; ";"
field_declaration
modifiers
private "private"
final "final"
integral_type
char "char"
variable_declarator
identifier "subsequentSeparator"
; ";"
field_declaration
modifiers
private "private"
final "final"
boolean_type "boolean"
variable_declarator
identifier "subsequentSplit"
; ";"
field_declaration
modifiers
private "private"
final "final"
type_identifier "Validator"
variable_declarator
identifier "validator"
; ";"
field_declaration
modifiers
private "private"
final "final"
type_identifier "String"
variable_declarator
identifier "consumeRemaining"
; ";"
field_declaration
modifiers
private "private"
final "final"
type_identifier "List"
variable_declarator
identifier "defaultValues"
; ";"
field_declaration
modifiers
private "private"
final "final"
type_identifier "ResourceHelper"
variable_declarator
identifier "resources"
= "="
method_invocation
identifier "ResourceHelper"
. "."
identifier "getResourceHelper"
argument_list
( "("
) ")"
; ";"
block_comment "/**\n * Creates a new Argument instance.\n *\n * @p"...
constructor_declaration (+328 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"
void_type "void"
identifier "processValues"
formal_parameters
( "("
formal_parameter
modifiers
final "final"
type_identifier "WriteableCommandLine"
identifier "commandLine"
, ","
formal_parameter
modifiers
final "final"
type_identifier "ListIterator"
identifier "arguments"
, ","
formal_parameter
modifiers
final "final"
type_identifier "Option"
identifier "option"
) ")"
throws
throws "throws"
type_identifier "OptionException"
block
{ "{"
line_comment "// count of arguments processed for this option."
local_variable_declaration
integral_type
int "int"
variable_declarator
identifier "argumentCount"
= "="
decimal_integer_literal "0"
; ";"
while_statement (+321 nodes collapsed)
} "}"
method_declaration (+26 nodes collapsed)
method_declaration
modifiers
public "public"
type_identifier "Set"
identifier "getPrefixes"
formal_parameters
( "("
) ")"
block
{ "{"
return_statement
return "return"
field_access
identifier "Collections"
. "."
identifier "EMPTY_SET"
; ";"
} "}"
method_declaration (+33 nodes collapsed)
method_declaration
modifiers
public "public"
integral_type
char "char"
identifier "getInitialSeparator"
formal_parameters
( "("
) ")"
block
{ "{"
return_statement
return "return"
field_access
this "this"
. "."
identifier "initialSeparator"
; ";"
} "}"
method_declaration
modifiers
public "public"
integral_type
char "char"
identifier "getSubsequentSeparator"
formal_parameters
( "("
) ")"
block
{ "{"
return_statement
return "return"
field_access
this "this"
. "."
identifier "subsequentSeparator"
; ";"
} "}"
method_declaration
modifiers
public "public"
type_identifier "Set"
identifier "getTriggers"
formal_parameters
( "("
) ")"
block
{ "{"
return_statement
return "return"
field_access
identifier "Collections"
. "."
identifier "EMPTY_SET"
; ";"
} "}"
method_declaration
modifiers
public "public"
type_identifier "String"
identifier "getConsumeRemaining"
formal_parameters
( "("
) ")"
block
{ "{"
return_statement
return "return"
field_access
this "this"
. "."
identifier "consumeRemaining"
; ";"
} "}"
method_declaration
modifiers
public "public"
type_identifier "List"
identifier "getDefaultValues"
formal_parameters
( "("
) ")"
block
{ "{"
return_statement
return "return"
field_access
this "this"
. "."
identifier "defaultValues"
; ";"
} "}"
method_declaration
modifiers
public "public"
type_identifier "Validator"
identifier "getValidator"
formal_parameters
( "("
) ")"
block
{ "{"
return_statement
return "return"
field_access
this "this"
. "."
identifier "validator"
; ";"
} "}"
method_declaration (+29 nodes collapsed)
method_declaration (+181 nodes collapsed)
method_declaration (+369 nodes collapsed)
method_declaration
modifiers
public "public"
type_identifier "String"
identifier "getDescription"
formal_parameters
( "("
) ")"
block
{ "{"
return_statement
return "return"
identifier "description"
; ";"
} "}"
method_declaration (+57 nodes collapsed)
method_declaration
modifiers
public "public"
integral_type
int "int"
identifier "getMaximum"
formal_parameters
( "("
) ")"
block
{ "{"
return_statement
return "return"
identifier "maximum"
; ";"
} "}"
method_declaration
modifiers
public "public"
integral_type
int "int"
identifier "getMinimum"
formal_parameters
( "("
) ")"
block
{ "{"
return_statement
return "return"
identifier "minimum"
; ";"
} "}"
block_comment "/**\n * If there are any leading or trailing quotes remov"...
method_declaration (+82 nodes collapsed)
method_declaration (+22 nodes collapsed)
method_declaration (+36 nodes collapsed)
method_declaration (+34 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 "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 "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 "Set"
; ";"
import_declaration
import "import"
scoped_identifier
scoped_identifier
identifier "java"
. "."
identifier "util"
. "."
identifier "StringTokenizer"
; ";"
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 "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"
; ";"
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 "ResourceHelper"
; ";"
import_declaration
import "import"
scoped_identifier
scoped_identifier
scoped_identifier
scoped_identifier
scoped_identifier
identifier "org"
. "."
identifier "apache"
. "."
identifier "commons"
. "."
identifier "cli2"
. "."
identifier "validation"
. "."
identifier "InvalidArgumentException"
; ";"
import_declaration
import "import"
scoped_identifier
scoped_identifier
scoped_identifier
scoped_identifier
scoped_identifier
identifier "org"
. "."
identifier "apache"
. "."
identifier "commons"
. "."
identifier "cli2"
. "."
identifier "validation"
. "."
identifier "Validator"
; ";"
block_comment "/**\n * An implementation of an Argument.\n */"
class_declaration
modifiers
public "public"
class "class"
identifier "ArgumentImpl"
superclass
extends "extends"
type_identifier "OptionImpl"
super_interfaces
implements "implements"
type_list
type_identifier "Argument"
class_body
{ "{"
field_declaration
modifiers
private "private"
static "static"
final "final"
integral_type
char "char"
variable_declarator
identifier "NUL"
= "="
character_literal "'\\0'"
; ";"
block_comment "/**\n * The default value for the initial separator char."...
field_declaration
modifiers
public "public"
static "static"
final "final"
integral_type
char "char"
variable_declarator
identifier "DEFAULT_INITIAL_SEPARATOR"
= "="
identifier "NUL"
; ";"
block_comment "/**\n * The default value for the subsequent separator ch"...
field_declaration
modifiers
public "public"
static "static"
final "final"
integral_type
char "char"
variable_declarator
identifier "DEFAULT_SUBSEQUENT_SEPARATOR"
= "="
identifier "NUL"
; ";"
block_comment "/**\n * The default token to indicate that remaining argu"...
field_declaration
modifiers
public "public"
static "static"
final "final"
type_identifier "String"
variable_declarator
identifier "DEFAULT_CONSUME_REMAINING"
= "="
string_literal
" "\""
string_fragment "--"
" "\""
; ";"
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"
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"
integral_type
char "char"
variable_declarator
identifier "initialSeparator"
; ";"
field_declaration
modifiers
private "private"
final "final"
integral_type
char "char"
variable_declarator
identifier "subsequentSeparator"
; ";"
field_declaration
modifiers
private "private"
final "final"
boolean_type "boolean"
variable_declarator
identifier "subsequentSplit"
; ";"
field_declaration
modifiers
private "private"
final "final"
type_identifier "Validator"
variable_declarator
identifier "validator"
; ";"
field_declaration
modifiers
private "private"
final "final"
type_identifier "String"
variable_declarator
identifier "consumeRemaining"
; ";"
field_declaration
modifiers
private "private"
final "final"
type_identifier "List"
variable_declarator
identifier "defaultValues"
; ";"
field_declaration
modifiers
private "private"
final "final"
type_identifier "ResourceHelper"
variable_declarator
identifier "resources"
= "="
method_invocation
identifier "ResourceHelper"
. "."
identifier "getResourceHelper"
argument_list
( "("
) ")"
; ";"
block_comment "/**\n * Creates a new Argument instance.\n *\n * @p"...
constructor_declaration (+328 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"
void_type "void"
identifier "processValues"
formal_parameters
( "("
formal_parameter
modifiers
final "final"
type_identifier "WriteableCommandLine"
identifier "commandLine"
, ","
formal_parameter
modifiers
final "final"
type_identifier "ListIterator"
identifier "arguments"
, ","
formal_parameter
modifiers
final "final"
type_identifier "Option"
identifier "option"
) ")"
throws
throws "throws"
type_identifier "OptionException"
block
{ "{"
line_comment "// count of arguments processed for this option."
local_variable_declaration
integral_type
int "int"
variable_declarator
identifier "argumentCount"
= "="
method_invocation
method_invocation
identifier "commandLine"
. "."
identifier "getUndefaultedValues"
argument_list
( "("
identifier "option"
) ")"
. "."
identifier "size"
argument_list
( "("
) ")"
; ";"
while_statement (+321 nodes collapsed)
} "}"
method_declaration (+26 nodes collapsed)
method_declaration
modifiers
public "public"
type_identifier "Set"
identifier "getPrefixes"
formal_parameters
( "("
) ")"
block
{ "{"
return_statement
return "return"
field_access
identifier "Collections"
. "."
identifier "EMPTY_SET"
; ";"
} "}"
method_declaration (+33 nodes collapsed)
method_declaration
modifiers
public "public"
integral_type
char "char"
identifier "getInitialSeparator"
formal_parameters
( "("
) ")"
block
{ "{"
return_statement
return "return"
field_access
this "this"
. "."
identifier "initialSeparator"
; ";"
} "}"
method_declaration
modifiers
public "public"
integral_type
char "char"
identifier "getSubsequentSeparator"
formal_parameters
( "("
) ")"
block
{ "{"
return_statement
return "return"
field_access
this "this"
. "."
identifier "subsequentSeparator"
; ";"
} "}"
method_declaration
modifiers
public "public"
type_identifier "Set"
identifier "getTriggers"
formal_parameters
( "("
) ")"
block
{ "{"
return_statement
return "return"
field_access
identifier "Collections"
. "."
identifier "EMPTY_SET"
; ";"
} "}"
method_declaration
modifiers
public "public"
type_identifier "String"
identifier "getConsumeRemaining"
formal_parameters
( "("
) ")"
block
{ "{"
return_statement
return "return"
field_access
this "this"
. "."
identifier "consumeRemaining"
; ";"
} "}"
method_declaration
modifiers
public "public"
type_identifier "List"
identifier "getDefaultValues"
formal_parameters
( "("
) ")"
block
{ "{"
return_statement
return "return"
field_access
this "this"
. "."
identifier "defaultValues"
; ";"
} "}"
method_declaration
modifiers
public "public"
type_identifier "Validator"
identifier "getValidator"
formal_parameters
( "("
) ")"
block
{ "{"
return_statement
return "return"
field_access
this "this"
. "."
identifier "validator"
; ";"
} "}"
method_declaration (+29 nodes collapsed)
method_declaration (+181 nodes collapsed)
method_declaration (+369 nodes collapsed)
method_declaration
modifiers
public "public"
type_identifier "String"
identifier "getDescription"
formal_parameters
( "("
) ")"
block
{ "{"
return_statement
return "return"
identifier "description"
; ";"
} "}"
method_declaration (+57 nodes collapsed)
method_declaration
modifiers
public "public"
integral_type
int "int"
identifier "getMaximum"
formal_parameters
( "("
) ")"
block
{ "{"
return_statement
return "return"
identifier "maximum"
; ";"
} "}"
method_declaration
modifiers
public "public"
integral_type
int "int"
identifier "getMinimum"
formal_parameters
( "("
) ")"
block
{ "{"
return_statement
return "return"
identifier "minimum"
; ";"
} "}"
block_comment "/**\n * If there are any leading or trailing quotes remov"...
method_declaration (+82 nodes collapsed)
method_declaration (+22 nodes collapsed)
method_declaration (+36 nodes collapsed)
method_declaration (+34 nodes collapsed)
} "}"