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–95 unchanged (95 lines)
96 }
97
98 /**
99 * Constants (true, false, null) are considered basically free,
100 * because it's likely that they will get folded when we're done.
101 */
102 }
103}
104

After

…lines 1–95 unchanged (95 lines)
96 }
97
98 /**
99 * Constants (true, false, null) are considered basically free,
100 * because it's likely that they will get folded when we're done.
101 */
102 @Override
103 void addConstant(String newcode) {
104 add("0");
105 }
106 }
107}
108

Before

program
block_comment "/*\n * Copyright 2008 The Closure Compiler Authors.\n *\n * Lic"...
package_declaration
package "package"
scoped_identifier
scoped_identifier
scoped_identifier
identifier "com"
. "."
identifier "google"
. "."
identifier "javascript"
. "."
identifier "jscomp"
; ";"
import_declaration
import "import"
scoped_identifier
scoped_identifier
scoped_identifier
scoped_identifier
identifier "com"
. "."
identifier "google"
. "."
identifier "javascript"
. "."
identifier "rhino"
. "."
identifier "Node"
; ";"
block_comment "/**\n * For use with CodeGenerator to determine the cost of g"...
class_declaration
class "class"
identifier "InlineCostEstimator"
class_body
{ "{"
line_comment "// For now simply assume identifiers are 2 characters."
field_declaration
modifiers
private "private"
static "static"
final "final"
type_identifier "String"
variable_declarator
identifier "ESTIMATED_IDENTIFIER"
= "="
string_literal
" "\""
string_fragment "ab"
" "\""
; ";"
field_declaration
modifiers
static "static"
final "final"
integral_type
int "int"
variable_declarator
identifier "ESTIMATED_IDENTIFIER_COST"
= "="
method_invocation
identifier "ESTIMATED_IDENTIFIER"
. "."
identifier "length"
argument_list
( "("
) ")"
; ";"
constructor_declaration
modifiers
private "private"
identifier "InlineCostEstimator"
formal_parameters
( "("
) ")"
constructor_body
{ "{"
} "}"
block_comment "/**\n * Determines the size of the js code.\n */"
method_declaration (+29 nodes collapsed)
block_comment "/**\n * Determines the estimated size of the js snippet rep"...
method_declaration (+53 nodes collapsed)
block_comment "/**\n * Code consumer that estimates compiled size by assum"...
class_declaration
modifiers
private "private"
static "static"
class "class"
identifier "CompiledSizeEstimator"
superclass
extends "extends"
type_identifier "CodeConsumer"
class_body
{ "{"
field_declaration
modifiers
private "private"
integral_type
int "int"
variable_declarator
identifier "maxCost"
; ";"
field_declaration
modifiers
private "private"
integral_type
int "int"
variable_declarator
identifier "cost"
= "="
decimal_integer_literal "0"
; ";"
field_declaration
modifiers
private "private"
integral_type
char "char"
variable_declarator
identifier "last"
= "="
character_literal "'\\0'"
; ";"
field_declaration
modifiers
private "private"
boolean_type "boolean"
variable_declarator
identifier "continueProcessing"
= "="
true "true"
; ";"
constructor_declaration (+21 nodes collapsed)
method_declaration (+35 nodes collapsed)
method_declaration
integral_type
int "int"
identifier "getCost"
formal_parameters
( "("
) ")"
block
{ "{"
return_statement
return "return"
identifier "cost"
; ";"
} "}"
method_declaration
modifiers
marker_annotation
@ "@"
identifier "Override"
boolean_type "boolean"
identifier "continueProcessing"
formal_parameters
( "("
) ")"
block
{ "{"
return_statement
return "return"
identifier "continueProcessing"
; ";"
} "}"
method_declaration
modifiers
marker_annotation
@ "@"
identifier "Override"
integral_type
char "char"
identifier "getLastChar"
formal_parameters
( "("
) ")"
block
{ "{"
return_statement
return "return"
identifier "last"
; ";"
} "}"
method_declaration (+68 nodes collapsed)
method_declaration (+24 nodes collapsed)
block_comment "/**\n * Constants (true, false, null) are considered basi"...
} "}"
} "}"

