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–164 unchanged (164 lines)
165 return "</" + name() + ">";
166 }
167 }
168
169 static class Comment extends Token {
170 final StringBuilder data = new StringBuilder();
171
172 Comment() {
173 type = TokenType.Comment;
174 }
175
176 String getData() {
177 return data.toString();
…lines 178–263 unchanged (86 lines)

After

…lines 1–164 unchanged (164 lines)
165 return "</" + name() + ">";
166 }
167 }
168
169 static class Comment extends Token {
170 final StringBuilder data = new StringBuilder();
171 boolean bogus = false;
172
173 Comment() {
174 type = TokenType.Comment;
175 }
176
177 String getData() {
…lines 178–264 unchanged (87 lines)

Before

program
package_declaration
package "package"
scoped_identifier
scoped_identifier
identifier "org"
. "."
identifier "jsoup"
. "."
identifier "parser"
; ";"
import_declaration
import "import"
scoped_identifier
scoped_identifier
scoped_identifier
identifier "org"
. "."
identifier "jsoup"
. "."
identifier "helper"
. "."
identifier "Validate"
; ";"
import_declaration
import "import"
scoped_identifier
scoped_identifier
scoped_identifier
identifier "org"
. "."
identifier "jsoup"
. "."
identifier "nodes"
. "."
identifier "Attribute"
; ";"
import_declaration
import "import"
scoped_identifier
scoped_identifier
scoped_identifier
identifier "org"
. "."
identifier "jsoup"
. "."
identifier "nodes"
. "."
identifier "Attributes"
; ";"
block_comment "/**\n * Parse tokens for the Tokeniser.\n */"
class_declaration
modifiers
abstract "abstract"
class "class"
identifier "Token"
class_body
{ "{"
field_declaration
type_identifier "TokenType"
variable_declarator
identifier "type"
; ";"
constructor_declaration
modifiers
private "private"
identifier "Token"
formal_parameters
( "("
) ")"
constructor_body
{ "{"
} "}"
method_declaration (+25 nodes collapsed)
class_declaration (+151 nodes collapsed)
class_declaration (+497 nodes collapsed)
class_declaration (+201 nodes collapsed)
class_declaration (+94 nodes collapsed)
class_declaration
modifiers
static "static"
class "class"
identifier "Comment"
superclass
extends "extends"
type_identifier "Token"
class_body
{ "{"
field_declaration
modifiers
final "final"
type_identifier "StringBuilder"
variable_declarator
identifier "data"
= "="
object_creation_expression
new "new"
type_identifier "StringBuilder"
argument_list
( "("
) ")"
; ";"
constructor_declaration
identifier "Comment"
formal_parameters
( "("
) ")"
constructor_body
{ "{"
expression_statement
assignment_expression
identifier "type"
= "="
field_access
identifier "TokenType"
. "."
identifier "Comment"
; ";"
} "}"
method_declaration
type_identifier "String"
identifier "getData"
formal_parameters
( "("
) ")"
block
{ "{"
return_statement
return "return"
method_invocation
identifier "data"
. "."
identifier "toString"
argument_list
( "("
) ")"
; ";"
} "}"
method_declaration (+34 nodes collapsed)
} "}"
class_declaration (+83 nodes collapsed)
class_declaration (+31 nodes collapsed)
method_declaration
boolean_type "boolean"
identifier "isDoctype"
formal_parameters
( "("
) ")"
block
{ "{"
return_statement
return "return"
binary_expression
identifier "type"
== "=="
field_access
identifier "TokenType"
. "."
identifier "Doctype"
; ";"
} "}"
method_declaration
type_identifier "Doctype"
identifier "asDoctype"
formal_parameters
( "("
) ")"
block
{ "{"
return_statement
return "return"
cast_expression
( "("
type_identifier "Doctype"
) ")"
this "this"
; ";"
} "}"
method_declaration
boolean_type "boolean"
identifier "isStartTag"
formal_parameters
( "("
) ")"
block
{ "{"
return_statement
return "return"
binary_expression
identifier "type"
== "=="
field_access
identifier "TokenType"
. "."
identifier "StartTag"
; ";"
} "}"
method_declaration
type_identifier "StartTag"
identifier "asStartTag"
formal_parameters
( "("
) ")"
block
{ "{"
return_statement
return "return"
cast_expression
( "("
type_identifier "StartTag"
) ")"
this "this"
; ";"
} "}"
method_declaration
boolean_type "boolean"
identifier "isEndTag"
formal_parameters
( "("
) ")"
block
{ "{"
return_statement
return "return"
binary_expression
identifier "type"
== "=="
field_access
identifier "TokenType"
. "."
identifier "EndTag"
; ";"
} "}"
method_declaration
type_identifier "EndTag"
identifier "asEndTag"
formal_parameters
( "("
) ")"
block
{ "{"
return_statement
return "return"
cast_expression
( "("
type_identifier "EndTag"
) ")"
this "this"
; ";"
} "}"
method_declaration
boolean_type "boolean"
identifier "isComment"
formal_parameters
( "("
) ")"
block
{ "{"
return_statement
return "return"
binary_expression
identifier "type"
== "=="
field_access
identifier "TokenType"
. "."
identifier "Comment"
; ";"
} "}"
method_declaration
type_identifier "Comment"
identifier "asComment"
formal_parameters
( "("
) ")"
block
{ "{"
return_statement
return "return"
cast_expression
( "("
type_identifier "Comment"
) ")"
this "this"
; ";"
} "}"
method_declaration
boolean_type "boolean"
identifier "isCharacter"
formal_parameters
( "("
) ")"
block
{ "{"
return_statement
return "return"
binary_expression
identifier "type"
== "=="
field_access
identifier "TokenType"
. "."
identifier "Character"
; ";"
} "}"
method_declaration
type_identifier "Character"
identifier "asCharacter"
formal_parameters
( "("
) ")"
block
{ "{"
return_statement
return "return"
cast_expression
( "("
type_identifier "Character"
) ")"
this "this"
; ";"
} "}"
method_declaration
boolean_type "boolean"
identifier "isEOF"
formal_parameters
( "("
) ")"
block
{ "{"
return_statement
return "return"
binary_expression
identifier "type"
== "=="
field_access
identifier "TokenType"
. "."
identifier "EOF"
; ";"
} "}"
enum_declaration (+23 nodes collapsed)
} "}"

After

program
package_declaration
package "package"
scoped_identifier
scoped_identifier
identifier "org"
. "."
identifier "jsoup"
. "."
identifier "parser"
; ";"
import_declaration
import "import"
scoped_identifier
scoped_identifier
scoped_identifier
identifier "org"
. "."
identifier "jsoup"
. "."
identifier "helper"
. "."
identifier "Validate"
; ";"
import_declaration
import "import"
scoped_identifier
scoped_identifier
scoped_identifier
identifier "org"
. "."
identifier "jsoup"
. "."
identifier "nodes"
. "."
identifier "Attribute"
; ";"
import_declaration
import "import"
scoped_identifier
scoped_identifier
scoped_identifier
identifier "org"
. "."
identifier "jsoup"
. "."
identifier "nodes"
. "."
identifier "Attributes"
; ";"
block_comment "/**\n * Parse tokens for the Tokeniser.\n */"
class_declaration
modifiers
abstract "abstract"
class "class"
identifier "Token"
class_body
{ "{"
field_declaration
type_identifier "TokenType"
variable_declarator
identifier "type"
; ";"
constructor_declaration
modifiers
private "private"
identifier "Token"
formal_parameters
( "("
) ")"
constructor_body
{ "{"
} "}"
method_declaration (+25 nodes collapsed)
class_declaration (+151 nodes collapsed)
class_declaration (+497 nodes collapsed)
class_declaration (+201 nodes collapsed)
class_declaration (+94 nodes collapsed)
class_declaration
modifiers
static "static"
class "class"
identifier "Comment"
superclass
extends "extends"
type_identifier "Token"
class_body
{ "{"
field_declaration
modifiers
final "final"
type_identifier "StringBuilder"
variable_declarator
identifier "data"
= "="
object_creation_expression
new "new"
type_identifier "StringBuilder"
argument_list
( "("
) ")"
; ";"
field_declaration
boolean_type "boolean"
variable_declarator
identifier "bogus"
= "="
false "false"
; ";"
constructor_declaration
identifier "Comment"
formal_parameters
( "("
) ")"
constructor_body
{ "{"
expression_statement
assignment_expression
identifier "type"
= "="
field_access
identifier "TokenType"
. "."
identifier "Comment"
; ";"
} "}"
method_declaration
type_identifier "String"
identifier "getData"
formal_parameters
( "("
) ")"
block
{ "{"
return_statement
return "return"
method_invocation
identifier "data"
. "."
identifier "toString"
argument_list
( "("
) ")"
; ";"
} "}"
method_declaration (+34 nodes collapsed)
} "}"
class_declaration (+83 nodes collapsed)
class_declaration (+31 nodes collapsed)
method_declaration
boolean_type "boolean"
identifier "isDoctype"
formal_parameters
( "("
) ")"
block
{ "{"
return_statement
return "return"
binary_expression
identifier "type"
== "=="
field_access
identifier "TokenType"
. "."
identifier "Doctype"
; ";"
} "}"
method_declaration
type_identifier "Doctype"
identifier "asDoctype"
formal_parameters
( "("
) ")"
block
{ "{"
return_statement
return "return"
cast_expression
( "("
type_identifier "Doctype"
) ")"
this "this"
; ";"
} "}"
method_declaration
boolean_type "boolean"
identifier "isStartTag"
formal_parameters
( "("
) ")"
block
{ "{"
return_statement
return "return"
binary_expression
identifier "type"
== "=="
field_access
identifier "TokenType"
. "."
identifier "StartTag"
; ";"
} "}"
method_declaration
type_identifier "StartTag"
identifier "asStartTag"
formal_parameters
( "("
) ")"
block
{ "{"
return_statement
return "return"
cast_expression
( "("
type_identifier "StartTag"
) ")"
this "this"
; ";"
} "}"
method_declaration
boolean_type "boolean"
identifier "isEndTag"
formal_parameters
( "("
) ")"
block
{ "{"
return_statement
return "return"
binary_expression
identifier "type"
== "=="
field_access
identifier "TokenType"
. "."
identifier "EndTag"
; ";"
} "}"
method_declaration
type_identifier "EndTag"
identifier "asEndTag"
formal_parameters
( "("
) ")"
block
{ "{"
return_statement
return "return"
cast_expression
( "("
type_identifier "EndTag"
) ")"
this "this"
; ";"
} "}"
method_declaration
boolean_type "boolean"
identifier "isComment"
formal_parameters
( "("
) ")"
block
{ "{"
return_statement
return "return"
binary_expression
identifier "type"
== "=="
field_access
identifier "TokenType"
. "."
identifier "Comment"
; ";"
} "}"
method_declaration
type_identifier "Comment"
identifier "asComment"
formal_parameters
( "("
) ")"
block
{ "{"
return_statement
return "return"
cast_expression
( "("
type_identifier "Comment"
) ")"
this "this"
; ";"
} "}"
method_declaration
boolean_type "boolean"
identifier "isCharacter"
formal_parameters
( "("
) ")"
block
{ "{"
return_statement
return "return"
binary_expression
identifier "type"
== "=="
field_access
identifier "TokenType"
. "."
identifier "Character"
; ";"
} "}"
method_declaration
type_identifier "Character"
identifier "asCharacter"
formal_parameters
( "("
) ")"
block
{ "{"
return_statement
return "return"
cast_expression
( "("
type_identifier "Character"
) ")"
this "this"
; ";"
} "}"
method_declaration
boolean_type "boolean"
identifier "isEOF"
formal_parameters
( "("
) ")"
block
{ "{"
return_statement
return "return"
binary_expression
identifier "type"
== "=="
field_access
identifier "TokenType"
. "."
identifier "EOF"
; ";"
} "}"
enum_declaration (+23 nodes collapsed)
} "}"