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–384 unchanged (384 lines)
385 }
386 return false;
387 }
388 if (test instanceof NodeTypeTest) {
389 switch (((NodeTypeTest) test).getNodeType()) {
390 case Compiler.NODE_TYPE_NODE :
391 return (node instanceof Element) || (node instanceof Document);
392 case Compiler.NODE_TYPE_TEXT :
393 return (node instanceof Text) || (node instanceof CDATA);
394 case Compiler.NODE_TYPE_COMMENT :
395 return node instanceof Comment;
396 case Compiler.NODE_TYPE_PI :
397 return node instanceof ProcessingInstruction;
…lines 398–772 unchanged (375 lines)

After

…lines 1–384 unchanged (384 lines)
385 }
386 return false;
387 }
388 if (test instanceof NodeTypeTest) {
389 switch (((NodeTypeTest) test).getNodeType()) {
390 case Compiler.NODE_TYPE_NODE :
391 return true;
392 case Compiler.NODE_TYPE_TEXT :
393 return (node instanceof Text) || (node instanceof CDATA);
394 case Compiler.NODE_TYPE_COMMENT :
395 return node instanceof Comment;
396 case Compiler.NODE_TYPE_PI :
397 return node instanceof ProcessingInstruction;
…lines 398–772 unchanged (375 lines)

Before

program
block_comment "/*\n * Licensed to the Apache Software Foundation (ASF) under"...
package_declaration (+22 nodes collapsed)
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 "Locale"
; ";"
import_declaration
import "import"
scoped_identifier
scoped_identifier
scoped_identifier
scoped_identifier
identifier "org"
. "."
identifier "apache"
. "."
identifier "commons"
. "."
identifier "jxpath"
. "."
identifier "AbstractFactory"
; ";"
import_declaration
import "import"
scoped_identifier
scoped_identifier
scoped_identifier
scoped_identifier
identifier "org"
. "."
identifier "apache"
. "."
identifier "commons"
. "."
identifier "jxpath"
. "."
identifier "JXPathAbstractFactoryException"
; ";"
import_declaration
import "import"
scoped_identifier
scoped_identifier
scoped_identifier
scoped_identifier
identifier "org"
. "."
identifier "apache"
. "."
identifier "commons"
. "."
identifier "jxpath"
. "."
identifier "JXPathContext"
; ";"
import_declaration
import "import"
scoped_identifier
scoped_identifier
scoped_identifier
scoped_identifier
identifier "org"
. "."
identifier "apache"
. "."
identifier "commons"
. "."
identifier "jxpath"
. "."
identifier "JXPathException"
; ";"
import_declaration
import "import"
scoped_identifier
scoped_identifier
scoped_identifier
scoped_identifier
scoped_identifier
identifier "org"
. "."
identifier "apache"
. "."
identifier "commons"
. "."
identifier "jxpath"
. "."
identifier "ri"
. "."
identifier "Compiler"
; ";"
import_declaration
import "import"
scoped_identifier
scoped_identifier
scoped_identifier
scoped_identifier
scoped_identifier
identifier "org"
. "."
identifier "apache"
. "."
identifier "commons"
. "."
identifier "jxpath"
. "."
identifier "ri"
. "."
identifier "NamespaceResolver"
; ";"
import_declaration
import "import"
scoped_identifier
scoped_identifier
scoped_identifier
scoped_identifier
scoped_identifier
identifier "org"
. "."
identifier "apache"
. "."
identifier "commons"
. "."
identifier "jxpath"
. "."
identifier "ri"
. "."
identifier "QName"
; ";"
import_declaration (+22 nodes collapsed)
import_declaration (+22 nodes collapsed)
import_declaration (+22 nodes collapsed)
import_declaration (+22 nodes collapsed)
import_declaration (+22 nodes collapsed)
import_declaration (+22 nodes collapsed)
import_declaration
import "import"
scoped_identifier
scoped_identifier
scoped_identifier
scoped_identifier
scoped_identifier
identifier "org"
. "."
identifier "apache"
. "."
identifier "commons"
. "."
identifier "jxpath"
. "."
identifier "util"
. "."
identifier "TypeUtils"
; ";"
import_declaration
import "import"
scoped_identifier
scoped_identifier
identifier "org"
. "."
identifier "jdom"
. "."
identifier "Attribute"
; ";"
import_declaration
import "import"
scoped_identifier
scoped_identifier
identifier "org"
. "."
identifier "jdom"
. "."
identifier "CDATA"
; ";"
import_declaration
import "import"
scoped_identifier
scoped_identifier
identifier "org"
. "."
identifier "jdom"
. "."
identifier "Comment"
; ";"
import_declaration
import "import"
scoped_identifier
scoped_identifier
identifier "org"
. "."
identifier "jdom"
. "."
identifier "Document"
; ";"
import_declaration
import "import"
scoped_identifier
scoped_identifier
identifier "org"
. "."
identifier "jdom"
. "."
identifier "Element"
; ";"
import_declaration
import "import"
scoped_identifier
scoped_identifier
identifier "org"
. "."
identifier "jdom"
. "."
identifier "Namespace"
; ";"
import_declaration
import "import"
scoped_identifier
scoped_identifier
identifier "org"
. "."
identifier "jdom"
. "."
identifier "ProcessingInstruction"
; ";"
import_declaration
import "import"
scoped_identifier
scoped_identifier
identifier "org"
. "."
identifier "jdom"
. "."
identifier "Text"
; ";"
block_comment "/**\n * A Pointer that points to a DOM node.\n *\n * @author Dm"...
class_declaration
modifiers
public "public"
class "class"
identifier "JDOMNodePointer"
superclass
extends "extends"
type_identifier "NodePointer"
class_body
{ "{"
field_declaration
modifiers
private "private"
static "static"
final "final"
integral_type
long "long"
variable_declarator
identifier "serialVersionUID"
= "="
unary_expression
- "-"
decimal_integer_literal "6346532297491082651L"
; ";"
field_declaration
modifiers
private "private"
type_identifier "Object"
variable_declarator
identifier "node"
; ";"
field_declaration
modifiers
private "private"
type_identifier "String"
variable_declarator
identifier "id"
; ";"
field_declaration
modifiers
private "private"
type_identifier "NamespaceResolver"
variable_declarator
identifier "localNamespaceResolver"
; ";"
field_declaration
modifiers
public "public"
static "static"
final "final"
type_identifier "String"
variable_declarator
identifier "XML_NAMESPACE_URI"
= "="
string_literal
" "\""
string_fragment "http://www.w3.org/XML/1998/namespace"
" "\""
; ";"
field_declaration
modifiers
public "public"
static "static"
final "final"
type_identifier "String"
variable_declarator
identifier "XMLNS_NAMESPACE_URI"
= "="
string_literal
" "\""
string_fragment "http://www.w3.org/2000/xmlns/"
" "\""
; ";"
constructor_declaration (+35 nodes collapsed)
constructor_declaration (+48 nodes collapsed)
constructor_declaration (+33 nodes collapsed)
method_declaration (+38 nodes collapsed)
method_declaration (+26 nodes collapsed)
method_declaration (+21 nodes collapsed)
method_declaration (+26 nodes collapsed)
method_declaration
modifiers
public "public"
type_identifier "String"
identifier "getNamespaceURI"
formal_parameters
( "("
) ")"
block
{ "{"
return_statement
return "return"
method_invocation
identifier "getNamespaceURI"
argument_list
( "("
identifier "node"
) ")"
; ";"
} "}"
method_declaration (+89 nodes collapsed)
block_comment "/* (non-Javadoc)\n * @see org.apache.commons.jxpath.ri.mo"...
method_declaration (+56 nodes collapsed)
method_declaration (+154 nodes collapsed)
method_declaration (+410 nodes collapsed)
block_comment "/**\n * @see org.apache.commons.jxpath.ri.model.NodePoint"...
method_declaration
modifiers
public "public"
type_identifier "Object"
identifier "getBaseValue"
formal_parameters
( "("
) ")"
block
{ "{"
return_statement
return "return"
identifier "node"
; ";"
} "}"
method_declaration
modifiers
public "public"
boolean_type "boolean"
identifier "isCollection"
formal_parameters
( "("
) ")"
block
{ "{"
return_statement
return "return"
false "false"
; ";"
} "}"
method_declaration
modifiers
public "public"
integral_type
int "int"
identifier "getLength"
formal_parameters
( "("
) ")"
block
{ "{"
return_statement
return "return"
decimal_integer_literal "1"
; ";"
} "}"
method_declaration (+91 nodes collapsed)
block_comment "/**\n * @see org.apache.commons.jxpath.ri.model.NodePoint"...
method_declaration (+149 nodes collapsed)
block_comment "/**\n * @see org.apache.commons.jxpath.ri.model.NodePoint"...
method_declaration
modifiers
public "public"
type_identifier "Object"
identifier "getImmediateNode"
formal_parameters
( "("
) ")"
block
{ "{"
return_statement
return "return"
identifier "node"
; ";"
} "}"
method_declaration (+329 nodes collapsed)
method_declaration (+438 nodes collapsed)
method_declaration (+305 nodes collapsed)
method_declaration (+27 nodes collapsed)
method_declaration
modifiers
public "public"
static "static"
boolean_type "boolean"
identifier "testNode"
formal_parameters
( "("
formal_parameter
type_identifier "NodePointer"
identifier "pointer"
, ","
formal_parameter
type_identifier "Object"
identifier "node"
, ","
formal_parameter
type_identifier "NodeTest"
identifier "test"
) ")"
block
{ "{"
if_statement
if "if"
parenthesized_expression
( "("
binary_expression
identifier "test"
== "=="
null_literal "null"
) ")"
block
{ "{"
return_statement
return "return"
true "true"
; ";"
} "}"
if_statement (+197 nodes collapsed)
if_statement
if "if"
parenthesized_expression
( "("
instanceof_expression
identifier "test"
instanceof "instanceof"
type_identifier "NodeTypeTest"
) ")"
block
{ "{"
switch_expression
switch "switch"
parenthesized_expression
( "("
method_invocation
parenthesized_expression
( "("
cast_expression
( "("
type_identifier "NodeTypeTest"
) ")"
identifier "test"
) ")"
. "."
identifier "getNodeType"
argument_list
( "("
) ")"
) ")"
switch_block
{ "{"
switch_block_statement_group
switch_label
case "case"
field_access
identifier "Compiler"
. "."
identifier "NODE_TYPE_NODE"
: ":"
return_statement
return "return"
binary_expression
parenthesized_expression
( "("
instanceof_expression
identifier "node"
instanceof "instanceof"
type_identifier "Element"
) ")"
|| "||"
parenthesized_expression
( "("
instanceof_expression
identifier "node"
instanceof "instanceof"
type_identifier "Document"
) ")"
; ";"
switch_block_statement_group (+27 nodes collapsed)
switch_block_statement_group
switch_label
case "case"
field_access
identifier "Compiler"
. "."
identifier "NODE_TYPE_COMMENT"
: ":"
return_statement
return "return"
instanceof_expression
identifier "node"
instanceof "instanceof"
type_identifier "Comment"
; ";"
switch_block_statement_group
switch_label
case "case"
field_access
identifier "Compiler"
. "."
identifier "NODE_TYPE_PI"
: ":"
return_statement
return "return"
instanceof_expression
identifier "node"
instanceof "instanceof"
type_identifier "ProcessingInstruction"
; ";"
} "}"
return_statement
return "return"
false "false"
; ";"
} "}"
if_statement (+69 nodes collapsed)
return_statement
return "return"
false "false"
; ";"
} "}"
method_declaration (+90 nodes collapsed)
method_declaration (+137 nodes collapsed)
method_declaration (+77 nodes collapsed)
block_comment "/**\n * Returns true if the xml:lang attribute for the cu"...
method_declaration (+63 nodes collapsed)
method_declaration (+30 nodes collapsed)
method_declaration (+119 nodes collapsed)
method_declaration (+199 nodes collapsed)
method_declaration (+244 nodes collapsed)
method_declaration (+57 nodes collapsed)
method_declaration (+290 nodes collapsed)
method_declaration (+64 nodes collapsed)
method_declaration (+551 nodes collapsed)
method_declaration (+168 nodes collapsed)
method_declaration (+222 nodes collapsed)
method_declaration (+194 nodes collapsed)
method_declaration (+201 nodes collapsed)
method_declaration (+187 nodes collapsed)
method_declaration (+23 nodes collapsed)
method_declaration (+72 nodes collapsed)
method_declaration (+63 nodes collapsed)
} "}"

After

program
block_comment "/*\n * Licensed to the Apache Software Foundation (ASF) under"...
package_declaration (+22 nodes collapsed)
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 "Locale"
; ";"
import_declaration
import "import"
scoped_identifier
scoped_identifier
scoped_identifier
scoped_identifier
identifier "org"
. "."
identifier "apache"
. "."
identifier "commons"
. "."
identifier "jxpath"
. "."
identifier "AbstractFactory"
; ";"
import_declaration
import "import"
scoped_identifier
scoped_identifier
scoped_identifier
scoped_identifier
identifier "org"
. "."
identifier "apache"
. "."
identifier "commons"
. "."
identifier "jxpath"
. "."
identifier "JXPathAbstractFactoryException"
; ";"
import_declaration
import "import"
scoped_identifier
scoped_identifier
scoped_identifier
scoped_identifier
identifier "org"
. "."
identifier "apache"
. "."
identifier "commons"
. "."
identifier "jxpath"
. "."
identifier "JXPathContext"
; ";"
import_declaration
import "import"
scoped_identifier
scoped_identifier
scoped_identifier
scoped_identifier
identifier "org"
. "."
identifier "apache"
. "."
identifier "commons"
. "."
identifier "jxpath"
. "."
identifier "JXPathException"
; ";"
import_declaration
import "import"
scoped_identifier
scoped_identifier
scoped_identifier
scoped_identifier
scoped_identifier
identifier "org"
. "."
identifier "apache"
. "."
identifier "commons"
. "."
identifier "jxpath"
. "."
identifier "ri"
. "."
identifier "Compiler"
; ";"
import_declaration
import "import"
scoped_identifier
scoped_identifier
scoped_identifier
scoped_identifier
scoped_identifier
identifier "org"
. "."
identifier "apache"
. "."
identifier "commons"
. "."
identifier "jxpath"
. "."
identifier "ri"
. "."
identifier "NamespaceResolver"
; ";"
import_declaration
import "import"
scoped_identifier
scoped_identifier
scoped_identifier
scoped_identifier
scoped_identifier
identifier "org"
. "."
identifier "apache"
. "."
identifier "commons"
. "."
identifier "jxpath"
. "."
identifier "ri"
. "."
identifier "QName"
; ";"
import_declaration (+22 nodes collapsed)
import_declaration (+22 nodes collapsed)
import_declaration (+22 nodes collapsed)
import_declaration (+22 nodes collapsed)
import_declaration (+22 nodes collapsed)
import_declaration (+22 nodes collapsed)
import_declaration
import "import"
scoped_identifier
scoped_identifier
scoped_identifier
scoped_identifier
scoped_identifier
identifier "org"
. "."
identifier "apache"
. "."
identifier "commons"
. "."
identifier "jxpath"
. "."
identifier "util"
. "."
identifier "TypeUtils"
; ";"
import_declaration
import "import"
scoped_identifier
scoped_identifier
identifier "org"
. "."
identifier "jdom"
. "."
identifier "Attribute"
; ";"
import_declaration
import "import"
scoped_identifier
scoped_identifier
identifier "org"
. "."
identifier "jdom"
. "."
identifier "CDATA"
; ";"
import_declaration
import "import"
scoped_identifier
scoped_identifier
identifier "org"
. "."
identifier "jdom"
. "."
identifier "Comment"
; ";"
import_declaration
import "import"
scoped_identifier
scoped_identifier
identifier "org"
. "."
identifier "jdom"
. "."
identifier "Document"
; ";"
import_declaration
import "import"
scoped_identifier
scoped_identifier
identifier "org"
. "."
identifier "jdom"
. "."
identifier "Element"
; ";"
import_declaration
import "import"
scoped_identifier
scoped_identifier
identifier "org"
. "."
identifier "jdom"
. "."
identifier "Namespace"
; ";"
import_declaration
import "import"
scoped_identifier
scoped_identifier
identifier "org"
. "."
identifier "jdom"
. "."
identifier "ProcessingInstruction"
; ";"
import_declaration
import "import"
scoped_identifier
scoped_identifier
identifier "org"
. "."
identifier "jdom"
. "."
identifier "Text"
; ";"
block_comment "/**\n * A Pointer that points to a DOM node.\n *\n * @author Dm"...
class_declaration
modifiers
public "public"
class "class"
identifier "JDOMNodePointer"
superclass
extends "extends"
type_identifier "NodePointer"
class_body
{ "{"
field_declaration
modifiers
private "private"
static "static"
final "final"
integral_type
long "long"
variable_declarator
identifier "serialVersionUID"
= "="
unary_expression
- "-"
decimal_integer_literal "6346532297491082651L"
; ";"
field_declaration
modifiers
private "private"
type_identifier "Object"
variable_declarator
identifier "node"
; ";"
field_declaration
modifiers
private "private"
type_identifier "String"
variable_declarator
identifier "id"
; ";"
field_declaration
modifiers
private "private"
type_identifier "NamespaceResolver"
variable_declarator
identifier "localNamespaceResolver"
; ";"
field_declaration
modifiers
public "public"
static "static"
final "final"
type_identifier "String"
variable_declarator
identifier "XML_NAMESPACE_URI"
= "="
string_literal
" "\""
string_fragment "http://www.w3.org/XML/1998/namespace"
" "\""
; ";"
field_declaration
modifiers
public "public"
static "static"
final "final"
type_identifier "String"
variable_declarator
identifier "XMLNS_NAMESPACE_URI"
= "="
string_literal
" "\""
string_fragment "http://www.w3.org/2000/xmlns/"
" "\""
; ";"
constructor_declaration (+35 nodes collapsed)
constructor_declaration (+48 nodes collapsed)
constructor_declaration (+33 nodes collapsed)
method_declaration (+38 nodes collapsed)
method_declaration (+26 nodes collapsed)
method_declaration (+21 nodes collapsed)
method_declaration (+26 nodes collapsed)
method_declaration
modifiers
public "public"
type_identifier "String"
identifier "getNamespaceURI"
formal_parameters
( "("
) ")"
block
{ "{"
return_statement
return "return"
method_invocation
identifier "getNamespaceURI"
argument_list
( "("
identifier "node"
) ")"
; ";"
} "}"
method_declaration (+89 nodes collapsed)
block_comment "/* (non-Javadoc)\n * @see org.apache.commons.jxpath.ri.mo"...
method_declaration (+56 nodes collapsed)
method_declaration (+154 nodes collapsed)
method_declaration (+410 nodes collapsed)
block_comment "/**\n * @see org.apache.commons.jxpath.ri.model.NodePoint"...
method_declaration
modifiers
public "public"
type_identifier "Object"
identifier "getBaseValue"
formal_parameters
( "("
) ")"
block
{ "{"
return_statement
return "return"
identifier "node"
; ";"
} "}"
method_declaration
modifiers
public "public"
boolean_type "boolean"
identifier "isCollection"
formal_parameters
( "("
) ")"
block
{ "{"
return_statement
return "return"
false "false"
; ";"
} "}"
method_declaration
modifiers
public "public"
integral_type
int "int"
identifier "getLength"
formal_parameters
( "("
) ")"
block
{ "{"
return_statement
return "return"
decimal_integer_literal "1"
; ";"
} "}"
method_declaration (+91 nodes collapsed)
block_comment "/**\n * @see org.apache.commons.jxpath.ri.model.NodePoint"...
method_declaration (+149 nodes collapsed)
block_comment "/**\n * @see org.apache.commons.jxpath.ri.model.NodePoint"...
method_declaration
modifiers
public "public"
type_identifier "Object"
identifier "getImmediateNode"
formal_parameters
( "("
) ")"
block
{ "{"
return_statement
return "return"
identifier "node"
; ";"
} "}"
method_declaration (+329 nodes collapsed)
method_declaration (+438 nodes collapsed)
method_declaration (+305 nodes collapsed)
method_declaration (+27 nodes collapsed)
method_declaration
modifiers
public "public"
static "static"
boolean_type "boolean"
identifier "testNode"
formal_parameters
( "("
formal_parameter
type_identifier "NodePointer"
identifier "pointer"
, ","
formal_parameter
type_identifier "Object"
identifier "node"
, ","
formal_parameter
type_identifier "NodeTest"
identifier "test"
) ")"
block
{ "{"
if_statement
if "if"
parenthesized_expression
( "("
binary_expression
identifier "test"
== "=="
null_literal "null"
) ")"
block
{ "{"
return_statement
return "return"
true "true"
; ";"
} "}"
if_statement (+197 nodes collapsed)
if_statement
if "if"
parenthesized_expression
( "("
instanceof_expression
identifier "test"
instanceof "instanceof"
type_identifier "NodeTypeTest"
) ")"
block
{ "{"
switch_expression
switch "switch"
parenthesized_expression
( "("
method_invocation
parenthesized_expression
( "("
cast_expression
( "("
type_identifier "NodeTypeTest"
) ")"
identifier "test"
) ")"
. "."
identifier "getNodeType"
argument_list
( "("
) ")"
) ")"
switch_block
{ "{"
switch_block_statement_group
switch_label
case "case"
field_access
identifier "Compiler"
. "."
identifier "NODE_TYPE_NODE"
: ":"
return_statement
return "return"
true "true"
; ";"
switch_block_statement_group (+27 nodes collapsed)
switch_block_statement_group
switch_label
case "case"
field_access
identifier "Compiler"
. "."
identifier "NODE_TYPE_COMMENT"
: ":"
return_statement
return "return"
instanceof_expression
identifier "node"
instanceof "instanceof"
type_identifier "Comment"
; ";"
switch_block_statement_group
switch_label
case "case"
field_access
identifier "Compiler"
. "."
identifier "NODE_TYPE_PI"
: ":"
return_statement
return "return"
instanceof_expression
identifier "node"
instanceof "instanceof"
type_identifier "ProcessingInstruction"
; ";"
} "}"
return_statement
return "return"
false "false"
; ";"
} "}"
if_statement (+69 nodes collapsed)
return_statement
return "return"
false "false"
; ";"
} "}"
method_declaration (+90 nodes collapsed)
method_declaration (+137 nodes collapsed)
method_declaration (+77 nodes collapsed)
block_comment "/**\n * Returns true if the xml:lang attribute for the cu"...
method_declaration (+63 nodes collapsed)
method_declaration (+30 nodes collapsed)
method_declaration (+119 nodes collapsed)
method_declaration (+199 nodes collapsed)
method_declaration (+244 nodes collapsed)
method_declaration (+57 nodes collapsed)
method_declaration (+290 nodes collapsed)
method_declaration (+64 nodes collapsed)
method_declaration (+551 nodes collapsed)
method_declaration (+168 nodes collapsed)
method_declaration (+222 nodes collapsed)
method_declaration (+194 nodes collapsed)
method_declaration (+201 nodes collapsed)
method_declaration (+187 nodes collapsed)
method_declaration (+23 nodes collapsed)
method_declaration (+72 nodes collapsed)
method_declaration (+63 nodes collapsed)
} "}"