After

program
block_comment "/*\n * Copyright 2008 The Closure Compiler Authors.\n *\n * Lic"...
package_declaration
package "package"
scoped_identifier
scoped_identifier
scoped_identifier
identifier "com"
. "."
identifier "google"
. "."
identifier "javascript"
. "."
identifier "jscomp"
; ";"
import_declaration
import "import"
scoped_identifier
scoped_identifier
scoped_identifier
scoped_identifier
identifier "com"
. "."
identifier "google"
. "."
identifier "javascript"
. "."
identifier "rhino"
. "."
identifier "Node"
; ";"
block_comment "/**\n * For use with CodeGenerator to determine the cost of g"...
class_declaration
class "class"
identifier "InlineCostEstimator"
class_body
{ "{"
line_comment "// For now simply assume identifiers are 2 characters."
field_declaration
modifiers
private "private"
static "static"
final "final"
type_identifier "String"
variable_declarator
identifier "ESTIMATED_IDENTIFIER"
= "="
string_literal
" "\""
string_fragment "ab"
" "\""
; ";"
field_declaration
modifiers
static "static"
final "final"
integral_type
int "int"
variable_declarator
identifier "ESTIMATED_IDENTIFIER_COST"
= "="
method_invocation
identifier "ESTIMATED_IDENTIFIER"
. "."
identifier "length"
argument_list
( "("
) ")"
; ";"
constructor_declaration
modifiers
private "private"
identifier "InlineCostEstimator"
formal_parameters
( "("
) ")"
constructor_body
{ "{"
} "}"
block_comment "/**\n * Determines the size of the js code.\n */"
method_declaration (+29 nodes collapsed)
block_comment "/**\n * Determines the estimated size of the js snippet rep"...
method_declaration (+53 nodes collapsed)
block_comment "/**\n * Code consumer that estimates compiled size by assum"...
class_declaration
modifiers
private "private"
static "static"
class "class"
identifier "CompiledSizeEstimator"
superclass
extends "extends"
type_identifier "CodeConsumer"
class_body
{ "{"
field_declaration
modifiers
private "private"
integral_type
int "int"
variable_declarator
identifier "maxCost"
; ";"
field_declaration
modifiers
private "private"
integral_type
int "int"
variable_declarator
identifier "cost"
= "="
decimal_integer_literal "0"
; ";"
field_declaration
modifiers
private "private"
integral_type
char "char"
variable_declarator
identifier "last"
= "="
character_literal "'\\0'"
; ";"
field_declaration
modifiers
private "private"
boolean_type "boolean"
variable_declarator
identifier "continueProcessing"
= "="
true "true"
; ";"
constructor_declaration (+21 nodes collapsed)
method_declaration (+35 nodes collapsed)
method_declaration
integral_type
int "int"
identifier "getCost"
formal_parameters
( "("
) ")"
block
{ "{"
return_statement
return "return"
identifier "cost"
; ";"
} "}"
method_declaration
modifiers
marker_annotation
@ "@"
identifier "Override"
boolean_type "boolean"
identifier "continueProcessing"
formal_parameters
( "("
) ")"
block
{ "{"
return_statement
return "return"
identifier "continueProcessing"
; ";"
} "}"
method_declaration
modifiers
marker_annotation
@ "@"
identifier "Override"
integral_type
char "char"
identifier "getLastChar"
formal_parameters
( "("
) ")"
block
{ "{"
return_statement
return "return"
identifier "last"
; ";"
} "}"
method_declaration (+68 nodes collapsed)
method_declaration (+24 nodes collapsed)
block_comment "/**\n * Constants (true, false, null) are considered basi"...
method_declaration
modifiers
marker_annotation
@ "@"
identifier "Override"
void_type "void"
identifier "addConstant"
formal_parameters
( "("
formal_parameter
type_identifier "String"
identifier "newcode"
) ")"
block
{ "{"
expression_statement
method_invocation
identifier "add"
argument_list
( "("
string_literal
" "\""
string_fragment "0"
" "\""
) ")"
; ";"
} "}"
} "}"
} "}"