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–17 unchanged (17 lines)
18package org.apache.commons.cli;
19
20import java.io.Serializable;
21import java.util.ArrayList;
22import java.util.Collection;
23import java.util.Collections;
24import java.util.HashMap;
25import java.util.HashSet;
26import java.util.LinkedHashMap;
27import java.util.List;
28import java.util.Map;
29
30/**
…lines 31–54 unchanged (24 lines)
55 /** a map of the required options */
56 // N.B. This can contain either a String (addOption) or an OptionGroup (addOptionGroup)
57 // TODO this seems wrong
58 private final List<Object> requiredOpts = new ArrayList<Object>();
59
60 /** a map of the option groups */
61 private final Map<String, OptionGroup> optionGroups = new HashMap<String, OptionGroup>();
62
63 /**
64 * Add the specified option group.
65 *
66 * @param group the OptionGroup that is to be added
67 * @return the resulting Options instance
…lines 68–328 unchanged (261 lines)

After

…lines 1–17 unchanged (17 lines)
18package org.apache.commons.cli;
19
20import java.io.Serializable;
21import java.util.ArrayList;
22import java.util.Collection;
23import java.util.Collections;
24import java.util.HashSet;
25import java.util.LinkedHashMap;
26import java.util.List;
27import java.util.Map;
28
29/**
30 * Main entry-point into the library.
…lines 31–53 unchanged (23 lines)
54 /** a map of the required options */
55 // N.B. This can contain either a String (addOption) or an OptionGroup (addOptionGroup)
56 // TODO this seems wrong
57 private final List<Object> requiredOpts = new ArrayList<Object>();
58
59 /** a map of the option groups */
60 private final Map<String, OptionGroup> optionGroups = new LinkedHashMap<String, OptionGroup>();
61
62 /**
63 * Add the specified option group.
64 *
65 * @param group the OptionGroup that is to be added
66 * @return the resulting Options instance
…lines 67–327 unchanged (261 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 "Serializable"
; ";"
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 "HashMap"
; ";"
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 "LinkedHashMap"
; ";"
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 "Map"
; ";"
block_comment "/**\n * Main entry-point into the library.\n * <p>\n * Options "...
class_declaration
modifiers
public "public"
class "class"
identifier "Options"
super_interfaces
implements "implements"
type_list
type_identifier "Serializable"
class_body
{ "{"
block_comment "/** The serial version UID. */"
field_declaration
modifiers
private "private"
static "static"
final "final"
integral_type
long "long"
variable_declarator
identifier "serialVersionUID"
= "="
decimal_integer_literal "1L"
; ";"
block_comment "/** a map of the options with the character key */"
field_declaration (+29 nodes collapsed)
block_comment "/** a map of the options with the long key */"
field_declaration (+29 nodes collapsed)
block_comment "/** a map of the required options */"
line_comment "// N.B. This can contain either a String (addOption) or an O"...
line_comment "// TODO this seems wrong"
field_declaration (+25 nodes collapsed)
block_comment "/** a map of the option groups */"
field_declaration
modifiers
private "private"
final "final"
generic_type
type_identifier "Map"
type_arguments
< "<"
type_identifier "String"
, ","
type_identifier "OptionGroup"
> ">"
variable_declarator
identifier "optionGroups"
= "="
object_creation_expression
new "new"
generic_type
type_identifier "HashMap"
type_arguments
< "<"
type_identifier "String"
, ","
type_identifier "OptionGroup"
> ">"
argument_list
( "("
) ")"
; ";"
block_comment "/**\n * Add the specified option group.\n *\n * @pa"...
method_declaration (+99 nodes collapsed)
block_comment "/**\n * Lists the OptionGroups that are members of this O"...
method_declaration (+35 nodes collapsed)
block_comment "/**\n * Add an option that only contains a short name.\n "...
method_declaration (+36 nodes collapsed)
block_comment "/**\n * Add an option that only contains a short-name.\n "...
method_declaration (+40 nodes collapsed)
block_comment "/**\n * Add an option that contains a short-name and a lo"...
method_declaration (+50 nodes collapsed)
block_comment "/**\n * Adds an option instance\n *\n * @param opt "...
method_declaration (+136 nodes collapsed)
block_comment "/**\n * Retrieve a read-only list of options in this set\n"...
method_declaration (+31 nodes collapsed)
block_comment "/**\n * Returns the Options for use by the HelpFormatter."...
method_declaration (+35 nodes collapsed)
block_comment "/**\n * Returns the required options.\n *\n * @retu"...
method_declaration (+22 nodes collapsed)
block_comment "/**\n * Retrieve the {@link Option} matching the long or "...
method_declaration (+65 nodes collapsed)
block_comment "/**\n * Returns the options with a long name starting wit"...
method_declaration (+135 nodes collapsed)
block_comment "/**\n * Returns whether the named {@link Option} is a mem"...
method_declaration (+48 nodes collapsed)
block_comment "/**\n * Returns whether the named {@link Option} is a mem"...
method_declaration (+38 nodes collapsed)
block_comment "/**\n * Returns whether the named {@link Option} is a mem"...
method_declaration (+38 nodes collapsed)
block_comment "/**\n * Returns the OptionGroup the <code>opt</code> belo"...
method_declaration (+31 nodes collapsed)
block_comment "/**\n * Dump state, suitable for debugging.\n *\n *"...
method_declaration (+101 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 "Serializable"
; ";"
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 "HashSet"
; ";"
import_declaration
import "import"
scoped_identifier
scoped_identifier
identifier "java"
. "."
identifier "util"
. "."
identifier "LinkedHashMap"
; ";"
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 "Map"
; ";"
block_comment "/**\n * Main entry-point into the library.\n * <p>\n * Options "...
class_declaration
modifiers
public "public"
class "class"
identifier "Options"
super_interfaces
implements "implements"
type_list
type_identifier "Serializable"
class_body
{ "{"
block_comment "/** The serial version UID. */"
field_declaration
modifiers
private "private"
static "static"
final "final"
integral_type
long "long"
variable_declarator
identifier "serialVersionUID"
= "="
decimal_integer_literal "1L"
; ";"
block_comment "/** a map of the options with the character key */"
field_declaration (+29 nodes collapsed)
block_comment "/** a map of the options with the long key */"
field_declaration (+29 nodes collapsed)
block_comment "/** a map of the required options */"
line_comment "// N.B. This can contain either a String (addOption) or an O"...
line_comment "// TODO this seems wrong"
field_declaration (+25 nodes collapsed)
block_comment "/** a map of the option groups */"
field_declaration
modifiers
private "private"
final "final"
generic_type
type_identifier "Map"
type_arguments
< "<"
type_identifier "String"
, ","
type_identifier "OptionGroup"
> ">"
variable_declarator
identifier "optionGroups"
= "="
object_creation_expression
new "new"
generic_type
type_identifier "LinkedHashMap"
type_arguments
< "<"
type_identifier "String"
, ","
type_identifier "OptionGroup"
> ">"
argument_list
( "("
) ")"
; ";"
block_comment "/**\n * Add the specified option group.\n *\n * @pa"...
method_declaration (+99 nodes collapsed)
block_comment "/**\n * Lists the OptionGroups that are members of this O"...
method_declaration (+35 nodes collapsed)
block_comment "/**\n * Add an option that only contains a short name.\n "...
method_declaration (+36 nodes collapsed)
block_comment "/**\n * Add an option that only contains a short-name.\n "...
method_declaration (+40 nodes collapsed)
block_comment "/**\n * Add an option that contains a short-name and a lo"...
method_declaration (+50 nodes collapsed)
block_comment "/**\n * Adds an option instance\n *\n * @param opt "...
method_declaration (+136 nodes collapsed)
block_comment "/**\n * Retrieve a read-only list of options in this set\n"...
method_declaration (+31 nodes collapsed)
block_comment "/**\n * Returns the Options for use by the HelpFormatter."...
method_declaration (+35 nodes collapsed)
block_comment "/**\n * Returns the required options.\n *\n * @retu"...
method_declaration (+22 nodes collapsed)
block_comment "/**\n * Retrieve the {@link Option} matching the long or "...
method_declaration (+65 nodes collapsed)
block_comment "/**\n * Returns the options with a long name starting wit"...
method_declaration (+135 nodes collapsed)
block_comment "/**\n * Returns whether the named {@link Option} is a mem"...
method_declaration (+48 nodes collapsed)
block_comment "/**\n * Returns whether the named {@link Option} is a mem"...
method_declaration (+38 nodes collapsed)
block_comment "/**\n * Returns whether the named {@link Option} is a mem"...
method_declaration (+38 nodes collapsed)
block_comment "/**\n * Returns the OptionGroup the <code>opt</code> belo"...
method_declaration (+31 nodes collapsed)
block_comment "/**\n * Dump state, suitable for debugging.\n *\n *"...
method_declaration (+101 nodes collapsed)
} "}"