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–29 unchanged (29 lines)
30 * A base implementation of Option providing limited ground work for further
31 * Option implementations.
32 */
33public abstract class OptionImpl implements Option {
34 private final int id;
35 private final boolean required;
36
37 /**
38 * Creates an OptionImpl with the specified id
39 * @param id the unique id of this Option
40 * @param required true iff this Option must be present
41 */
42 public OptionImpl(final int id,
…lines 43–120 unchanged (78 lines)
121 return required;
122 }
123
124 public void defaults(final WriteableCommandLine commandLine) {
125 // nothing to do normally
126 }
127
128
129
130 protected void checkPrefixes(final Set prefixes) {
131 // nothing to do if empty prefix list
132 if (prefixes.isEmpty()) {
133 return;
…lines 134–164 unchanged (31 lines)

After

…lines 1–29 unchanged (29 lines)
30 * A base implementation of Option providing limited ground work for further
31 * Option implementations.
32 */
33public abstract class OptionImpl implements Option {
34 private final int id;
35 private final boolean required;
36 private Option parent;
37
38 /**
39 * Creates an OptionImpl with the specified id
40 * @param id the unique id of this Option
41 * @param required true iff this Option must be present
42 */
…lines 43–122 unchanged (80 lines)
123 }
124
125 public void defaults(final WriteableCommandLine commandLine) {
126 // nothing to do normally
127 }
128
129 public Option getParent() {
130 return parent;
131 }
132
133 public void setParent(Option parent) {
134 this.parent = parent;
135 }
136
137 protected void checkPrefixes(final Set prefixes) {
138 // nothing to do if empty prefix list
139 if (prefixes.isEmpty()) {
140 return;
141 }
…lines 142–171 unchanged (30 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 "Iterator"
; ";"
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
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 "Option"
; ";"
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"
; ";"
block_comment "/**\n * A base implementation of Option providing limited gro"...
class_declaration
modifiers
public "public"
abstract "abstract"
class "class"
identifier "OptionImpl"
super_interfaces
implements "implements"
type_list
type_identifier "Option"
class_body
{ "{"
field_declaration
modifiers
private "private"
final "final"
integral_type
int "int"
variable_declarator
identifier "id"
; ";"
field_declaration
modifiers
private "private"
final "final"
boolean_type "boolean"
variable_declarator
identifier "required"
; ";"
block_comment "/**\n * Creates an OptionImpl with the specified id\n "...
constructor_declaration (+40 nodes collapsed)
method_declaration (+84 nodes collapsed)
method_declaration (+50 nodes collapsed)
method_declaration
modifiers
public "public"
integral_type
int "int"
identifier "getId"
formal_parameters
( "("
) ")"
block
{ "{"
return_statement
return "return"
identifier "id"
; ";"
} "}"
method_declaration (+149 nodes collapsed)
method_declaration (+90 nodes collapsed)
method_declaration (+160 nodes collapsed)
method_declaration (+46 nodes collapsed)
method_declaration
modifiers
public "public"
boolean_type "boolean"
identifier "isRequired"
formal_parameters
( "("
) ")"
block
{ "{"
return_statement
return "return"
identifier "required"
; ";"
} "}"
method_declaration
modifiers
public "public"
void_type "void"
identifier "defaults"
formal_parameters
( "("
formal_parameter
modifiers
final "final"
type_identifier "WriteableCommandLine"
identifier "commandLine"
) ")"
block
{ "{"
line_comment "// nothing to do normally"
} "}"
method_declaration (+114 nodes collapsed)
method_declaration (+142 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 "Iterator"
; ";"
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
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 "Option"
; ";"
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"
; ";"
block_comment "/**\n * A base implementation of Option providing limited gro"...
class_declaration
modifiers
public "public"
abstract "abstract"
class "class"
identifier "OptionImpl"
super_interfaces
implements "implements"
type_list
type_identifier "Option"
class_body
{ "{"
field_declaration
modifiers
private "private"
final "final"
integral_type
int "int"
variable_declarator
identifier "id"
; ";"
field_declaration
modifiers
private "private"
final "final"
boolean_type "boolean"
variable_declarator
identifier "required"
; ";"
field_declaration
modifiers
private "private"
type_identifier "Option"
variable_declarator
identifier "parent"
; ";"
block_comment "/**\n * Creates an OptionImpl with the specified id\n "...
constructor_declaration (+40 nodes collapsed)
method_declaration (+84 nodes collapsed)
method_declaration (+50 nodes collapsed)
method_declaration
modifiers
public "public"
integral_type
int "int"
identifier "getId"
formal_parameters
( "("
) ")"
block
{ "{"
return_statement
return "return"
identifier "id"
; ";"
} "}"
method_declaration (+149 nodes collapsed)
method_declaration (+90 nodes collapsed)
method_declaration (+160 nodes collapsed)
method_declaration (+46 nodes collapsed)
method_declaration
modifiers
public "public"
boolean_type "boolean"
identifier "isRequired"
formal_parameters
( "("
) ")"
block
{ "{"
return_statement
return "return"
identifier "required"
; ";"
} "}"
method_declaration
modifiers
public "public"
void_type "void"
identifier "defaults"
formal_parameters
( "("
formal_parameter
modifiers
final "final"
type_identifier "WriteableCommandLine"
identifier "commandLine"
) ")"
block
{ "{"
line_comment "// nothing to do normally"
} "}"
method_declaration
modifiers
public "public"
type_identifier "Option"
identifier "getParent"
formal_parameters
( "("
) ")"
block
{ "{"
return_statement
return "return"
identifier "parent"
; ";"
} "}"
method_declaration
modifiers
public "public"
void_type "void"
identifier "setParent"
formal_parameters
( "("
formal_parameter
type_identifier "Option"
identifier "parent"
) ")"
block
{ "{"
expression_statement
assignment_expression
field_access
this "this"
. "."
identifier "parent"
= "="
identifier "parent"
; ";"
} "}"
method_declaration (+114 nodes collapsed)
method_declaration (+142 nodes collapsed)
} "}"